]> git.donarmstrong.com Git - lilypond.git/blob - tex/lilyponddefs.tex
release: 1.3.151
[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 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
62
63 \def\EndLilyPondOutput{%
64  \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
65 }
66 \def\postheader{}
67
68 % need to do some stuff to turn pagenumbering off
69 % they seriously mess up  your fragments.
70
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
79
80 \endinput