[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reorganizing the contents of the \paper block
From: |
Han-Wen Nienhuys |
Subject: |
Re: Reorganizing the contents of the \paper block |
Date: |
Fri, 09 Feb 2007 01:04:52 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20070130) |
Trevor Bača escreveu:
>> > So this means there are really three levels of scope at which these
>> > settings can be made ...
>> >
>> > 1. at score level (which is most specific)
>> > 2. at book level (which is intermediate), and
>> > 3. at top level
>> >
>> > ... as reflected in the following example:
>> >
>> > %%% BEGIN 3-LEVELS OF SCOPE %%%
>> >
>> > \version "2.11.16"
>> >
>> > \paper { indent = #100 }
>> >
>> > \book {
>> >
>> > \paper { indent = #50 }
>> >
>> > \score {
>> > \new Staff { c'1 }
>> > \layout { indent = #0 }
>> > }
>> >
>> > }
>> >
>> > %%% END %%%
>> >
>> > If I comment out the score-level indent, then the book-level indent
>> > will take over. If I comment out both the score-level and book-level
>> > indents, then the top-level indent will take over.
>>
>> No, the \book level indent overwrites the toplevel
>>
>> \paper { indent = #75 }
>> \book {
>> \paper { indent = #50 }
>> }
>>
>> really maens
>>
>> "$defaultpaperblock" = \paper { \$defaultpaperblock indent = #75 }
>> \book {
>> \paper { \$defaultpaperblock indent = #50 }
>> }
>
> I think we're saying the same thing. To make sure:
>
> 1. score-level settings will overwrite book-level settings
> 2. book-level settings will overwrite top-level settings
>
> Or, put another way:
>
> 1. a top-level setting is the most general, broadly scoped type of setting
> 2. a book-level setting is more specific and more narrowly scope
> 3. and a score-level setting is the most specific, most narrowly scope
> type of setting of the three types listed here
>
> Correct?
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.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
LilyPond Software Design
-- Code for Music Notation
http://www.lilypond-design.com
- Re: Reorganizing the contents of the \paper block, (continued)
- 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 <=
- RE: Reorganizing the contents of the \paper block, Carl D. Sorensen, 2007/02/09
- 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