]> git.donarmstrong.com Git - lilypond.git/blob - tex/titledefs.tex
release: 1.3.130
[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\thesubsubtitle{}
10 \def\thecomposer{}
11 \def\thearranger{}
12 \def\theinstrument{}
13 \def\theopus{}
14 \def\thepiece{}
15 \def\themeter{}
16 \def\thepoet{}
17 \def\theheader{}
18 \def\thefooter{}
19 \def\theorchestralinstrument{}
20 %
21 % duh.  LaTeX has a \title too.
22 \renewcommand*{\title}[1]{\def\thetitle{#1}}
23 \newcommand*{\subtitle}[1]{\def\thesubtitle{#1}}
24 \newcommand*{\subsubtitle}[1]{\def\thesubsubtitle{#1}}
25 \newcommand*{\composer}[1]{\def\thecomposer{#1}}
26 \newcommand*{\arranger}[1]{\def\thearranger{#1}}
27 \newcommand*{\instrument}[1]{\def\theinstrument{#1}}
28 \newcommand*{\opus}[1]{\def\theopus{#1}}
29 \newcommand*{\piece}[1]{\def\thepiece{#1}}
30 \newcommand*{\meter}[1]{\def\themeter{#1}}
31 \newcommand*{\poet}[1]{\def\thepoet{#1}}
32 %
33 \newcommand*{\lilypondtitle}[1]{\def\thetitle{#1}}
34 \newcommand*{\lilypondsubtitle}[1]{\def\thesubtitle{#1}}
35 \newcommand*{\lilypondsubsubtitle}[1]{\def\thesubsubtitle{#1}}
36 \newcommand*{\lilypondfooter}[1]{\def\thefooter{#1}}
37 \newcommand*{\lilypondhead}[1]{\def\theheader{#1}}
38 \newcommand*{\lilypondcomposer}[1]{\def\thecomposer{#1}}
39 \newcommand*{\lilypondarranger}[1]{\def\thearranger{#1}}
40 \newcommand*{\lilypondinstrument}[1]{\def\theinstrument{#1}}
41 \newcommand*{\lilypondopus}[1]{\def\theopus{#1}}
42 \newcommand*{\lilypondpiece}[1]{\def\thepiece{#1}}
43 \newcommand*{\lilypondmetre}[1]{\def\themeter{#1}}
44 \newcommand*{\lilypondmeter}[1]{\def\themeter{#1}}
45 \newcommand*{\lilypondpoet}[1]{\def\thepoet{#1}}
46 %
47 %
48 \def\lilypondnull{}%
49 %
50 \def\makelilytitle{%
51   \begin{center}
52         \bfseries
53         \ifx\lilypondnull\thetitle\else{\huge\thetitle}\\ \fi
54         \ifx\lilypondnull\thesubtitle\else{\Large\thesubtitle}\\ \fi
55         \ifx\lilypondnull\thesubsubtitle\else{\large\thesubsubtitle}\\ \fi
56   \end{center}
57   \bigskip
58   % urg
59   \edef\saveparskip{\parskip}\parskip-5mm
60   \begin{minipage}[t]{0.45\textwidth}
61         \ifx\lilypondnull\thepoet\else{\thepoet}\\ \fi
62         \ifx\lilypondnull\themeter\else{\themeter}\\ \fi
63   \end{minipage}\hspace*{\fill}
64   \begin{minipage}[t]{0.45\textwidth}
65       \begin{flushright}
66           \ifx\lilypondnull\thecomposer\else{\large\normalfont\scshape\thecomposer}\\ \fi
67           \ifx\lilypondnull\theopus\else{\theopus}\\ \fi
68           \ifx\lilypondnull\thearranger\else{\thearranger}\\ \fi
69         \end{flushright}%
70   \end{minipage}\par
71   \parskip\saveparskip
72   {\center{\large\theinstrument}\par}
73   {\flushleft{\large\normalfont\scshape\thepiece}\par}
74 %  \leavevmode
75   \global\let\theopus\relax%
76   \global\let\thepiece\relax%
77 }
78 \def\makelilypiecetitle
79 {
80   \bigskip\myfilbreak
81   {\flushright{\theopus}\par}
82   {\flushleft{\large\normalfont\scshape\thepiece}\par}
83   \nopagebreak%
84   \global\let\theopus\relax%
85   \global\let\thepiece\relax%
86 }
87 \endinput
88