]> git.donarmstrong.com Git - lilypond.git/commitdiff
patches by Tom Cato Amundsen. Adds
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 4 Jul 2002 12:30:49 +0000 (12:30 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 4 Jul 2002 12:30:49 +0000 (12:30 +0000)
support for the columnsep when using the geometry package.

ChangeLog
Documentation/user/lilypond-book.itely
make/lilypond.redhat.spec.in
scripts/lilypond-book.py

index 45ec1efd46da0107bd202832af0042f501e7fcc2..e896e0a32f9e788f5c64f18a3463739f72f25416 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+
+2002-07-04  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * scripts/lilypond-book.py: patches by Tom Cato Amundsen.  Adds
+       support for the columnsep when using the geometry package.
+       
 2002-07-04  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/grob-property-description.scm (minimum-space-pair): Remove.
index fd9107f3c3058d7497fa3c45f2d6bc54dff63121..f9db585b58cc576b5cf9a74e5c7752dd3f58e743 100644 (file)
@@ -112,8 +112,10 @@ or
 @end example
 
 Lilypond-book know about the @code{\onecolumn} and 
-@code{\twocolumn} commands, the @code{geometry} package and
-all the standard paper sizes.
+@code{\twocolumn} commands, the @code{geometry} package
+(all except the following options: paperwidth, papersize,
+hdivide, divide, textwidth, mag, offset) and all the
+standard paper sizes.
 
 The music will be surrounded by @code{\preLilypondExample} and
 @code{\postLilypondExample}. The variables are 
index 0a9a277cc562b2febd831132fe7070749ac7ac70..82a3cad1969ab1e2f3953e1f8661e89016568e07 100644 (file)
@@ -13,7 +13,7 @@ URL: http://www.lilypond.org/
 BuildRoot: /tmp/lilypond-install
 
 Buildrequires: t1utils bison flex pktrace texinfo
-Requires: tetex  tetex-latex gcc-c++ python 
+Requires: tetex  tetex-latex libstdc++ python 
 
 %description
 LilyPond lets you create music notation.  It produces
index cbb84e7b84ef6843c0e7f15f564b0a2184771d57..c62d74f46b5e852ddc7a5b09547d6139248316f2 100644 (file)
@@ -191,6 +191,7 @@ class LatexPaper:
                self.m_geo_textwidth = None
                self.m_geo_lmargin = None
                self.m_geo_rmargin = None
+               self.m_geo_columnsep = 0.0
                self.m_geo_includemp = None
                self.m_geo_marginparwidth = {10: 57, 11: 50, 12: 35}
                self.m_geo_marginparsep = {10: 11, 11: 10, 12: 10}
@@ -254,6 +255,8 @@ class LatexPaper:
                        else:
                                self.m_geo_lmargin =  value
                                self.m_geo_rmargin =  value
+               elif name == 'columnsep':
+                       self.m_geo_columnsep = value
                elif name == 'total':
                        if type(value) == type([]):
                                self.m_geo_width =  value[0]
@@ -266,7 +269,7 @@ class LatexPaper:
                elif name[-5:] == 'paper':
                        self.m_papersize = name
                else:
-                               pass 
+                       pass
 
        def __setattr__(self, name, value):
                if type(value) == type("") and \
@@ -312,6 +315,8 @@ class LatexPaper:
                #ugh test if this is necessary                          
                if self.__body:
                        mp = 0
+               if self.m_num_cols == 1:
+                       self.m_geo_columnsep = 0.0
 
                if not self.m_use_geometry:
                        return latex_linewidths[self.m_papersize][self.m_fontsize]
@@ -322,31 +327,31 @@ class LatexPaper:
 
                        if geo_opts == (1, 1, 1):
                                if self.m_geo_textwidth:
-                                       return self.m_geo_textwidth
-                               w = self.get_paperwidth() * 0.8
+                                       return self.m_geo_textwidth - self.m_geo_columnsep
+                               w = self.get_paperwidth() * 0.8 - self.m_geo_columnsep
                                return w - mp
                        elif geo_opts == (0, 1, 1):
-                                if self.m_geo_textwidth:
-                                       return self.m_geo_textwidth
-                                return self.f1(self.m_geo_lmargin, mp)
+                               if self.m_geo_textwidth:
+                                       return self.m_geo_textwidth - self.m_geo_columnsep
+                               return self.f1(self.m_geo_lmargin, mp)
                        elif geo_opts == (1, 1, 0):
-                                if self.m_geo_textwidth:
-                                       return self.m_geo_textwidth
-                                return self.f1(self.m_geo_rmargin, mp)
+                               if self.m_geo_textwidth:
+                                       return self.m_geo_textwidth - self.m_geo_columnsep
+                               return self.f1(self.m_geo_rmargin, mp)
                        elif geo_opts \
                                        in ((0, 0, 1), (1, 0, 0), (1, 0, 1)):
                                if self.m_geo_textwidth:
-                                       return self.m_geo_textwidth
-                               return self.m_geo_width - mp
+                                       return self.m_geo_textwidth - self.m_geo_columnsep
+                               return self.m_geo_width - mp - self.m_geo_columnsep
                        elif geo_opts in ((0, 1, 0), (0, 0, 0)):
-                               w = self.get_paperwidth() \
-                                 - self.m_geo_lmargin - self.m_geo_rmargin - mp
+                               w = self.get_paperwidth() - self.m_geo_lmargin \
+                                       - self.m_geo_rmargin - mp - self.m_geo_columnsep
                                if w < 0:
                                        w = 0
                                return w
                        raise "Never do this!"
        def f1(self, m, mp):
-               tmp = self.get_paperwidth() - m * 2 - mp
+               tmp = self.get_paperwidth() - m * 2 - mp - self.m_geo_columnsep
                if tmp < 0:
                        tmp = 0
                return tmp