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