2 %% include file for LilyPond
4 %% this file defines various macros to accomodate lilypond output
6 %% let's not make par before endinput
9 \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
11 % If we must make titles, do so, before we're Skipped.
12 \ifx\mustmakelilypondtitle\undefined\else\makelilypondtitle\fi
13 \ifx\mustmakelilypondpiecetitle\undefined\else\makelilypondpiecetitle\fi
15 % skip if included already
16 \def\SkipLilydefs{\endinput}
17 \ifundefined{EndLilyPondOutput}
18 \def\EndLilyPondOutput{\csname bye\endcsname}
23 % need to do some stuff to turn pagenumbering off
24 \ifundefined{documentclass}
25 \input lilypond-plaintex
32 \def\botalign#1{\vbox to 0pt{\vss #1}}
33 \def\leftalign#1{\hbox to 0pt{#1\hss}}
37 % Attempt to keep lilypiecetitle together with the piece:
38 \def\myfilbreak{\par\vfil\penalty200\vfilneg}
40 % stacked horizontal lines
41 \ifundefined{lilypondpaperinterscoreline}
42 \def\lilypondpaperinterscoreline{16}
44 \ifundefined{lilypondpaperinterscorelinefill}
45 \def\lilypondpaperinterscorelinefill{0}
48 \def\interscoreline{\vskip\lilypondpaperinterscoreline pt plus %
49 \lilypondpaperinterscorelinefill fill\myfilbreak}
52 \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}%
54 % Are we using PDFTeX? If so, use pdf definitions to translate
55 % \embeddedps commands to embedded PDF.
56 \ifx\pdfoutput\undefined
63 \def\EndLilyPondOutput{%
64 \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
68 % need to do some stuff to turn pagenumbering off
69 % they seriously mess up your fragments.
71 \ifx\csname nolilyfooter\endcsname\relax
72 \message{[footer defined]}%
73 \csname lilyfooter\texsuffix\endcsname%
75 \message{[footer empty]}
77 nolilyfooter\texsuffix\endcsname