]> git.donarmstrong.com Git - lilypond.git/blob - tex/lilyponddefs.tex
release: 1.5.46
[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
44 \ifundefined{lilypondpaperinterscorelinefill}
45         \def\lilypondpaperinterscorelinefill{0}
46 \else
47         \def\lilypondpaperinterscorelinefill{1}
48 \fi
49
50 \def\interscoreline{\vskip \lilypondpaperinterscoreline \lilypondpaperunit plus \lilypondpaperinterscorelinefill fill}
51
52 \def\placebox#1#2#3{%
53         \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}%
54
55 % Are we using PDFTeX?  If so, use pdf definitions.
56 % MiKTeX checks \pdfoutput the wrong way, makes our
57 % check more complicated.
58 \ifx\pdfoutput\undefined  
59   \input lily-ps-defs
60 \else
61   \ifx\pdfoutput\relax
62     \input lily-ps-defs
63   \else
64     \pdfoutput=1
65     \input lily-pdf-defs
66   \fi
67 \fi
68
69 \def\EndLilyPondOutput{%
70  \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
71 }
72 \def\postheader{}
73
74 % need to do some stuff to turn pagenumbering off
75 % they seriously mess up  your fragments.
76
77 \ifx\csname nolilyfooter\endcsname\relax
78         \message{[footer defined]}%
79         \csname lilyfooter\texsuffix\endcsname%
80 \else
81         \message{[footer empty]}
82         \csname%
83         nolilyfooter\texsuffix\endcsname
84 \fi
85 \newdimen\outputscale
86 \endinput