[Top][All Lists]

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

Re: Controlling vertical spacing exactly - mini HOWTO

From: Trevor Bača
Subject: Re: Controlling vertical spacing exactly - mini HOWTO
Date: Tue, 30 Jan 2007 18:30:32 -0600

On 1/18/07, Graham Percival <address@hidden> wrote:
Trevor Bača wrote:
> The following might be of interest to folks using proportional
> notation. If there's any general interest (of if Graham wants it to be
> so) then I'll retype the following as an addition to 11.3.4
> "Controlling spacing of individual systems".

Definitely.  I don't think you need to make many changes; I'd get rid of
the capital-letter sections at the end, though.  Or integrate that
material into the rest of stuff.

In the future, it's safest if you cc'd potential doc stuff to the -devel
list, since I don't read -user in any great detail these days.

Hi Graham & Max (and everyone),

I've been reading through chapter 11 on vertical spacing and getting
some vertical spacing examples ready for the manual.

And on reflection I think I've now figured out why it's been tricky
for me to get a good conceptual handle on vertical spacing. So I'd
like to bounce two ideas off of you guys and see if the way that I'm
thinking about the problem makes sense.

1. First, it seems that there are two *different* models for
controlling vertical spacing, which we might term "permissive" and
"strict", respectively. The first model corresponds roughly to chapers
11.3.1 and 11.3.3, and concerns overrides to VerticalAxisGroup and
settings in the paper block like

 \override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)

 \paper {
    between-system-space = 1.5\cm
    between-system-padding = #1

My analysis of this type of vertical spacing control is that what
we're really doing here is mostly setting *padding* in different
guises. We're not really saying "this staff should be so far away from
this other staff; and then this system should be so far away from this
other system further down the page". Instead we're saying "I want at
least this much padding between these staves or between these systems;
beyond those padding specifications, just let Lily figure out what to
do." So we might term this padding-based way of thinking about
vertical spacing something like "permissive". And an interesting
characteristic of this way of tweaking vertical spacing is that -- I
think -- you can *not* cause staves or systems to *overlap*. And this
relates to the primary disadvantage of using VerticalAxisGroup
overrides (and paper and margin adjustments) to control vertical
spacing: it can sometimes seem frustratingly difficult to draw staves
or systems close enough together.[1]

[1] Feel free to contradict me here; Is it possible to cause staff- or
system-overlaps using the commands given in 11.1 and 11.3? And maybe I
was alone in my experience of feeling frustrated trying to game
VerticalAxisGroup to move staves closer together.

The second model for controlling vertical spacing centers around
NonMusicalPaperColumn line-break-system-details, is very lightly
touched on in 11.4, and concerns commands like:

        #'((alignment-offsets . (0 -5 -20)))

       \overrideProperty #"Score.NonMusicalPaperColumn"
       #'line-break-system-details #'((Y-offset . 20)
(alignment-offsets . (0 -15)))

     #'((fixed-alignment-extra-space . 15))

These overrides to line-break-system-details might be termed the
"strict" (or "control freak") approach to vertical spacing (as opposed
to the traditional, more "permissive" approach) because what we're
doing with these settings is saying "I want control here; start this
staff at exactly this vertical offset and then start this staff at
this vertical offset and finally put this staff at this vertical
offset; the vertical spacing that results is whatever results and I
don't even care if there are overlaps; just do what I say; oh and same
with the systems, too". If we want to be precise, we might even point
out that these overrides to line-break-system-details don't so much
control the spacing *between* staves and systems so much as the exact
vertical *positions at which* staves and systems begin on the page
(with the vertical spacing just a side-effect of these explicit
positioning commands).

The advantages and disadvantages to the line-break-system-details
approach to vertical spacing are pretty much what we would expect
versus the VerticalAxisGroup approach: line-break-system-details makes
it extremely easy to draw staves and system quite close to each other
but does indeed allow for staff or system overprinting.

So, to sum up this first point: it seems to me that there are two
different approaches to controlling vertical spacing: by
VerticalAxisGroup + paper settings or else by
line-break-system-details. These two methods aren't so much at odds
with each other as in a kind of cascade relationship: you can make
whatever VerticalAxisGroup + paper settings you want, but any
overrides to line-break-system-dettails will have the last say. Seems
relatively important to keep the relationship between these
"permissive" and "strict" approaches in mind to see what your vertical
spacing tweaks are really doing in any one particular score.

(One last parenthetical distinction is this: overrides to
VerticalAxisGroup will almost always be context-global and appear in
the with-block whereas overrides to line-break-system-details will
almost always appear inter alia in the middle of music input just
after an explicit \break command. So this suggests that maybe
"permissive" and "strict" might also be termed "global" and "local"
... but that pair of terms seems much less descriptive somehow.)

Second major concept running through the vertical spacing stuff is the
PianoStaff / nonPianoStaff dichotomy.

There's another thread active right now on the topic of whether
PianoStaff really needs to be special with regards to vertical spacing
at all. But for now PianoStaff is special with regards to vertical
spacing. This complicates the vertical spacing docs simply because
PianoStaff overrides introduce a new set of properties, viz 11.3.2 and

   \override VerticalAlignment #'forced-distance = #7

  #'((fixed-alignment-extra-space . 15))

(IMO, possibly the best reason to remove the specialness of PianoStaff
with regards to fixed spacing is to clean up this part of the docs.)

So these are the two different dichotomies I see in the background of
any decisions (or docs) on vertical spacing: which "method" to use
(either "permissive" with VerticalAxisGroup or "strict" with
line-break-system-details) and then PianoStaff / nonPianoStaff. The
dichotomies are completely orthogonal: whether you decide to use
"permissive" or "strict" vertical spacing, you still must be
constantly aware of whether you're setting spacing for a PianoStaff or
not and select properties to override accordingly.

* * *

So I guess my point in all this is to see if anyone resonates with
this way of looking at user control of vertical spacing. Perhaps all
this is quite obvious, but it certainly took me a good while to figure


If we do like this way of thinking about vertical spacing then I'll
probably reorganize chapter 11 into three parts (permissive, strict,
two-pass); the section on permissive vertical spacing will cover
nonPianoStaff syntax first and then PianoStaff staff syntax second, as
will the section on strict vertical spacing.

Trevor Bača

reply via email to

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