3 % Include file for LilyPond.
5 % This file defines various macros to accomodate lilypond output.
7 % Avoid \par while reading this file.
8 \edef\lilyponddefsELC{\the\endlinechar}%
13 \expandafter\ifx\csname#1\endcsname\relax
16 % If we must make titles, do so, before we're skipped.
18 \ifx\mustmakelilypondtitle\undefined
23 \ifx\mustmakelilypondpiecetitle\undefined
25 \makelilypondpiecetitle
28 % skip if included already
31 \endlinechar \lilyponddefsELC
33 \ifundefined{EndLilyPondOutput}
34 \def\EndLilyPondOutput{\csname bye\endcsname}
39 % need to do some stuff to turn page numbering off
41 \ifundefined{documentclass}
42 \input lilypond-plaintex
50 \font\fetasixteen = feta16
51 \def\fetafont{\fetasixteen}
52 \def\fetachar#1{\hbox{\fetasixteen#1}}
61 % Attempt to keep lilypiecetitle together with the piece:
64 % TODO: figure this out.
67 \def\myfilbreak{}%\par\vfil\penalty200\vfilneg}
70 \ifundefined{lilypondpaperinterscorelinefill}
71 \def\lilypondpaperinterscorelinefill{0}
73 \def\lilypondpaperinterscorelinefill{1}
77 \vskip \lilypondpaperinterscoreline \lilypondpaperunit
78 plus \lilypondpaperinterscorelinefill fill
83 \hbox{\raise #1\leftalign{\kern #2{}#3}}
87 % Are we using PDFTeX? If so, use pdf definitions.
88 % MiKTeX checks \pdfoutput the wrong way; this makes our
89 % check more complicated.
90 \ifx\pdfoutput\undefined
101 \def\EndLilyPondOutput{
102 \ifundefined{lilypondpaperlastpagefill}
103 \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill
105 \csname bye\endcsname
108 % Need to do some stuff to turn page numbering off;
109 % they seriously mess up your fragments.
111 \ifx\csname nolilyfooter\endcsname\relax
112 \message{[footer defined]}
113 \csname lilyfooter\texsuffix\endcsname
115 \message{[footer empty]}
116 \csname nolilyfooter\texsuffix\endcsname
119 % It is very bad that lilyponddefs.tex gets included in every lilypond
120 % output snippet. This is necessary because these output snippets
121 % often get encapsulated, eg by texinfo. This should be fixed by
122 % putting the variable parts in this file into a macro so that loading
123 % the file multiple times can be avoided.
124 \ifx\outputscale\undefined
125 \csname global\endcsname\csname newdimen\endcsname\outputscale
126 \csname global\endcsname\csname newdimen\endcsname\scoreshift
129 % Restore newline functionality (disabled to avoid \par).
130 \endlinechar \lilyponddefsELC