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

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

[PATCH] ly2dvi 1.2.145


From: Mark Hindley
Subject: [PATCH] ly2dvi 1.2.145
Date: Fri, 6 Apr 2001 13:46:32 +0100 (BST)

A patch for ly2dvi.

Fixes a couple of things:

Tagline only appears on the last page and doesn't clobber the footer
(which I use for copyright stuff).

Added a new header field - latexoptions, contents of which go in the
documentclass options. 

Added support for twosided output.

To use it, just put twoside in the latexoptions header field.

I have also adjusted the \geometry{headsep} to make space for the even
numbers and reduced the default twosideshift (which I always think is
too big).

Hope people find it useful.

Mark


--- ./ly2dvi    Wed Apr  4 08:43:42 2001
+++ ./ly2dvi    Fri Apr  6 13:34:19 2001
@@ -62,6 +62,7 @@
        'language' : [],
        'latexheaders' : [],
        'latexpackages' :  ['geometry'],
+       'latexoptions' : [],
        'papersize' : [],
        'pagenumber' : [1],
        'textheight' : [], 
@@ -387,16 +388,19 @@
        s = ""
        s = s + '% generation tag\n'
 
-       paper = ''
+       options = ''
 
        if extra['papersize']:
                try:
-                       paper = '[%s]' % 
ly_paper_to_latexpaper[extra['papersize'][0]]
+                       options = '%s' % 
ly_paper_to_latexpaper[extra['papersize'][0]]
                except:
                        warning (_ ("invalid value: %s") % 
`extra['papersize'][0]`)
                        pass
+
+       if extra['latexoptions']:
+               options = options + ',' + extra['latexoptions'][-1]
        
-       s = s + '\\documentclass%s{article}\n' % paper
+       s = s + '\\documentclass[%s]{article}\n' % options
 
        if extra['language']:
                s = s + r'\usepackage[%s]{babel}\n' % extra['language'][-1]
@@ -422,17 +426,23 @@
                linewidth = 597
        else:
                linewidth = extra['linewidth'][0]
-       s = s + 
'\geometry{width=%spt%s,headheight=2mm,headsep=0pt,footskip=2mm,%s}\n' % 
(linewidth, textheight, orientation)
+       s = s + 
'\geometry{width=%spt%s,headheight=2mm,headsep=12pt,footskip=2mm,%s}\n' % 
(linewidth, textheight, orientation)
 
+       if extra['latexoptions']:
+               s = s + '\geometry{twosideshift=4mm}\n'
+               
        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
+    {\mbox{}\textbf{\thepage}\hfill\small\theheader}}
 address@hidden
     {\mbox{}\small\theheader\hfill\textbf{\thepage}}}
 '''
@@ -449,9 +459,11 @@
                first = 0
 
        s = s + r'''
-\makeatletter
address@hidden
-\makeatother
+% I don't see why we want to clobber the footer here
+\vfill\hfill\parbox{\textwidth}{\mbox{}\makelilypondtagline}
+%\makeatletter
address@hidden
+%\makeatother
 '''
        s = s + '\\end{document}'
 




reply via email to

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