]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/page-label.ly
90d844359bbddbf2396eaf356e5a24a00be04608
[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.14.2"
8
9 \header {
10   lsrtags = "spacing"
11
12 %% Translation of GIT committish: 28097cf54698db364afeb75658e4c8e0e0ccd716
13   texidocfr = "
14 Des références de page peuvent prendre place aussi bien dans la
15 musique qu'en tête de  partition, puis reprises dans un @emph{markup}.
16
17 "
18   doctitlefr = "Référencement de page"
19
20   texidoc = "
21 Page labels may be placed inside music or at top-level, and referred to
22 in markups.
23
24 "
25   doctitle = "Page label"
26 } % begin verbatim
27
28
29 #(set-default-paper-size "a6")
30
31 #(define-markup-command (toc-line layout props label text)
32   (symbol? markup?)
33   (interpret-markup layout props
34    (markup #:fill-line (text #:page-ref label "8" "?"))))
35
36 \book {
37   \markup \huge \fill-line { \null Title Page \null }
38
39   \pageBreak
40
41   \label #'toc
42   \markup \column {
43     \large \fill-line { \null Table of contents \null }
44     \toc-line #'toc "Table of contents"
45     \toc-line #'firstScore "First Score"
46     \toc-line #'markA "Mark A"
47     \toc-line #'markB "Mark B"
48     \toc-line #'markC "Mark C"
49     \toc-line #'unknown "Unknown label"
50   }
51
52   \pageBreak
53
54   \label #'firstScore
55   \score {
56     \new Staff \relative c' {
57       c2 c
58       \mark \markup {
59         A (page \concat { \page-ref #'markA "0" "?" ) }
60       } \label #'markA
61       c2 c
62       \pageBreak
63       \mark "B" \label #'markB
64       d2 d
65       d2 d
66       \once \override Score.RehearsalMark #'break-visibility =
67         #begin-of-line-invisible
68       \mark "C" \label #'markC
69     }
70     \header { piece = "First score" }
71   }
72 }