]> git.donarmstrong.com Git - lilypond.git/commitdiff
* python/lilylib.py (make_ps_images): make multipage _really_ work.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 4 Jul 2003 13:59:39 +0000 (13:59 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 4 Jul 2003 13:59:39 +0000 (13:59 +0000)
* scripts/lilypond-book.py (do_file): put texidoc before image.
(TexiPaper.process_ly2dvi_block): make multipage _really_ work.

ChangeLog
Documentation/user/lilypond.tely
python/lilylib.py
scripts/lilypond-book.py
scripts/update-lily.py

index ffcf4945348b5f943beee602eca867757074c05f..1692d00ab889c9a1edf49781bc00b0d738cc31a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 2003-07-04  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * python/lilylib.py (make_ps_images): make multipage _really_ work.
+
        * scripts/lilypond-book.py (do_file): put texidoc before image.
+       (TexiPaper.process_ly2dvi_block): make multipage _really_ work.
 
        * input/regression/*.ly: fix snippet octaves 
 
index 688cd78a7e85645f8cb7fd65f6e1cbb9c9290131..fe42caac3f1e7387c1d3ba9eedbd0aaba03f337a 100644 (file)
@@ -112,7 +112,7 @@ Copyright 1999--2003 by the authors
 
 @chapter GNU LilyPond --- The music typesetter
 
-This is the user manual for GNU LilyPond 1.7.16.
+This is the user manual for GNU LilyPond 1.8.0.
 
 @cindex web site
 
@@ -128,11 +128,11 @@ this and other documentation.
 * Tutorial::                       A tutorial introduction.
 * Notation manual::                All notation supported, and how to
                                    produce it 
+* Literature::                     Books about notation and engraving.
 * Technical manual::                How it all works.
 * Invoking LilyPond::              Operation.
 * Converting from other formats::  Converting to lilypond source format.
 * lilypond-book manual::           Integrating text and music with lilypond-book.
-* Literature::                     Additional reading material.
 * Index::                          Unified index.
 * Reference manual details::
 * Cheat sheet::     
index e3ae7917baaa529ea2e4e02670b7f32b167f1711..e4116f7cc5dd96f6eb9a63dc10e76640a3ccfb54 100644 (file)
@@ -401,8 +401,9 @@ def make_ps_images (ps_name, resolution = 90):
        ## todo:
        ## have better algorithm for deciding when to crop page,
        ## and when to show full page
-       
-       multi_page = re.search ('^%%Pages: ', open (ps_name).read (1024))
+
+       header = open (ps_name).read (1024)
+       multi_page = re.search ('\n%%Pages: ', header)
        cmd = ''
 
        if multi_page == None:
index 974acec3891e9942c9f47665f523ddcaca992685..316694e9096d752ea564da159de496fffe4a673b 100644 (file)
@@ -1157,20 +1157,30 @@ def format_lilypond_block (chunk):
                s = 'output-html'
 
        def html_pages (basename):
-               files =  glob.glob ("%s-page*.png"%  basename)
-
+               pat = os.path.join (g_outdir, "%s-page*.png"%  basename)
+               
+               files =  glob.glob (pat)
+               
+               
                template = '''<img align="center" valign="center"
                border="0" src="%s" alt="[picture of music]">'''
 
                str = ''
-               if not files:
+               if  files == []:
                        files = [basename+'.png' ]
-               for  f in  files:
+               else:
+                       files = map (os.path.basename, files)
+                       
+               for f in  files:
                        str += template % f
 
                str = '<a href="%s.ly">%s</a>' % (basename, str)
+
+               print 'hai', str
+               
                return str
 
+       
        newbody = newbody + get_output (s) % {'fn': basename,
                                              'htmlimages': html_pages(basename)
                                              }
@@ -1234,7 +1244,10 @@ linking to the menu.
                changed = update_file (content, outname)
 
                preview = base + ".png"
-               if changed or not os.path.isfile (preview):
+               preview_page = base + '-page1.png'
+               
+               if changed or not (os.path.isfile (preview) or
+                                  os.path.isfile (preview_page)):
                        
                        ly.system ('%s --preview --postscript --verbose %s ' % (ly2dvi_binary, base) ) 
 
index 9c5e9e604389c832317b97c120023c1d0ec4fb9c..d90bc62c37bf1d9fac52a65c12d5fe91202b25a7 100644 (file)
@@ -32,7 +32,7 @@ import stat
 import string
 import sys
 import __main__
-
+  
 package_name = 'lilypond'
 program_name = 'build-lily'
 program_version = '@TOPLEVEL_VERSION@'