X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fbook_latex.py;h=ec5412b1d8192bee41e292e31bc62a78798cc45d;hb=b872748c6aa8bb721ced458691b38ac2fac5dfc8;hp=22dc3a5f19540ef1d192c255b51b7f0f27da607b;hpb=3606a52041117a0ce85b32e5439ef6b996ae9fd0;p=lilypond.git diff --git a/python/book_latex.py b/python/book_latex.py index 22dc3a5f19..ec5412b1d8 100644 --- a/python/book_latex.py +++ b/python/book_latex.py @@ -207,7 +207,13 @@ def get_latex_textwidth (source, global_options): output_filename = os.path.join(output_dir, 'output.txt') # call command cmd += " > %s" % output_filename + oldtexinputs = os.environ.get ('TEXINPUTS') + os.environ['TEXINPUTS'] = run_env['TEXINPUTS'] returncode = os.system(cmd) + if oldtexinputs: + os.environ['TEXINPUTS'] = oldtexinputs + else: + del os.environ['TEXINPUTS'] parameter_string = open(output_filename).read() if returncode != 0: warning (_ ("Unable to auto-detect default settings:\n"))