* lily/breathing-sign.cc (railtracks): another caesura.
[lilypond.git] / tex / titledefs.tex
blob9894742ba4cba42386f790fb0f038e988fb1d5a2
1 % titledefs.tex
3 % LilyPond titling for LaTeX
5 % Note:
7 % Defining a value, but leaving it empty:
8 % \def\lilypondfoo{}
9 % makes LaTeX break on the \\ in:
10 % \ifx\lilypondfoo\undefined\else{\lilypondfoo\\}\fi
12 \edef\titledefsELC{\the\endlinechar}%
13 \endlinechar -1\relax
15 % The feta characters for use in titles
16 \input feta20.tex
18 \font\fetasixteen=feta16
19 \def\fetafont{\fetasixteen}
20 \def\fetachar#1{\hbox{\fetasixteen#1}}
22 \def\makelilypondtitle{
23 \begin{center}
24 \ifx\lilyponddedication\undefined
25 \else
26 {\normalfont\lilyponddedication\\}
27 \fi
29 \bfseries
31 \ifx\lilypondtitle\undefined
32 \else
33 {\huge\lilypondtitle\\}
34 \fi
36 \ifx\lilypondsubtitle\undefined
37 \else
38 {\Large\lilypondsubtitle\\}
39 \fi
41 \ifx\lilypondsubsubtitle\undefined
42 \else
43 {\large\lilypondsubsubtitle\\}
44 \fi
45 \end{center}
47 \bigskip
49 \begin{minipage}[t]{0.45\textwidth}
50 \ifx\lilypondpoet\undefined
51 \else
52 {\lilypondpoet\\}
53 \fi
55 \ifx\lilypondtexttranslator\undefined
56 \else
57 {\lilypondtexttranslator\\}
58 \fi
60 \ifx\lilypondmeter\undefined
61 \else
62 {\lilypondmeter\\}
63 \fi
64 \end{minipage}
66 \hspace*{\fill}
68 \begin{minipage}[t]{0.45\textwidth}
69 \begin{flushright}
70 \ifx\lilypondcomposer\undefined
71 \else
72 {\large\normalfont\scshape\lilypondcomposer\\}
73 \fi
75 \ifx\lilypondopus\undefined
76 \else
77 {\lilypondopus\\}
78 \fi
80 \ifx\lilypondarranger\undefined
81 \else
82 {\lilypondarranger\\}
83 \fi
84 \end{flushright}
85 \end{minipage}
87 \par
89 \ifx\lilypondinstrument\undefined
90 \else
91 {\center{\large\lilypondinstrument}
92 \par}
93 \fi
95 \ifx\lilypondpiece\undefined
96 \else
97 {\flushleft{\large\normalfont\scshape\lilypondpiece}
98 \par}
99 \fi
101 % \leavevmode
103 \global\let\lilypondopus\relax
104 \global\let\lilypondpiece\relax
105 \global\let\mustmakelilypondtitle\undefined
108 \def\makelilypondpiecetitle{
109 \bigskip\myfilbreak
111 \ifx\lilypondopus\undefined
112 \else
113 {\flushright{\lilypondopus}
114 \par}
117 \ifx\lilypondpiece\undefined
118 \else
119 {\flushleft{\large\normalfont\scshape\lilypondpiece}
120 \par}
123 \nopagebreak
125 \global\let\lilypondopus\relax
126 \global\let\lilypondpiece\relax
127 \global\let\mustmakelilypondpiecetitle\undefined
130 % header -- head ?
131 % these names can't be changed: they're used in mutopia headers
133 \def\theheader{
134 \ifx\lilypondhead\undefined
135 \else
136 \lilypondhead
140 \def\thefooter{
141 \ifx\lilypondfooter\undefined
142 \else
143 \lilypondfooter
147 \def\makelilypondtagline{
148 \ifx\undefined\lilypondtagline
149 \else
150 \lilypondtagline
154 \def\thecopyright{
155 \ifx\lilypondcopyright\undefined
156 \thefooter
157 \else
158 \lilypondcopyright
162 % Moved header and footer definitions here from the ly2dvi script.
163 % Separate page styles for first, last and ordinary (plain) pages.
165 \makeatletter
167 \renewcommand{\ps@plain}{
168 \renewcommand{\@oddfoot}{
169 \parbox{\textwidth}{\mbox{}\thefooter}}
170 \renewcommand{\@evenfoot}{
171 \@oddfoot}
172 \renewcommand{\@evenhead}{
173 \hbox to \textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
174 \renewcommand{\@oddhead}{
175 \hbox to \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}
178 \newcommand{\ps@firstpage}{
179 \renewcommand{\@oddfoot}{
180 \parbox{\textwidth}{\mbox{}\thecopyright}}
181 \renewcommand{\@evenfoot}{
182 \@oddfoot}
185 \newcommand{\ps@lastpage}{
186 \renewcommand{\@oddfoot}{
187 \parbox{\textwidth}{\mbox{}\makelilypondtagline}}
188 \renewcommand{\@evenfoot}{
189 \@oddfoot}
192 \makeatother
194 \endlinechar \titledefsELC
195 \endinput