Hello Àlex and Frederico,
the toc-markup is executed/expanded, when the markuplist with
table-of-contents is created. So \fromproperty #'header:title gets the
title from the bookpart containing the tocs.
To have a method, that sets the title and the toc item in one step,
there has to be another way to store title/toc information. One could
write a scheme-function to create the bookpart, which contains the title
*and* the \tocItem command.
I use my own functions, to collect music and process books. But it is a
bit too complex to explain in a few lines here.
Cheers,
Jan-Peter
On 07.05.2012 00:26, Federico Bruni wrote:
Il 04/05/2012 16:57, Álex R. Mosteo ha scritto:
I would also be interested on how to get automatically a ToC entry
for each
song, I'm currently doing it like this:
\tocItem \markup "Author - Song"
\bookpart {
\header { title="Song" subtitle="Author" }
which causes some nagging duplication. But this is secondary anyway.
Now I see why your title is not clickable: you must put \tocItem
inside \bookpart:
markuplist \table-of-contents
\pageBreak
\bookpart {
\header { title="Song" subtitle="Author" }
\tocItem \markup "Author - Song"
\score { c'1 }
}
I don't know how to get automatically the ToC entry from the header.
You probably have to fiddle with \fromproperty #'header:title
If you have a look at ly/toc-init.ly you see:
\paper {
tocItemMarkup = \markup \fill-line {
\fromproperty #'toc:text
\fromproperty #'toc:page
}
}
You should find a way to tell lilypond to replace the content of
#'toc:text
This content is defined inside \tocitem \markup { here }
But this doesn't print anything:
\markuplist \table-of-contents
\pageBreak
\bookpart {
\header { title="Song" subtitle="Author" }
\tocItem \markup \fill-line {
\fromproperty #'header:title
\fromproperty #'header:subtitle
}
\score { c'1 }
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user