]> git.donarmstrong.com Git - lilypond.git/blob - tex/lilyponddefs.tex
patch::: 1.3.135.jcn1
[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 % skip if included already
12 \def\SkipLilydefs{\endinput}
13 \ifundefined{EndLilyPondOutput}
14         \def\EndLilyPondOutput{\csname bye\endcsname}
15         \def\SkipLilydefs{}
16 \fi
17 \SkipLilydefs
18
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
25
26
27 %
28 \def\botalign#1{\vbox to 0pt{\vss #1}}
29 \def\leftalign#1{\hbox to 0pt{#1\hss}}
30
31 \input feta20.tex
32
33 % Attempt to keep lilypiecetitle together with the piece:
34 \def\myfilbreak{\par\vfil\penalty200\vfilneg}
35
36 % stacked horizontal lines
37 \ifundefined{lilypondpaperinterscoreline}
38         \def\lilypondpaperinterscoreline{16}
39 \fi
40 \ifundefined{lilypondpaperinterscorelinefill}
41         \def\lilypondpaperinterscorelinefill{0}
42 \fi
43
44 \def\interscoreline{\vskip\lilypondpaperinterscoreline pt plus %
45   \lilypondpaperinterscorelinefill fill\myfilbreak}
46
47 \def\placebox#1#2#3{%
48         \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}%
49
50 % Are we using PDFTeX?  If so, use pdf definitions to translate
51 % \embeddedps commands to embedded PDF.
52 \ifx\pdfoutput\undefined  
53   \input lily-ps-defs
54 \else
55   \pdfoutput=1
56   \input lily-pdf-defs
57 \fi
58
59 \def\EndLilyPondOutput{%
60  \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
61 }
62 \def\postheader{}
63
64 % need to do some stuff to turn pagenumbering off
65 % they seriously mess up  your fragments.
66
67 \ifx\csname nolilyfooter\endcsname\relax
68         \message{[footer defined]}%
69         \csname lilyfooter\texsuffix\endcsname%
70 \else
71         \message{[footer empty]}
72         \csname%
73         nolilyfooter\texsuffix\endcsname
74 \fi
75
76 % If we must make titles, do so
77 \ifx\mustmakelilypondtitle\undefined\else\makelilypondtitle\fi
78 \ifx\mustmakelilypondpiecetitle\undefined\else\makelilypondpiecetitle\fi
79
80 % fix chord.cc::banter_str before removing these
81 \input fetdefs
82
83 \endinput