]> git.donarmstrong.com Git - lilypond.git/blob - tex/titledefs.tex
release: 1.3.0
[lilypond.git] / tex / titledefs.tex
1 %
2 % ideally, we should create a LaTeX/TeX class
3 % for setting music in different sizes.
4 %
5 % Version 0.1
6 %
7 \input lilyponddefs
8 \def\EndLilyPondOutput{\endinput}
9 %
10 \def\thetitle{}
11 \def\thesubtitle{}
12 \def\thecomposer{}
13 \def\thearranger{}
14 \def\theinstrument{}
15 \def\theopus{}
16 \def\thepiece{}
17 \def\themeter{}
18 \def\thepoet{}
19 %
20 % duh.  LaTeX has a \title too.
21 \renewcommand*{\title}[1]{\def\thetitle{#1}}
22 \newcommand*{\subtitle}[1]{\def\thesubtitle{#1}}
23 \newcommand*{\composer}[1]{\def\thecomposer{#1}}
24 \newcommand*{\arranger}[1]{\def\thearranger{#1}}
25 \newcommand*{\instrument}[1]{\def\theinstrument{#1}}
26 \newcommand*{\opus}[1]{\def\theopus{#1}}
27 \newcommand*{\piece}[1]{\def\thepiece{#1}}
28 \newcommand*{\meter}[1]{\def\themeter{#1}}
29 \newcommand*{\poet}[1]{\def\thepoet{#1}}
30 %
31 \newcommand*{\mudelatitle}[1]{\def\thetitle{#1}}
32 \newcommand*{\mudelasubtitle}[1]{\def\thesubtitle{#1}}
33 \newcommand*{\mudelacomposer}[1]{\def\thecomposer{#1}}
34 \newcommand*{\mudelaarranger}[1]{\def\thearranger{#1}}
35 \newcommand*{\mudelainstrument}[1]{\def\theinstrument{#1}}
36 \newcommand*{\mudelaopus}[1]{\def\theopus{#1}}
37 \newcommand*{\mudelapiece}[1]{\def\thepiece{#1}}
38 \newcommand*{\mudelametre}[1]{\def\themeter{#1}}
39 \newcommand*{\mudelameter}[1]{\def\themeter{#1}}
40 \newcommand*{\mudelapoet}[1]{\def\thepoet{#1}}
41 %
42 %
43 \def\mudelanull{}%
44 %
45 \def\makelilytitle{%
46   \begin{center}
47         \bfseries
48         \ifx\mudelanull\thetitle\else{\huge\thetitle}\\ \fi
49         \ifx\mudelanull\thesubtitle\else{\Large\thesubtitle}\\ \fi
50   \end{center}
51   \bigskip
52   % urg
53   \edef\saveparskip{\parskip}\parskip-5mm
54   \begin{minipage}[t]{0.45\textwidth}
55         \ifx\mudelanull\thepoet\else{\thepoet}\\ \fi
56         \ifx\mudelanull\themeter\else{\themeter}\\ \fi
57   \end{minipage}\hspace*{\fill}
58   \begin{minipage}[t]{0.45\textwidth}
59       \begin{flushright}
60           \ifx\mudelanull\thecomposer\else{\large\normalfont\scshape\thecomposer}\\ \fi
61           \ifx\mudelanull\theopus\else{\theopus}\\ \fi
62           \ifx\mudelanull\thearranger\else{\thearranger}\\ \fi
63         \end{flushright}%
64   \end{minipage}\par
65   \parskip\saveparskip
66   {\center{\large\theinstrument}\par}
67   {\flushleft{\large\normalfont\scshape\thepiece}}
68 %  \leavevmode
69   \global\let\theopus\relax%
70   \global\let\thepiece\relax%
71 }
72 \def\makelilypiecetitle
73 {
74   \bigskip
75   {\flushright{\theopus}\par}
76   {\flushleft{\large\normalfont\scshape\thepiece}}
77   \global\let\theopus\relax%
78   \global\let\thepiece\relax%
79 }
80 \endinput
81