[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Reorganizing the contents of the \paper block
From: |
Carl D. Sorensen |
Subject: |
RE: Reorganizing the contents of the \paper block |
Date: |
Fri, 9 Feb 2007 07:48:23 -0700 |
> 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
- Re: Reorganizing the contents of the \paper block, (continued)
- Re: Reorganizing the contents of the \paper block, Trevor Bača, 2007/02/07
- Re: Reorganizing the contents of the \paper block, Han-Wen Nienhuys, 2007/02/08
- RE: Reorganizing the contents of the \paper block, Carl D. Sorensen, 2007/02/08
- Re: Reorganizing the contents of the \paper block, Mats Bengtsson, 2007/02/08
- Message not available
- Re: Reorganizing the contents of the \paper block, Geoff Horton, 2007/02/08
- Re: Reorganizing the contents of the \paper block, Trevor Bača, 2007/02/08
- Re: Reorganizing the contents of the \paper block, Han-Wen Nienhuys, 2007/02/08
- Re: Reorganizing the contents of the \paper block, Trevor Bača, 2007/02/08
- Re: Reorganizing the contents of the \paper block, Trevor Bača, 2007/02/08
- Re: Reorganizing the contents of the \paper block, Han-Wen Nienhuys, 2007/02/08
- RE: Reorganizing the contents of the \paper block,
Carl D. Sorensen <=
- Message not available
- Re: Reorganizing the contents of the \paper block, Graham Percival, 2007/02/07
- RE: Reorganizing the contents of the \paper block, Carl D. Sorensen, 2007/02/07
- Re: Reorganizing the contents of the \paper block, Trevor Bača, 2007/02/07
- Re: Reorganizing the contents of the \paper block, Trevor Bača, 2007/02/07
- Re: Reorganizing the contents of the \paper block, Han-Wen Nienhuys, 2007/02/07
- Re: Reorganizing the contents of the \paper block, Han-Wen Nienhuys, 2007/02/07
RE: Reorganizing the contents of the \paper block, Carl D. Sorensen, 2007/02/09