]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add --latex lilypond-book option
authorJohn Mandereau <john.mandereau@gmail.com>
Sat, 19 Apr 2008 12:00:12 +0000 (14:00 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Sat, 19 Apr 2008 12:00:12 +0000 (14:00 +0200)
scripts/lilypond-book.py

index c1b0de5bd7b51ee396084f766e3be454f806b1e7..dbbc86b7660040e301dca47de64dd4e6aa848da7 100644 (file)
@@ -135,6 +135,12 @@ def get_option_parser ():
                   action='store', dest='info_images_dir',
                   default='')
 
+    p.add_option ('--latex',
+                  help=_ ("Run executable PROG instead of latex"),
+                  metavar=_ ("PROG"),
+                  action='store', dest='latex_program',
+                  default='latex')
+
     p.add_option ('--left-padding', 
                   metavar=_ ("PAD"),
                   dest="padding_mm",
@@ -1569,7 +1575,8 @@ def get_latex_textwidth (source):
     tmp_handle.write (latex_document)
     tmp_handle.close ()
     
-    ly.system ('latex %s' % tmpfile, be_verbose=global_options.verbose)
+    ly.system ('%s %s' % (global_options.latex_program, tmpfile),
+               be_verbose=global_options.verbose)
     parameter_string = file (logfile).read()
     
     os.unlink (tmpfile)