bug-gnu-music
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ly2dvi patch


From: Mats Bengtsson
Subject: ly2dvi patch
Date: Sun, 10 Jun 2001 16:49:44 +0200

Hi,

here's a patch that solves the problem for David and everybody
else who wants a copyright notice on the bottom of the first page.
In order to simplify ly2dvi, I defined three separate page styles,
- firstpage, for page 1
- plain, for page 2 to N-1
- lastpage, for the last page

Jan, you may want to test it on some more Mutopia example, 
but I've tried at least one Mutopia example and the last 
page is still correct. The difference is the first page, 
where the copyright field is used instead of the footer field.

  /Mats

Generated by (address unknown),
>From = lilypond-1.4.2, To = lilypond-1.4.2.mb1

usage 

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.4.2.mb1.diff

Patches do not contain automatically generated files 
or (urg) empty directories, 
i.e., you should rerun autoconf, configure

diff -urN ../lilypond-1.4.2/CHANGES ./CHANGES
--- ../lilypond-1.4.2/CHANGES   Mon May 28 16:06:02 2001
+++ ./CHANGES   Sun Jun 10 15:49:10 2001
@@ -1,3 +1,9 @@
+1.4.2.mb1
+==========
+
+* ly2dvi, titledefs.tex: Typeset copyright notice at the bottom of
+  the first page. Make separate page styles for first and last page.
+
 1.4.1.jcn4
 ==========
 
diff -urN ../lilypond-1.4.2/VERSION ./VERSION
--- ../lilypond-1.4.2/VERSION   Mon May 28 16:06:02 2001
+++ ./VERSION   Sun Jun 10 15:47:34 2001
@@ -2,7 +2,7 @@
 MAJOR_VERSION=1
 MINOR_VERSION=4
 PATCH_LEVEL=2
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=mb1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff -urN ../lilypond-1.4.2/input/test/manual-volta.ly 
./input/test/manual-volta.ly
--- ../lilypond-1.4.2/input/test/manual-volta.ly        Thu Apr  5 00:02:41 2001
+++ ./input/test/manual-volta.ly        Wed May 30 23:29:01 2001
@@ -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 -urN ../lilypond-1.4.2/scripts/ly2dvi.py ./scripts/ly2dvi.py
--- ../lilypond-1.4.2/scripts/ly2dvi.py Mon May 28 16:06:02 2001
+++ ./scripts/ly2dvi.py Sun Jun 10 15:45:34 2001
@@ -533,49 +533,23 @@
        s = s + r'''
 \usepackage[latin1]{inputenc}
 \input{titledefs}
-\makeatletter
address@hidden
address@hidden
 '''
        
        if extra['pagenumber'] and extra['pagenumber'][-1] and 
extra['pagenumber'][-1] != 'no':
-               s = s + r'''
address@hidden to\textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
address@hidden 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
address@hidden
-  \ifodd\thepage
-   address@hidden
-  \else
-   address@hidden
-  \fi
- \else
-  address@hidden
-\fi
-\makeatother
-'''
+
+       s = s + '\\thispagestyle{lastpage}\n'
        s = s + '\\end{document}'
 
        return s
diff -urN ../lilypond-1.4.2/tex/titledefs.tex ./tex/titledefs.tex
--- ../lilypond-1.4.2/tex/titledefs.tex Mon May 14 00:35:29 2001
+++ ./tex/titledefs.tex Sun Jun 10 15:59:37 2001
@@ -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\lilypondfooter\else%
+    \lilypondcopyright\fi
+}
+%
+% Moved header and footer definitions here from the ly2dvi script.
+% Separate page styles for first, last and ordinary (plain) pages.
+\makeatletter
address@hidden
+  address@hidden
+  address@hidden@oddfoot}%
+  address@hidden to\textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
+  address@hidden to
+  \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}}
address@hidden
+  address@hidden
+  address@hidden@oddfoot}}
address@hidden
+  address@hidden
+  address@hidden@oddfoot}}
+\makeatother
 \endinput
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]