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