lilypond-user
[Top][All Lists]
Advanced

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

Re: translator again


From: Mats Bengtsson
Subject: Re: translator again
Date: Fri, 27 Sep 2002 11:38:31 +0200

The example below would have worked for most other combination
of  \*Context identifiers. The problem here is that
\HaraKiriStaffContext is a modified version of the standard
\StaffContext. When you say \translator{\HaraKiriStaffContext}, 
you tell Lilypond what to do with all contexts of the type Staff
but when you later say  \translator{\StaffContext}, you tell
Lilypond to do something else with all Staff contexts.

The correct solution is
\paper{
  \translator{
    \HaraKiriStaffContext
    minimumVerticalExtent = #'(-4 . 4)
  }
}

To understand how this works, take a look at the initialization
file ly/engraver-init.ly and remember that 
xxxContext = \translator{
  ...
}
only defines a "variable" called \xxxContext but Lilypond will 
not use the translator until you have done
\paper{
  \translator{
     \xxxContext
  }
}
as is done in ly/params-init.ly which in turn is included from
ly/paperNN.ly

   /Mats

> If I do:
> 
> \paper {
>       papersize = "a4"
>       \translator{
>               \HaraKiriStaffContext
>               }
> \translator{ \StaffContext minimumVerticalExtent = #'(-4 . 4) }
>       }
> 
> The staff lines do close up, but I get an extra staff line added to the
> bottom of the score.  I also don't get any more systems on a page, although
> it looks as though there should be plenty of room.
> 
> David Bobroff
> 
> 
> _______________________________________________
> Lilypond-user mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/lilypond-user






reply via email to

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