David Kastrup wrote: > > Michael Hendry <hendry.mich...@gmail.com> writes: > >> I've been experimenting with \tag, but it doesn't seem to be possible >> to use it in the \book {} context. > > Care to show your experiments? > > -- > David Kastrup > >
OK - here's a stripped-down version of a 32-bar standard: <code> \version "2.14.0" % TestTag % Michael Hendry % 20th Feb 2012 \header { title = "TestTag" composer = "Michael Hendry" enteredby="MDH" } \paper { paper-width = 21.0\cm paper-height = 29.7\cm top-margin = 0.0\cm bottom-margin = 0.0\cm left-margin = 1.0\cm right-margin = 1.0\cm ragged-last = ##f } TheHead = \relative c' { \clef "treble" \key d \minor \numericTimeSignature \time 4/4 \set Score.markFormatter = #format-mark-box-letters { s1*32 } } TheChords = \chords { d1:m9| s1*31| } % The score definition % Create four separate "books", each consisting of a lead sheet in a different key % (for Guitar, Concert, Bb and Eb instruments respectively). \book { \bookOutputName "TestTag (gtr)" \new Score << \transpose f' f' {\TheChords} \new Staff \repeat unfold 8 { s1 \noBreak s1 \noBreak s1 \noBreak s1 \break } \transpose f' f' {\TheHead} >> \header {piece = "Guitar"} } \tag #'ConcertBook { \book { \bookOutputName "TestTag (concert)" \new Score << \transpose f' f {\TheChords} \new Staff \repeat unfold 8 { s1 \noBreak s1 \noBreak s1 \noBreak s1 \break } \transpose f' f {\TheHead} >> \header {piece = "Concert Pitch"} } } \book { \bookOutputName "TestTag (tpt)" \new Score << \transpose f' g {\TheChords} \new Staff \repeat unfold 8 { s1 \noBreak s1 \noBreak s1 \noBreak s1 \break } \transpose f' g {\TheHead} >> \header {piece = "Trumpet"} } \book { \bookOutputName "TestTag (alto)" \new Score << \transpose f' d {\TheChords} \new Staff \repeat unfold 8 { s1 \noBreak s1 \noBreak s1 \noBreak s1 \break } \transpose f' d {\TheHead} >> \header {piece = "Alto Sax"} } </code> I thought I'd be able to tag the whole of the section that produces the Concert Pitch version of the piece, so that I could suppress its production using \removeWithTag #'ConcertBook, but Lilypond says: ... Layout output to `TestTag (gtr).ps'... Converting to `./TestTag (gtr).pdf'... score.ly:50:0: error: syntax error, unexpected \book \book { score.ly:60:8: error: syntax error, unexpected \header \header {piece = "Concert Pitch"} score.ly:49:0: error: errors found, ignoring music expression \tag #'ConcertBook { Interpreting music... [8] ... -- View this message in context: http://old.nabble.com/Is-there-an-equivalent-of--define-...--ifndef-...--endif-in-lilypond--tp33346188p33356488.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user