]> git.donarmstrong.com Git - lilypond.git/commitdiff
Make lilypond-book call pdflatex by default if --pdf is given
authorJohn Mandereau <john.mandereau@gmail.com>
Sun, 10 Jan 2010 15:38:12 +0000 (16:38 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Sun, 10 Jan 2010 23:51:07 +0000 (00:51 +0100)
This fixes LaTeX crashes that happen for documents which declare
packages with options not compatible with DVI mode.  See dicussion on
users list at
http://lists.gnu.org/archive/html/lilypond-user/2010-01/msg00093.html

scripts/lilypond-book.py

index 5dd263b6ac10bae988aa2ef86634c4749f2b4994..202af654087c5e9fe5931f8eb36e2d70669375fe 100644 (file)
@@ -164,7 +164,8 @@ def get_option_parser ():
                   default='')
 
     p.add_option ('--latex-program',
-                  help=_ ("run executable PROG instead of latex"),
+                  help=_ ("run executable PROG instead of latex, or in\n\
+case --pdf option is set instead of pdflatex"),
                   metavar=_ ("PROG"),
                   action='store', dest='latex_program',
                   default='latex')
@@ -2150,6 +2151,8 @@ def main ():
         global_options.process_cmd += ' --formats=eps '
         if global_options.create_pdf:
             global_options.process_cmd += "--pdf -dinclude-eps-fonts -dgs-load-fonts "
+            if global_options.latex_program == 'latex':
+                global_options.latex_program = 'pdflatex'
 
     if global_options.verbose:
         global_options.process_cmd += " --verbose "