lilypond-user
[Top][All Lists]
Advanced

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

Re: Reorganizing the contents of the \paper block


From: Trevor Bača
Subject: Re: Reorganizing the contents of the \paper block
Date: Thu, 8 Feb 2007 11:26:10 -0600

On 2/8/07, Han-Wen Nienhuys <address@hidden> wrote:
Trevor Bača escreveu:

> Note that this is not a zero-code proposal, however: the idea of
> collapsing \paper and \layout is a pretty serious structural change,
> even though I think it makes extremely good sense.

It's actually not. Inside the code it's already implemented like that.
The difference between paper and layout is that paper has a

  is-paper = ##t

setting.

OK. So this means that if we build consensus for the "collapse \paper
and \layout into \settings" proposal (which we haven't done yet) then
at least the implementation will be straightforward. That's good.



What you're really losing is the ability to set a default for the \layout
block.

Oh I hope not.

If we do away with \paper and \layout and wind up instead with
\score-settings, \book-settings and \global-settings, then we should
be able to set a value in \book-settings which will then act as the
default for any values in \score-settings. This should preserve the
ability to set defaults, I believe. Ex:

%%% BEGIN %%%

\global-settings { }

\book {

 \book-settings { special-layout-setting = foo }

  \score {
      \new Staff { c'4 }
   }

  \score {
     \new Staff { c'4 }
     \score-settings { special-layout-setting = bar }
  }

}

%%% END %%%

In this example, we have two scores both living inside the same book.
Score 1 will inherit special-layout-setting as foo from
\book-settings. Score 2 likewise inherits special-layout-settings as
foo from \book-settings but then overrides the value of
special-layout-setting to bar in the \score-settings block.

So \book-settings gives us the ability to set defaults for all of our
different scores within a single book, which we are then free to
override with a \score-settings block inserted directly into any
particular score.

So we actually do preserve the ability to set (and overide) defaults, yes?



> Perhaps if we wind up wanting to collapse \layout and \paper, then we
> can simply rip \context blocks out and leave them as free-standing
> elements within a \score. But this is a sidenote until we consider
> whether collapsing \paper and \layout even makes sense.]

No, I think that in this case, the \context  definitions have to  go into
\settings as well, ie. in the \book wide settings.

OK.


--
Trevor Bača
address@hidden

reply via email to

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