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