]> git.donarmstrong.com Git - lilypond.git/blob - ly/paper-defaults-init.ly
Organize paper-defaults-init.ly.
[lilypond.git] / ly / paper-defaults-init.ly
1 %%%% This file is part of LilyPond, the GNU music typesetter.
2 %%%%
3 %%%% Copyright (C) 2004--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 %%%%                          Jan Nieuwenhuizen <janneke@gnu.org>
5 %%%%                          Neil Puttock <n.puttock@gmail.com>
6 %%%%
7 %%%% LilyPond is free software: you can redistribute it and/or modify
8 %%%% it under the terms of the GNU General Public License as published by
9 %%%% the Free Software Foundation, either version 3 of the License, or
10 %%%% (at your option) any later version.
11 %%%%
12 %%%% LilyPond is distributed in the hope that it will be useful,
13 %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
14 %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 %%%% GNU General Public License for more details.
16 %%%%
17 %%%% You should have received a copy of the GNU General Public License
18 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
19
20 \version "2.12.0"
21
22 \paper {
23   #(set-paper-dimension-variables (current-module))
24
25   %%% WARNING
26   %%%
27   %%% If you add any new dimensions, don't forget to update
28   %%% the dimension-variables variable.  See paper.scm.
29
30   unit = #(ly:unit)
31   mm = 1.0
32   in = 25.4
33   pt = #(/ in 72.27)
34   cm = #(* 10 mm)
35
36   % 20pt staff, 5 pt = 1.75 mm
37   output-scale = #1.7573
38
39   %% ugh. hard coded?
40   #(layout-set-absolute-staff-size (* 20.0 pt))
41
42
43   %% Automatic scaling to paper size:
44   %%
45   %% Margins, indents, and offsets marked "scaled to paper size"
46   %% below apply to the default paper format given by
47   %% (ly:get-option 'paper-size) and are scaled accordingly for
48   %% other formats.
49
50
51   %%
52   %% Fixed vertical spacing
53   %%
54   top-margin-default = 5\mm     % scaled to paper-size
55   bottom-margin-default = 6\mm  % scaled to paper-size
56   ragged-bottom = ##f
57   ragged-last-bottom = ##t  % best for shorter scores
58
59
60   %%
61   %% Flexible vertical spacing
62   %%
63   %% Note: these are not scaled; they are in staff-spaces.
64   system-system-spacing = #'((space . 12) (minimum-distance . 8) (padding . 1) (stretchability . 60))
65   score-system-spacing = #'((space . 14) (minimum-distance . 8) (padding . 1) (stretchability . 120))
66   markup-system-spacing = #'((space . 5) (padding . 0.5) (stretchability . 30))
67   score-markup-spacing = #'((space . 12) (padding . 0.5) (stretchability . 60))
68   markup-markup-spacing = #'((space . 1) (padding . 0.5))
69   top-system-spacing = #'((space . 1) (padding . 1) (minimum-distance . 0))
70   top-markup-spacing = #'((space . 0) (padding . 1) (minimum-distance . 0))
71   last-bottom-spacing = #'((space . 1) (padding . 1) (minimum-distance . 0) (stretchability . 30))
72
73
74   %%
75   %% Widths and (horizontal) margins
76   %%
77   left-margin-default = 10\mm   % scaled to paper-size
78   right-margin-default = 10\mm  % scaled to paper-size
79   check-consistency = ##t
80
81
82   %%
83   %% Two-sided mode
84   %%
85   two-sided = ##f
86   inner-margin-default = 10\mm   % scaled to paper-size
87   outer-margin-default = 20\mm   % scaled to paper-size
88   binding-offset-default = 0\mm  % scaled to paper-size
89
90
91   %%
92   %% Indents
93   %%
94   indent-default = 15\mm       % scaled to paper-size
95   short-indent-default = 0\mm  % scaled to paper-size
96
97
98   %%
99   %% Page breaking
100   %%
101   blank-after-score-page-force = 2
102   blank-last-page-force = 0
103   blank-page-force = 5
104   page-breaking = #ly:optimal-breaking
105
106
107   %%
108   %% Page numbering
109   %%
110   first-page-number = #1
111   print-first-page-number = ##f
112   print-page-number = ##t
113
114
115   %%
116   %% Headers, footers, and titles
117   %%
118   #(define make-header (marked-up-headfoot 'oddHeaderMarkup 'evenHeaderMarkup))
119   #(define make-footer (marked-up-headfoot 'oddFooterMarkup 'evenFooterMarkup))
120
121   #(define-public book-title (marked-up-title 'bookTitleMarkup))
122   #(define-public score-title (marked-up-title 'scoreTitleMarkup))
123   #(define-public score-title-properties
124      '((is-title . #t)
125        (is-book-title . #f)))
126   #(define-public book-title-properties
127      '((is-title . #t)
128        (is-book-title . #t)))
129
130   \include "titling-init.ly"
131
132
133   %%
134   %% Fonts
135   %%
136   #(define font-defaults
137     '((font-family . feta) (font-encoding . fetaMusic)))
138
139   % `latin1' is a dummy value for Pango fonts
140   #(define text-font-defaults
141      `((font-encoding . latin1)
142        (baseline-skip . 3)
143        (word-space . 0.6)))
144
145 }