Previous: Reference to page numbers, Up: Titles and headers
A table of contents is included using the \markuplines \table-of-contents
command. The elements which should appear in the table of contents are
entered with the \tocItem
command, which may be used either at
top-level, or inside a music expression.
\markuplines \table-of-contents \pageBreak \tocItem \markup "First score" \score { { c' % ... \tocItem \markup "Some particular point in the first score" d' % ... } } \tocItem \markup "Second score" \score { { e' % ... } }
The markups which are used to format the table of contents are defined
in the \paper
block. The default ones are tocTitleMarkup
,
for formatting the title of the table, and tocItemMarkup
, for
formatting the toc elements, composed of the element title and page
number. These variables may be changed by the user:
\paper { %% Translate the toc title into French: tocTitleMarkup = \markup \huge \column { \fill-line { \null "Table des matières" \null } \hspace #1 } %% use larger font size tocItemMarkup = \markup \large \fill-line { \fromproperty #'toc:text \fromproperty #'toc:page } }
Note how the toc element text and page number are referred to in
the tocItemMarkup
definition.
New commands and markups may also be defined to build more elaborated table of contents:
\paper
block
In the following example, a new style is defined for entering act names in the table of contents of an opera:
\paper { tocActMarkup = \markup \large \column { \hspace #1 \fill-line { \null \italic \fromproperty #'toc:text \null } \hspace #1 } } tocAct = #(define-music-function (parser location text) (markup?) (add-toc-item! 'tocActMarkup text))
Init files: ../ly/toc-init.ly.
Diese Seite ist für LilyPond-2.11.58 (Entwicklungszweig).
Fehler bitte an http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs melden.
Ihre Vorschläge für die Dokumentation sind willkommen.
Andere Sprachen: español.