Re: \book and \bookpart as output defs?
David Kastrup <[email protected]>
| Newsgroups | gmane.comp.gnu.lilypond.devel |
|---|---|
| Message-ID | <[email protected]> |
Simon Albrecht <[email protected]> writes: > On 08/08/2026 13:50, David Kastrup wrote: >>> On 07/08/2026 15:45, David Kastrup wrote: >>>> bookA = \book { ... } >>>> bookB = \bookpart { ... } >>>> >>>> \book { \bookA ... } >>>> >>>> which would mean to create a book as an amended copy of \bookA >> bookA can just contain common headers and possibly a common introduction >> for a number of books (like solfeges for soprano, alto, tenor, bass). > > Then why would it be enclosed in \book already? Because there is nothing else you can enclose it with? > Surely the same could be achieved with smart use of variables and/or > nesting includes. That would require stuff to be included several times, or a whole block of stuff to get copy&pasted. > I think I’m beginning to understand where you’re coming from. Is it > that \book would work more like an output definition akin to \layout { > \context {} } that can be defined once and modified any number of > times? I have never seen it that way. Unlike contexts, \book{} > environments aren’t named per se, are they? Context definitions aren't "named per se" either. blabla = \context { \consists "Note_engraver" } is legal syntax and does not establish a name for the context definition. The actual establishment is when there is a \name ... in the context definition. That is why we can write \context { \Staff \name InternalGregorianStaff \denies Voice % derived contexts will accept specific voices ... in order to derive a context definition for "InternalGregorianStaff" by copying and modifying the context definition of "Staff". -- David Kastrup