]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/page-label.ly
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / snippets / page-label.ly
1 %% Do not edit this file; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% This file is in the public domain.
4 \version "2.13.16"
5
6 \header {
7   lsrtags = "spacing"
8
9   texidoc = "
10 Page labels may be placed inside music or at top-level, and referred to
11 in markups.
12
13 "
14   doctitle = "Page label"
15 } % begin verbatim
16
17 #(set-default-paper-size "a6")
18
19 #(define-markup-command (toc-line layout props label text)
20   (symbol? markup?)
21   (interpret-markup layout props
22    (markup #:fill-line (text #:page-ref label "8" "?"))))
23
24 \book {
25   \markup \huge \fill-line { \null Title Page \null }
26
27   \pageBreak
28
29   \label #'toc
30   \markup \column {
31     \large \fill-line { \null Table of contents \null }
32     \toc-line #'toc "Table of contents"
33     \toc-line #'firstScore "First Score"
34     \toc-line #'markA "Mark A"
35     \toc-line #'markB "Mark B"
36     \toc-line #'markC "Mark C"
37     \toc-line #'unknown "Unknown label"
38   }
39
40   \pageBreak
41
42   \label #'firstScore
43   \score {
44     \new Staff \relative c' {
45       c2 c
46       \mark \markup {
47         A (page \concat { \page-ref #'markA "0" "?" ) }
48       } \label #'markA
49       c2 c
50       \pageBreak
51       \mark "B" \label #'markB
52       d2 d
53       d2 d
54       \once \override Score.RehearsalMark #'break-visibility =
55         #begin-of-line-invisible
56       \mark "C" \label #'markC
57     }
58     \header { piece = "First score" }
59   }
60 }