From 09645891eaac194ccfdacc6c6f6e528432f438c2 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 01:19:45 +0000 Subject: [PATCH] lilypond-1.4.3 --- input/test/manual-volta.ly | 14 +++++++++++--- scripts/ly2dvi.py | 36 +++++------------------------------- tex/titledefs.tex | 28 +++++++++++++++++++++++++--- 3 files changed, 41 insertions(+), 37 deletions(-) diff --git a/input/test/manual-volta.ly b/input/test/manual-volta.ly index ecb3ad4186..7f9042daca 100644 --- a/input/test/manual-volta.ly +++ b/input/test/manual-volta.ly @@ -2,10 +2,18 @@ \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 } } diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index d6a6344995..5ac6d69667 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -193,7 +193,7 @@ def error (s): '''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 @@ -533,49 +533,23 @@ lily output file in TFILES after that, and return the Latex file constructed. ' 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 diff --git a/tex/titledefs.tex b/tex/titledefs.tex index c41cb0b738..fd680ff7e4 100644 --- a/tex/titledefs.tex +++ b/tex/titledefs.tex @@ -55,17 +55,39 @@ % 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 -- 2.39.5