lilypond-user
[Top][All Lists]
Advanced

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

Re: Controlling the very first bit of "preferatory" spacing?


From: Trevor Bača
Subject: Re: Controlling the very first bit of "preferatory" spacing?
Date: Thu, 15 Feb 2007 17:31:41 -0600

On 2/15/07, Maximilian Albert <address@hidden> wrote:
Trevor Bača wrote:

[... a very long and equally excellent description concerning the scope
of layout settings ...]

> In the end I think Han-Wen is right that the naming of \layout and
> \paper is unfortunate. All the settings in \layout and \paper are very
> clearly "page layout" settings, which clashes verbally with both the
> reserved words "\layout" and "\paper". Maybe the following two slight
> changes would help:
>
> 1. Rename \layout and \paper to \score-layout and \book-layout,
> respectively. This will force "single-score" users to be aware that
> there's this \book construct that they never explicitly use. BUT it
> has the tremendous improvement of explaining why some page layout
> settings live in one place and not the other.
>
> 2. Allow no \book-layout settings in a \score-layout block at all (as
> they are ineffectual anyway). This will make clear that there *is* a
> distinction between the two blocks, which is hidden now by the silent
> pass-overs.
>
> 3. Keep the allowable (scoped) positions of the newly renamed
> \score-layout and \book-layout exactly the same as they are now. That
> is, \score-layout will be able to live at any of three levels of scope
> -- inside a single score (affecting only that score), or inside a book
> (providing defaults for all scores living inside that book), or at
> toplevel (providing defaults for all scores living inside all books
> living inside that inputfile). Likewise, \book-layout would be able to
> live at any of two levels of scope -- inside a book (affecting just
> that one book), or at toplevel (providing defaults for all books
> living inside that inputfile).

This sounds like a great and truly helpful proposal. However, when I was
casually following the recent discussion about renaming the paper block
(being even much more ignorant about the issue than you were when
starting it) I thought the same about each and every one of the
successively refined proposals you made in that thread. ;) So I better
wait for the people with true insight to respond. But if it turns out to
be accepted by the developers then I strongly support it. (BTW, the same
is true of your "comment to the gurus" made earlier in your mail).

Ugh. I retract.

There's a very key point that's been wrong (still!) in my thinking on
this. I'm wrong about the levels of scope at which \layout and \paper
can currently live.

Here's what my thinking on scoping has been:

> 3. Keep the allowable (scoped) positions of the newly renamed
> \score-layout and \book-layout exactly the same as they are now. That
> is, \score-layout will be able to live at any of three levels of scope
> -- inside a single score (affecting only that score), or inside a book
> (providing defaults for all scores living inside that book), or at
> toplevel (providing defaults for all scores living inside all books
> living inside that inputfile). Likewise, \book-layout would be able to
> live at any of two levels of scope -- inside a book (affecting just
> that one book), or at toplevel (providing defaults for all books
> living inside that inputfile).

This isn't right. I was thinking that \layout blocks can live at any
of the three levels of scope below:

%%% THREE WRONG LEVELS OF SCOPE FOR \layout %%%

\layout { } "top-level \layout block"

\book {

  \layout { } "book-level \layout block"

 \score {
     ... music ...
    \layout { } "score-level \layout block"
  }

}

%%% END %%%


But "book-level" \layout blocks do not, in fact, exist. If you write a
book-level \layout block, lily will simply tell you to use a
(book-level) \paper block instead. For example:

%%% BEGIN %%%

\version "2.11.18"

\book {

  \layout { indent = #50 }

  \score {
     \repeat unfold 20 { c'4 c'4 c'4 c'4 }
     \layout { }
  }

  \score {
     \repeat unfold 20 { c'4 c'4 c'4 c'4 }
     \layout { }
  }

}

%%% END %%%

GNU LilyPond 2.11.18
Processing `0120.ly'
Parsing...
0120.ly:5:3: error: need \paper for paper block

  \layout { indent = #50 }


So damn.

Note, just for reference, that while a \paper block can *not* live at
score level, a \paper block can appear either at book level or top
level. So the correct assessment of the different levels of scope for
\layout and \paper blocks is given by this table.

                       \layout   \paper
top level         YES       YES
book level      NO         YES
score level     YES       NO


So nevermind. I've been trying to get to a point where we (and the
docs) can refer to "score layout" settings (like indent) and "book
layout" settings (like horizontal-shift) and not have settings
"migrating" between the \layout and \paper blocks. But trying to
produce two disjunt groups of settings gets confounded by the fact
that \paper not only holds settings that are *inherently* "book
layout" settings (like horizontal-shift) but also holds settings that
are inherently "score layout" settings (like indent) *when, and only
when, you want such settings to be global across multiple different
scores*.

Alas.

Time to write music instead of documentation and start that next piece
anyway ... ;-)


--
Trevor Bača
address@hidden

reply via email to

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