]> git.donarmstrong.com Git - lilypond.git/blob - tex/titledefs.tex
release: 1.3.107
[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 \def\thetitle{}
8 \def\thesubtitle{}
9 \def\thecomposer{}
10 \def\thearranger{}
11 \def\theinstrument{}
12 \def\theopus{}
13 \def\thepiece{}
14 \def\themeter{}
15 \def\thepoet{}
16 \def\theheader{}
17 \def\thefooter{}
18 \def\theorchestralinstrument{}
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*{\lilypondtitle}[1]{\def\thetitle{#1}}
32 \newcommand*{\lilypondsubtitle}[1]{\def\thesubtitle{#1}}
33 \newcommand*{\lilypondfooter}[1]{\def\thefooter{#1}}
34 \newcommand*{\lilypondhead}[1]{\def\theheader{#1}}
35 \newcommand*{\lilypondcomposer}[1]{\def\thecomposer{#1}}
36 \newcommand*{\lilypondarranger}[1]{\def\thearranger{#1}}
37 \newcommand*{\lilypondinstrument}[1]{\def\theinstrument{#1}}
38 \newcommand*{\lilypondopus}[1]{\def\theopus{#1}}
39 \newcommand*{\lilypondpiece}[1]{\def\thepiece{#1}}
40 \newcommand*{\lilypondmetre}[1]{\def\themeter{#1}}
41 \newcommand*{\lilypondmeter}[1]{\def\themeter{#1}}
42 \newcommand*{\lilypondpoet}[1]{\def\thepoet{#1}}
43 %
44 %
45 \def\lilypondnull{}%
46 %
47 \def\makelilytitle{%
48   \begin{center}
49         \bfseries
50         \ifx\lilypondnull\thetitle\else{\huge\thetitle}\\ \fi
51         \ifx\lilypondnull\thesubtitle\else{\Large\thesubtitle}\\ \fi
52   \end{center}
53   \bigskip
54   % urg
55   \edef\saveparskip{\parskip}\parskip-5mm
56   \begin{minipage}[t]{0.45\textwidth}
57         \ifx\lilypondnull\thepoet\else{\thepoet}\\ \fi
58         \ifx\lilypondnull\themeter\else{\themeter}\\ \fi
59   \end{minipage}\hspace*{\fill}
60   \begin{minipage}[t]{0.45\textwidth}
61       \begin{flushright}
62           \ifx\lilypondnull\thecomposer\else{\large\normalfont\scshape\thecomposer}\\ \fi
63           \ifx\lilypondnull\theopus\else{\theopus}\\ \fi
64           \ifx\lilypondnull\thearranger\else{\thearranger}\\ \fi
65         \end{flushright}%
66   \end{minipage}\par
67   \parskip\saveparskip
68   {\center{\large\theinstrument}\par}
69   {\flushleft{\large\normalfont\scshape\thepiece}\par}
70 %  \leavevmode
71   \global\let\theopus\relax%
72   \global\let\thepiece\relax%
73 }
74 \def\makelilypiecetitle
75 {
76   \bigskip\myfilbreak
77   {\flushright{\theopus}\par}
78   {\flushleft{\large\normalfont\scshape\thepiece}\par}
79   \nopagebreak%
80   \global\let\theopus\relax%
81   \global\let\thepiece\relax%
82 }
83 \endinput
84