another typo
[lilypond.git] / ly / titling-init.ly
blobbf4c147e84b157909d9f64d12e4e4c956a63bc98
1 \version "2.10.0"
3 slashSeparator = \markup {
4 \hcenter
5 \vcenter \combine
6 \beam #2.0 #0.5 #0.48
7 \raise #0.7 \beam #2.0 #0.5 #0.48
10 tagline = \markup {
11 \with-url
13 %% todo: lilypond.org/music-engraving
14 #"http://lilypond.org/web/"
15 \line {
17 %% 2014 = em dash.
19 #(ly:export
20 (format "Music engraving by LilyPond ~a~awww.lilypond.org"
21 (lilypond-version)
22 (ly:wide-char->utf-8 #x2014)
27 #(define (print-all-headers layout props arg)
28 (if (eq? (ly:output-def-lookup layout 'printallheaders) #t)
29 (interpret-markup layout props arg)
30 empty-stencil))
32 bookTitleMarkup = \markup {
33 \override #'(baseline-skip . 3.5)
34 \column {
35 \fill-line { \fromproperty #'header:dedication }
36 \override #'(baseline-skip . 3.5)
37 \column {
38 \huge \bigger \bold
39 \fill-line {
40 \bigger \fromproperty #'header:title
42 \fill-line {
43 \large \smaller \bold
44 \bigger \fromproperty #'header:subtitle
46 \fill-line {
47 \smaller \bold
48 \fromproperty #'header:subsubtitle
50 \fill-line {
51 \fromproperty #'header:poet
52 { \large \bold \fromproperty #'header:instrument }
53 \fromproperty #'header:composer
55 \fill-line {
56 \fromproperty #'header:meter
57 \fromproperty #'header:arranger
63 scoreTitleMarkup = \markup { \column {
64 \on-the-fly #print-all-headers { \bookTitleMarkup \hspace #1 }
65 \fill-line {
66 \fromproperty #'header:piece
67 \fromproperty #'header:opus
72 #(define (first-page layout props arg)
73 (if (= (chain-assoc-get 'page:page-number props -1)
74 (ly:output-def-lookup layout 'first-page-number))
75 (interpret-markup layout props arg)
76 empty-stencil))
78 #(define (last-page layout props arg)
79 (if (chain-assoc-get 'page:last? props #f)
80 (interpret-markup layout props arg)
81 empty-stencil))
83 #(define (not-first-page layout props arg)
84 (if (not (= (chain-assoc-get 'page:page-number props -1)
85 (ly:output-def-lookup layout 'first-page-number)))
86 (interpret-markup layout props arg)
87 empty-stencil))
89 %% unused
90 #(define (not-single-page layout props arg)
91 (if (not (and (= (chain-assoc-get 'page:page-number props -1)
92 (ly:output-def-lookup layout 'first-page-number))
93 (chain-assoc-get 'page:last? props -1)))
94 (interpret-markup layout props arg)
95 empty-stencil))
97 #(define (create-page-number-stencil layout props arg)
98 (if (eq? (ly:output-def-lookup layout 'print-page-number) #t)
99 (interpret-markup layout props arg)
100 empty-stencil))
102 #(define (print-page-number-check-first layout props arg)
103 (if (or (not (= (chain-assoc-get 'page:page-number props -1)
104 (ly:output-def-lookup layout 'first-page-number)))
105 (eq? (ly:output-def-lookup layout 'print-first-page-number) #t))
106 (create-page-number-stencil layout props arg)
107 empty-stencil))
109 oddHeaderMarkup = \markup
110 \fill-line {
111 %% force the header to take some space, otherwise the
112 %% page layout becomes a complete mess.
114 \on-the-fly #not-first-page \fromproperty #'header:instrument
115 \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
118 evenHeaderMarkup = \markup
119 \fill-line {
120 \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
121 \on-the-fly #not-first-page \fromproperty #'header:instrument
125 oddFooterMarkup = \markup {
126 \column {
127 \fill-line {
128 %% Copyright header field only on first page.
129 \on-the-fly #first-page \fromproperty #'header:copyright
131 \fill-line {
132 %% Tagline header field only on last page.
133 \on-the-fly #last-page \fromproperty #'header:tagline