[Top][All Lists]

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

Re: Yet another vertical spacing question

From: Trevor Baca
Subject: Re: Yet another vertical spacing question
Date: Wed, 3 Aug 2005 06:37:14 -0500

Mats Bengtsson wrote:
> > See
> >
> >   /Mats
> >

Han-Wen Nienhuys wrote: 
> Ah,
> but this is a bug, really. Only the staves should be kept on the first
> system, but not the lyrics lines and chord names.

Here's the executive summary for anybody who didn't have time to
follow the link: Got unnecessary space for lyrics (or chords or
figured bass) on the first system of your score? Use this bit provided
by Mats somewhere at the beginning of the score:

  \override Score.RemoveEmptyVerticalGroup #'remove-first = ##t

Mats's suggestion works perfectly.

I wasn't familiar with tweaking the RemoveEmptyVerticalGroup layout
object until this example, so this was good practice for me. Gurus
should stop reading now, but for any beginners needing or wanting to
tweak, I think the relevant observations are:

1. the process starts with the Hara_kara_engraver. I'm not exactly
sure what the Hara_kiri_engraver does, but I think its primary purpose
is to get rid of empty stuff that isn't interesting, hence the name,
(though the program reference says "Like Axis_group_engraver, but make
a hara-kiri spanner, and add interesting items (ie. note heads, lyric
syllables and normal rests)" which kinda sounds the opposite).

2. Either way, the Hara_kiri_engraver travels the ChordNames,
FiguredBass and Lyrics contexts, and writes out
RemoveEmptyVerticalGroup layout objects.

3. If you scan the prog ref for the RemoveEmptyVerticalGroup layout
object, you'll find 3 standard settings (X- and Y-offset-callbacks,
axes) and also find that the RemoveEmptyVerticalGroup layout object
implements half a dozen different interfaces, including the

4. The hara-kiri-group-interface provides exactly 1 user-settable
property to those objects that implement the interface, namely,
"remove-first", which I'm pretty sure sets to ##f by default.

5. So now, Mats's tip:

  \override Score.RemoveEmptyVerticalGroup #'remove-first = ##t

says, I believe, "find all the RemoveEmptyVerticalGroup layout objects
all over the Score and change the remove-first attribute of all those
RemoveEmptyVerticalGroup layout objects to ##t (allowed for by the
hara-kiri interface)", which means that empty lyrics (also chords and
figured bass) will NOT print on the first system.

Note, too, that you only have to execute this override for the first
system because, by default, the RemoveEmptyVerticalGroup layout object
will remove empty lyrics (also chords and figured bass) in systems
after the first.

Now it also makes sense why Han-Wan labels this one a bug: while empty
*staves* on the first system of the score are customary, empty lyrics
(chords, figured bass) are not.


reply via email to

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