[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clickable table of contents
From: |
Federico Bruni |
Subject: |
Re: Clickable table of contents |
Date: |
Mon, 07 May 2012 00:26:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.3) Gecko/20120329 Icedove/10.0.3 |
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 }
}