]> git.donarmstrong.com Git - lilypond.git/blob - tex/lilyponddefs.tex
release: 1.4.2
[lilypond.git] / tex / lilyponddefs.tex
1 %%
2 %% include file for LilyPond
3 %%
4 %% this file defines various macros to accomodate lilypond output
5 %%
6 %% let's not make par before endinput
7 %
8 % TeXbook ex 7.7
9 \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
10 %
11 % If we must make titles, do so, before we're Skipped.
12 \ifx\mustmakelilypondtitle\undefined\else\makelilypondtitle\fi
13 \ifx\mustmakelilypondpiecetitle\undefined\else\makelilypondpiecetitle\fi
14 %
15 % skip if included already
16 \def\SkipLilydefs{\endinput}
17 \ifundefined{EndLilyPondOutput}
18         \def\EndLilyPondOutput{\csname bye\endcsname}
19         \def\SkipLilydefs{}
20 \fi
21 \SkipLilydefs
22
23 % need to do some stuff to turn pagenumbering off
24 \ifundefined{documentclass}
25         \input lilypond-plaintex
26 \else
27         \input lilypond-latex
28 \fi
29
30
31 %
32 \def\botalign#1{\vbox to 0pt{\vss #1}}
33 \def\leftalign#1{\hbox to 0pt{#1\hss}}
34
35 \input feta20.tex
36
37 % Attempt to keep lilypiecetitle together with the piece:
38 \def\myfilbreak{\par\vfil\penalty200\vfilneg}
39
40 % stacked horizontal lines
41 \ifundefined{lilypondpaperinterscoreline}
42         \def\lilypondpaperinterscoreline{16}
43 \fi
44 \ifundefined{lilypondpaperinterscorelinefill}
45         \def\lilypondpaperinterscorelinefill{0}
46 \fi
47
48 \def\interscoreline{\vskip\lilypondpaperinterscoreline pt plus %
49   \lilypondpaperinterscorelinefill fill}
50
51 \def\placebox#1#2#3{%
52         \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}%
53
54 % Are we using PDFTeX?  If so, use pdf definitions.
55 \ifx\pdfoutput\undefined  
56   \input lily-ps-defs
57 \else
58   \pdfoutput=1
59   \input lily-pdf-defs
60 \fi
61
62 \def\EndLilyPondOutput{%
63  \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
64 }
65 \def\postheader{}
66
67 % need to do some stuff to turn pagenumbering off
68 % they seriously mess up  your fragments.
69
70 \ifx\csname nolilyfooter\endcsname\relax
71         \message{[footer defined]}%
72         \csname lilyfooter\texsuffix\endcsname%
73 \else
74         \message{[footer empty]}
75         \csname%
76         nolilyfooter\texsuffix\endcsname
77 \fi
78
79 \endinput