Yes. The actual code on which the example is based is at https://github.com/nwhetsell/horn-sheet-music/blob/e9f4f5a0569962719dcf6602718400c256e8c7d3/kopprasch-opus-6-60-studies-for-low-horn/main.ly
Hopefully this clarifies why I’m handling score headers in Scheme (specifically, some header variables are set conditionally). > On Feb 2, 2022, at 2:14 AM, Lukas-Fabian Moser <l...@gmx.de> wrote: > > Hi Nate, > > Am 01.02.22 um 22:11 schrieb Nate Whetsell: >> I’m trying to add PDF bookmarks (to display in PDF readers) to a collection >> of studies. I’m having three issues: >> >> 1. If several studies appear on the same page, the bookmarks appear in >> reverse order. >> >> 2. The bookmarks seem to navigate to the *page* on which a study appears, >> not the study itself. >> >> 3. It doesn’t seem to be possible to add PDF bookmarks without also using >> `\markuplist \table-of-contents` to add a table of content. >> >> Below is an example illustrating the issues I’m having. Is there a way to >> create PDF bookmarks without using `\markuplist \table-of-contents`, have >> them appear in the expected order, and have them navigate to the expected >> position? > Forgive me for barging in without having something to contribute to your > actual question: >> ``` >> \version "2.22.0" >> >> \book { >> \markuplist \table-of-contents >> >> #(do ((study-number 1 (1+ study-number))) >> ((> study-number 15)) >> (let ((header (make-module))) >> (module-define! header 'piece (number->string study-number)) >> (let* ( >> (score (scorify-music #{ >> \new Staff << >> \tocItem \markup { #(number->string study-number) } >> \new Voice { c' } >> >> >> #}))) >> (begin >> (ly:score-set-header! score header) >> (add-score score))))) >> } >> ``` > > Are you aware that you can do almost all of this using LilyPond syntax? > > \version "2.22.0" > > \book { > \markuplist \table-of-contents > > #(do ((study-number 1 (1+ study-number))) > ((> study-number 15)) > (add-score > #{ > \score { > \header { > piece = #(number->string study-number) > } > \new Staff << > \tocItem \markup { #(number->string study-number) } > \new Voice { c' } > >> > } > #})) > } > > Lukas >