lilypond-1.3.139
[lilypond.git] / tex / lilyponddefs.tex
blobbf471d812274ce8d56b3e35b2699956b1991ab99
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
8 % TeXbook ex 7.7
9 \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
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
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
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
32 \def\botalign#1{\vbox to 0pt{\vss #1}}
33 \def\leftalign#1{\hbox to 0pt{#1\hss}}
35 \input feta20.tex
37 % Attempt to keep lilypiecetitle together with the piece:
38 \def\myfilbreak{\par\vfil\penalty200\vfilneg}
40 % stacked horizontal lines
41 \ifundefined{lilypondpaperinterscoreline}
42 \def\lilypondpaperinterscoreline{16}
43 \fi
44 \ifundefined{lilypondpaperinterscorelinefill}
45 \def\lilypondpaperinterscorelinefill{0}
46 \fi
48 \def\interscoreline{\vskip\lilypondpaperinterscoreline pt plus %
49 \lilypondpaperinterscorelinefill fill\myfilbreak}
51 \def\placebox#1#2#3{%
52 \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}%
54 % Are we using PDFTeX? If so, use pdf definitions to translate
55 % \embeddedps commands to embedded PDF.
56 \ifx\pdfoutput\undefined
57 \input lily-ps-defs
58 \else
59 \pdfoutput=1
60 \input lily-pdf-defs
61 \fi
63 \def\EndLilyPondOutput{%
64 \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
66 \def\postheader{}
68 % need to do some stuff to turn pagenumbering off
69 % they seriously mess up your fragments.
71 \ifx\csname nolilyfooter\endcsname\relax
72 \message{[footer defined]}%
73 \csname lilyfooter\texsuffix\endcsname%
74 \else
75 \message{[footer empty]}
76 \csname%
77 nolilyfooter\texsuffix\endcsname
78 \fi
80 % fix chord.cc::banter_str before removing these
81 \input fetdefs
83 \endinput