]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-book.py
* scm/lily.scm (lilypond-all): option read-file-list: substitute
[lilypond.git] / scripts / lilypond-book.py
index c81e103177ec269c8ea7c60bf13a415fe634ab17..9e2932113ffb46b906104ac96c08422ee7a36795 100644 (file)
@@ -47,6 +47,8 @@ for d in ['@lilypond_datadir@',
 
 # dynamic relocation, for GUB binaries.
 bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
+
+os.environ['PATH'] = bindir + ':' + os.environ['PATH']
 for p in ['share', 'lib']:
     datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
     sys.path.insert (0, datadir)
@@ -132,6 +134,7 @@ def get_option_parser ():
     p.add_option ('-f', '--format',
                   help=_('''use output format FORMAT (texi [default], texi-html, latex, html)'''),
                   action='store')
+    
     p.add_option ("-I", '--include', help=_('add DIR to include path'),
                   metavar="DIR",
                   action='append', dest='include_path',
@@ -535,7 +538,6 @@ output = {
     LATEX: {
         OUTPUT: r'''{%%
 \parindent 0pt%%
-\catcode`\@=12%%
 \ifx\preLilyPondExample \undefined%%
  \relax%%
 \else%%
@@ -1380,7 +1382,11 @@ def process_snippets (cmd, ly_snippets, texstr_snippets, png_snippets):
             my_system ('latex %s.texstr' % l)
 
     if ly_names:
-        my_system (string.join ([cmd, 'snippet-map.ly'] + ly_names))
+        open ('snippet-names', 'w').write ('\n'.join (['snippet-map.ly']
+                                                      + ly_names))
+        
+        my_system (string.join ([cmd, 'snippet-names']))
+
 
 LATEX_INSPECTION_DOCUMENT = r'''
 \nonstopmode
@@ -1707,12 +1713,21 @@ def main ():
         global_options.process_cmd += string.join ([(' -I %s' % commands.mkarg (p))
                               for p in global_options.include_path])
 
+    if global_options.format in (TEXINFO, LATEX):
+        ## prevent PDF from being switched on by default.
+        global_options.process_cmd += ' --formats=eps '
+        
     if (global_options.format in (TEXINFO, LATEX)
         and global_options.create_pdf):
         global_options.process_cmd += "--pdf  -deps-font-include -dgs-font-load "
 
+        
+    
     if global_options.verbose:
         global_options.process_cmd += " --verbose "
+
+    global_options.process_cmd += " -dread-file-list "
+
     identify ()
 
     try: