\version "2.11.46" \header { title = "Test title " } %%% Nicolas' solution needs the parser: % #(define-public (add-toc-item parser markup-symbol text) % (collect-music-for-book parser % (add-toc-item! markup-symbol text))) %%% How do I get the parser from inside a markup command? #(define-markup-command (piece-title layout props title) (markup?) (add-toc-item! 'tocItemMarkup title) (interpret-markup layout props (markup #:bold title)) ) \paper { % Doesn't work... scoreTitleMarkup = \markup \piece-title \fromproperty #'header:piece } \markuplines \table-of-contents \pageBreak % Doesn't work... \markup\piece-title "Something" % Works: #(add-toc-item! 'tocItemMarkup "Irgendwas") \score { \relative c'' {c4 d c d} \header { piece = "Nr. 1 - Text" } } \score { \relative c'' {c4 d c d} \header { piece = "Nr. 2 - Was anderes" } } %%%%%%%%% % Problem with adding a label inside a markup: \markup { Some interesting point \label #'refA. } \pageBreak \markup { As mentioned on page \page-ref #'refB "0" "?", there is something interesting. }