]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/book_latex.py
Revert "Issue 3795: python/convertrules.ly: Use bare rhythms after ties for simple...
[lilypond.git] / python / book_latex.py
index 8d2104b08dd5e5a880a4dc3c9b6dc363e570315c..a47c950e248152e2f01158880e58d52cab835265 100644 (file)
@@ -189,7 +189,7 @@ def get_latex_textwidth (source, global_options):
 
     progress (_ ("Running `%s' on file `%s' to detect default page settings.\n")
               % (global_options.latex_program, tmpfile))
-    cmd = 'TEXINPUTS=%s:$TEXINPUTS %s %s' \
+    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()
@@ -296,9 +296,10 @@ class BookLatexOutputFormat (BookBase.BookOutputFormat):
     def input_fullname (self, input_filename):
         # Use kpsewhich if available, otherwise fall back to the default:
         if ly.search_exe_path ('kpsewhich'):
-            return os.popen ('kpsewhich ' + input_filename).read()[:-1]
-        else:
-            return BookBase.BookOutputFormat.input_fullname (self, input_filename)
+            trial = os.popen ('kpsewhich ' + input_filename).read()[:-1]
+            if trial:
+                return trial
+        return BookBase.BookOutputFormat.input_fullname (self, input_filename)
 
     def process_chunks (self, chunks):
         for c in chunks: