]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/book_latex.py
lilypond-book: Textwidth detection with included file (issue 3136).
[lilypond.git] / python / book_latex.py
index f2aa5e36cf6106e2c427fe30465bf9c1d446be6f..e1eda89983f2e3850df4695a1be838ff27e0ba7c 100644 (file)
@@ -13,6 +13,7 @@ global _;_=ly._
 progress = ly.progress
 warning = ly.warning
 error = ly.error
+debug = ly.debug_output
 
 # Recognize special sequences in the input.
 #
@@ -186,9 +187,10 @@ def get_latex_textwidth (source, global_options):
     tmp_handle.close ()
 
     progress (_ ("Running `%s' on file `%s' to detect default page settings.\n")
-              % (global_options.latex_program, tmpfile));
-    cmd = '%s %s' % (global_options.latex_program, tmpfile);
-    ly.debug_output ("Executing: %s\n" % cmd);
+              % (global_options.latex_program, tmpfile))
+    cmd = 'TEXINPUTS=%s:$TEXINPUTS %s %s' \
+        % (global_options.input_dir, global_options.latex_program, tmpfile)
+    debug ("Executing: %s\n" % cmd)
     run_env = os.environ.copy()
     run_env['LC_ALL'] = 'C'