]> git.donarmstrong.com Git - lilypond.git/blob - tex/lilyponddefs.tex
release: 1.5.17
[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 % MiKTeX checks \pdfoutput the wrong way, makes our
59 % check more complicated.
60 \ifx\pdfoutput\undefined  
61   \input lily-ps-defs
62 \else
63   \ifx\pdfoutput\relax
64     \input lily-ps-defs
65   \else
66     \pdfoutput=1
67     \input lily-pdf-defs
68   \fi
69 \fi
70
71 \def\EndLilyPondOutput{%
72  \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
73 }
74 \def\postheader{}
75
76 % need to do some stuff to turn pagenumbering off
77 % they seriously mess up  your fragments.
78
79 \ifx\csname nolilyfooter\endcsname\relax
80         \message{[footer defined]}%
81         \csname lilyfooter\texsuffix\endcsname%
82 \else
83         \message{[footer empty]}
84         \csname%
85         nolilyfooter\texsuffix\endcsname
86 \fi
87 \newdimen\outputscale
88 \endinput