File: toc-structured.ly

package info (click to toggle)
lilypond 2.24.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 70,352 kB
  • sloc: cpp: 87,962; lisp: 43,344; xml: 31,269; python: 22,974; sh: 4,090; yacc: 4,080; perl: 2,873; lex: 1,387; makefile: 76
file content (47 lines) | stat: -rw-r--r-- 1,160 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
\version "2.21.2"

\header {
  texidoc = "TOC labels can be explicitly specified,
and structured hierarchically; they appear in PDF
bookmarks as well (the `table of contents' panel
in PDF viewers).  PDF bookmarks are reordered so as
to not `go back in time'."
}

#(set-default-paper-size "a8" 'landscape)

\book {
  \header { tagline = ##f }
  \markuplist \table-of-contents
  \pageBreak

  \tocItem \markup \underline "Introduction"
  \markup \bold \fill-line { "Hello World." }
  \pageBreak
  \tocItem parentI \markup "First-level I."

  \score {
    {
      c'1 \pageBreak
      \tocItem parentI.pIchildI \markup "Second level I. a"
      d'
      \mark \default \tocItem pIchildI.pIcIgrandchildI \markup "Third level I. a, 1"
      e'
      \pageBreak
    }
  }
  \pageBreak
  \tocItem parentII \markup "First-level II."
  \score {
    <<
      \new Devnull {
        R R \pageBreak
        \tocItem parentII.pIIchildI \markup "The end"
        R \bar "|."
      }
      %% This will appear in the TOC after the previous entry,
      %% but before it in the PDF outline.
      { e' \tocItem parentII.pIIchildII \markup "Before the end" s f' }
    >>
  }
}