lilypond-1.3.78
[lilypond.git] / tex / lilyponddefs.tex
blobf6bca234e4b9dc038fe6ce0f5bf344da892f6847
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 % skip if included already
12 \def\SkipLilydefs{\endinput}
13 \ifundefined{EndLilyPondOutput}
14 \def\EndLilyPondOutput{\csname bye\endcsname}
15 \def\SkipLilydefs{}
16 \fi
17 \SkipLilydefs
19 % need to do some stuff to turn pagenumbering off
20 \ifundefined{documentclass}
21 \input lilypond-plaintex
22 \else
23 \input lilypond-latex
24 \fi
28 \def\botalign#1{\vbox to 0pt{\vss #1}}
29 \def\leftalign#1{\hbox to 0pt{#1\hss}}
31 \input feta20.tex
33 % Attempt to keep lilypiecetitle together with the piece:
34 \def\myfilbreak{\par\vfil\penalty200\vfilneg}
36 % stacked horizontal lines
37 \ifundefined{mudelapaperinterscoreline}
38 \def\interscoreline{\vskip 16pt\myfilbreak}
39 \else
40 \def\interscoreline{\vskip\mudelapaperinterscoreline pt\myfilbreak}
41 \fi
42 \def\placebox#1#2#3{%
43 \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}%
45 % Are we using PDFTeX? If so, use pdf definitions to translate
46 % \embeddedps commands to embedded PDF.
47 \ifx\pdfoutput\undefined
48 \input lily-ps-defs
49 \else
50 \pdfoutput=1
51 \input lily-pdf-defs
52 \fi
54 \def\EndLilyPondOutput{%
55 \csname bye\endcsname
57 \def\postheader{}
59 % need to do some stuff to turn pagenumbering off
60 % they seriously mess up your fragments.
62 \ifx\csname nolilyfooter\endcsname\relax
63 \message{[footer defined]}%
64 \csname lilyfooter\texsuffix\endcsname%
65 \else
66 \message{[footer empty]}
67 \csname%
68 nolilyfooter\texsuffix\endcsname
69 \fi
71 % fix chord.cc::banter_str before removing these
72 \input fetdefs
74 \endinput