lilypond-user
[Top][All Lists]
Advanced

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

Re: Scoped variables


From: Timothy Lanfear
Subject: Re: Scoped variables
Date: Mon, 4 Nov 2019 22:04:04 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 04/11/2019 19:57, David Wright wrote:
Well, the NR §3.1.5 does say:
    "A .ly file may contain any number of toplevel expressions, where a
     toplevel expression is one of the following: …

     • A \score block. This score will be collected with other toplevel
       scores, and combined as a single \book. …

     • A \book block logically combines multiple movements (i.e.,
       multiple \score blocks) in one document. If there are a number
       of \scores, one output file will be created for each \book block,
       in which all corresponding movements are concatenated."

So I assume you are depending on the first bullet, the implicit \book
block, to concatenate the scores. (I'm not sure what the \bookpart buys
you apart from a page-throw. Try commenting out your \bookpart lines.)

The NR goes on:

      "The only reason to explicitly specify \book blocks in a .ly file
       is if you wish to create multiple output files from a single
       input file."

That's what I use \book sections for, so the my output files can be
explicitly named (with \bookOutputSuffix) in a more systematic manner.
Editing your MWE with s/\bookpart/\book/ would demonstrate.
(I've never used bookparts myself.)

My surprise was caused by the difference in behaviour between an explicit \book block (variables cannot be redefined within a \book) and the implicit book created when there is no explicit \book statement -- see NR 3.1.1 on the implicit \book block

--

Timothy Lanfear, Bristol, UK.




reply via email to

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