2 %% LilyPond titling for LaTeX
6 %% Defining a value, but leaving it empty:
8 %% makes LaTeX break on the \\ in:
9 %% \ifx\lilypondfoo\undefined\else{\lilypondfoo\\}\fi
11 \def\makelilypondtitle
14 \ifx\lilyponddedication\undefined\else{\normalfont\lilyponddedication\\
}\fi
16 \ifx\lilypondtitle\undefined\else{\huge\lilypondtitle\\
}\fi
17 \ifx\lilypondsubtitle\undefined\else{\Large\lilypondsubtitle\\
}\fi
18 \ifx\lilypondsubsubtitle\undefined\else{\large\lilypondsubsubtitle\\
}\fi
22 \edef\saveparskip{\parskip}\parskip-
5mm
23 \begin{minipage
}[t
]{0.45\textwidth}
24 \ifx\lilypondpoet\undefined\else{\lilypondpoet\\
}\fi
25 \ifx\lilypondtexttranslator\undefined\else{\lilypondtexttranslator\\
}\fi
26 \ifx\lilypondmeter\undefined\else{\lilypondmeter\\
}\fi
27 \end{minipage
}\hspace*
{\fill}
28 \begin{minipage
}[t
]{0.45\textwidth}
30 \ifx\lilypondcomposer\undefined\else{\large\normalfont\scshape\lilypondcomposer\\
}\fi
31 \ifx\lilypondopus\undefined\else{\lilypondopus\\
}\fi
32 \ifx\lilypondarranger\undefined\else{\lilypondarranger\\
}\fi
36 \ifx\lilypondinstrument\undefined\else{\center{\large\lilypondinstrument}\par}\fi
37 \ifx\lilypondpiece\undefined\else{\flushleft{\large\normalfont\scshape\lilypondpiece}\par}\fi
39 \global\let\lilypondopus\relax%
40 \global\let\lilypondpiece\relax%
41 \global\let\mustmakelilypondtitle\undefined%
44 \def\makelilypondpiecetitle
47 \ifx\lilypondopus\undefined\else{\flushright{\lilypondopus}\par}\fi
48 \ifx\lilypondpiece\undefined\else{\flushleft{\large\normalfont\scshape\lilypondpiece}\par}\fi
50 \global\let\lilypondopus\relax%
51 \global\let\lilypondpiece\relax%
52 \global\let\mustmakelilypondpiecetitle\undefined%
55 % these names can't be changed: they're uses in mutopia headers
58 \ifx\lilypondhead\undefined\relax\else%
63 \ifx\lilypondfooter\undefined\relax\else%
66 \def\makelilypondtagline
68 \ifx\undefined\lilypondtagline\relax\else\lilypondtagline\fi
72 \ifx\lilypondcopyright\undefined\thefooter\else%
76 % Moved header and footer definitions here from the ly2dvi script.
77 % Separate page styles for first, last and ordinary (plain) pages.
79 \renewcommand{\ps@plain
}{
80 \renewcommand{\@oddfoot
}{\parbox{\textwidth}{\mbox{}\thefooter}}%
81 \renewcommand{\@evenfoot
}{\@oddfoot
}%
82 \renewcommand{\@evenhead
}{\hbox to
\textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
83 \renewcommand{\@oddhead
}{\hbox to
84 \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}}
85 \newcommand{\ps@firstpage
}{
86 \renewcommand{\@oddfoot
}{\parbox{\textwidth}{\mbox{}\thecopyright}}%
87 \renewcommand{\@evenfoot
}{\@oddfoot
}}
88 \newcommand{\ps@lastpage
}{
89 \renewcommand{\@oddfoot
}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}%
90 \renewcommand{\@evenfoot
}{\@oddfoot
}}