lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interscoreline


From: Jan Nieuwenhuizen
Subject: Re: interscoreline
Date: Wed, 18 Aug 2004 10:13:42 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Werner LEMBERG writes:

> How can I set the minimum distance between systems (not staff lines)
> in the PS backend?  For the TeX backend, there is `interscoreline',
> but I can't find a proper equivalent.

> Reason for asking is to set it to a negative value.

It's not implemented.

Have a look at page-layout.scm and paper-system.cc.  The exact
dimension of a system is taken as its height,

  LY_DEFINE (ly_paper_system_height, "ly:paper-system-extent",
             2, 0, 0, (SCM system, SCM axis),
             "Return the extent of @var{system}.")
  {
    Paper_system *ps = unsmob_paper_system (system);
    SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
    SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
    Axis ax = (Axis)ly_scm2int (axis);
    return scm_make_real (ps->dim ()[ax]);
  }

  (define (line-height line)
    (ly:paper-system-extent line Y))

and too full pages are 10 times as bad as too empty pages.

  ;; FIXME: may need some tweaking: square, cubic
  (define (height-penalty available used)
    ;; FIXME, simplistic
    (let* ((left (- available used))
           ;; scale-independent
           (relative (abs (/ left available))))
      (if (negative? left)

          ;; too full, penalise more
          (* 10 (1+ relative) relative)
          
          ;; Convexity: two half-empty pages is better than 1 completely
          ;; empty page
          (* (1+ relative) relative))))

Possibly you can fake what you need by overriding
ly:paper-system-extent, but implemeting an inter system space is
probably rather straightforward (modulo end-of-page, and titles,
maybe).

Jan.

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]