\score { \notes {
- c4
+% First a normal looking repeat:
+ c2 c
+ \property Score.repeatCommands = #'((volta "1."))
+ c c
+ \property Score.repeatCommands = #'((volta #f) end-repeat (volta "2."))
+ c c
+ \property Score.repeatCommands = #'((volta #f))
+% Then a more strange one:
+ c c
\property Score.repeatCommands = #'((volta "93") end-repeat)
- c4 c4
+ c c
\property Score.repeatCommands = #'((volta #f))
- c4 c4
+ c c
}
}
'''Report the error S. Exit by raising an exception. Please
- do not abuse by trying to catch this error. If you donn't want
+ do not abuse by trying to catch this error. If you do not want
a stack trace, write to the output directly.
RETURN VALUE
s = s + r'''
\usepackage[latin1]{inputenc}
\input{titledefs}
-\makeatletter
-\renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}%
-\renewcommand{\@evenfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}%
'''
if extra['pagenumber'] and extra['pagenumber'][-1] and extra['pagenumber'][-1] != 'no':
- s = s + r'''
-\renewcommand{\@evenhead}{\hbox to\textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
-\renewcommand{\@oddhead}{\hbox to \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}
-'''
+ s = s + '\\pagestyle{plain}\n'
else:
s = s + '\\pagestyle{empty}\n'
- s = s + '\\makeatother\n'
s = s + '\\begin{document}\n'
-
+ s = s + '\\thispagestyle{firstpage}\n'
first = 1
for t in tfiles:
s = s + one_latex_definition (t, first)
first = 0
- s = s + r'''
-%% I do not see why we want to clobber the footer here
-%% \vfill\hfill\parbox{\textwidth}{\mbox{}\makelilypondtagline}
-%% Well, maybe you don't submit music to mutopia?
-%% I would not object to this kind of change, but I don't know how
-%% to get the last mutopia tagline right (ie: no footer on last page)
-%% Please check that mutopia footers and endfooter are OK before changing
-%% this again. -- jcn
-% the \mbox{} helps latex if people do stupid things in tagline
-\makeatletter
-\if@twoside
- \ifodd\thepage
- \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}%
- \else
- \renewcommand{\@evenfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}%
- \fi
- \else
- \renewcommand{\@thefoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}%
-\fi
-\makeatother
-'''
+
+ s = s + '\\thispagestyle{lastpage}\n'
s = s + '\\end{document}'
return s
% these names can't be changed: they're uses in mutopia headers
\def\theheader
{
- \ifx\lilypondhead\undefined\else%
+ \ifx\lilypondhead\undefined\relax\else%
\lilypondhead\fi
}
\def\thefooter
{
- \ifx\lilypondfooter\undefined\else%
+ \ifx\lilypondfooter\undefined\relax\else%
\lilypondfooter\fi
}
\def\makelilypondtagline
{
- \ifx\lilypondtagline\undefined\else\lilypondtagline\fi
+ \ifx\undefined\lilypondtagline\relax\else\lilypondtagline\fi
}
+\def\thecopyright
+{
+ \ifx\lilypondcopyright\undefined\thefooter\else%
+ \lilypondcopyright\fi
+}
+%
+% Moved header and footer definitions here from the ly2dvi script.
+% Separate page styles for first, last and ordinary (plain) pages.
+\makeatletter
+\renewcommand{\ps@plain}{
+ \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}%
+ \renewcommand{\@evenfoot}{\@oddfoot}%
+ \renewcommand{\@evenhead}{\hbox to\textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
+ \renewcommand{\@oddhead}{\hbox to
+ \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}}
+\newcommand{\ps@firstpage}{
+ \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thecopyright}}%
+ \renewcommand{\@evenfoot}{\@oddfoot}}
+\newcommand{\ps@lastpage}{
+ \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}%
+ \renewcommand{\@evenfoot}{\@oddfoot}}
+\makeatother
\endinput