Hi David,
to combine those two commands, you should wrap them in one music-function:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tocMark =
#(define-music-function (mup)(markup?)
#{
\tocItem $mup
\once \override Score.RehearsalMark.self-alignment-X = #LEFT
\mark $mup
#})
%%% test
\markup \left-column \table-of-contents
\relative {
bes'4 a c b \tocMark "Part 1"
bes4 a c b \tocMark "Part 2"
bes4 a c b \tocMark "Part 3"
bes4 a c b \tocMark "Part 4"
bes4 a c b
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
That way you can change the appearance of the toc-items and the
rehearsalmarks in one place.
HTH
Jan-Peter
Am 01.02.2017 um 22:03 schrieb David Sumbler:
I want to have a table of contents with the titles of sections of a
piece and the relevant page numbers.
In pieces I have set previously, the title of each movement was placed
centrally over the first line of the score/part for that movement. I
set the variable "piece" in the header for each movement, and defined
scoreTitleMarkup to get the result I wanted.
The piece I am currently working on is a single score, but with 6 songs
which follow each other more or less continuously. I want the title of
each song to appear above the top line of the score at the start of
each song; in most cases this will probably not be at the start of a
line.
I thought that I could do this by inserting the title as a text mark,
e.g. \mark \markup { \fontsize #2 \bold "Title of song" }, with an
override to left-align the title.
This works as intended, but if I then put \tocItem before \mark
Lilypond complains that \tocItem has to be followed by markup; if I put
\tocItem after \mark Lilypond complains that \mark has to be followed
by markup.
Is there a way this can be made to work? Or how else might I get the
desired result?
David
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user