> No, top-level \paper sets a default for the \book level \paper. > top-level \layout sets a default for \score level \layout. > > \layout { X } > \paper { Y } > > mean > > $defaultlayout = \layout { \$defaultlayout X } $defaultpaper > = \layout { \$defaultpaper X } > > independenty of this > > \book { > \score { > \layout { > %% A > } > } > \paper { > %% B > } > } > > means > > \book { > \score { > \layout { \$defaultlayout > %% A > } > } > \paper { \$defaultpaper > %% B > } > } > > > If at run time, a score-level layout variable, such as > ragged-right, is looked up in %A. > If it's not found, it is looked > up in %B. If it's not found in %B, then it is assumed undefined. > > iow. There are 2 orthogonal mechanisms: > > - toplevel output-defs set defaults, which are copied > implicitly during parsing ( $defaultlayout / $defaultpaper ) > > - the \paper (book level) is parent to \layout (score > level), this parent relation is employed during formatting. >
Perhaps part of the confusion about the overall structure of LilyPond arises from the fact that sometimes (e.g. when identifiers are used), the order of statements matter; while at other times (e.g. %B being a place to lookup layout variables from %A) the order doesn't matter. In fact, in the lookup process you described above, there is no clue in the file that (i) %B is defined for a \book, (ii) the \score is contained in a \book, and (iii) the \layout of which %B is a part is in any sort of scope that includes the \score of which %A is a part. Carl Sorensen _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel