]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/page-label.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / snippets / page-label.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.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.18.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 #(set-default-paper-size "a6")
21
22 #(define-markup-command (toc-line layout props label text)
23   (symbol? markup?)
24   (interpret-markup layout props
25    (markup #:fill-line (text #:page-ref label "8" "?"))))
26
27 \book {
28   \markup \huge \fill-line { \null Title Page \null }
29
30   \pageBreak
31
32   \label #'toc
33   \markup \column {
34     \large \fill-line { \null Table of contents \null }
35     \toc-line #'toc "Table of contents"
36     \toc-line #'firstScore "First Score"
37     \toc-line #'markA "Mark A"
38     \toc-line #'markB "Mark B"
39     \toc-line #'markC "Mark C"
40     \toc-line #'unknown "Unknown label"
41   }
42
43   \pageBreak
44
45   \label #'firstScore
46   \score {
47     \new Staff \relative c' {
48       c2 c
49       \mark \markup {
50         A (page \concat { \page-ref #'markA "0" "?" ) }
51       } \label #'markA
52       c2 c
53       \pageBreak
54       \mark "B" \label #'markB
55       d2 d
56       d2 d
57       \once \override Score.RehearsalMark.break-visibility =
58         #begin-of-line-invisible
59       \mark "C" \label #'markC
60     }
61     \header { piece = "First score" }
62   }
63 }