X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fscripts%2Flyxpreview2bitmap.py;h=c4c1844b669e9b6031936e84095d6bd242b23a30;hb=873f0f4297fc4c962893c67bf83b52669296d325;hp=7b19e482444f597cbb484b8699c556bf9b09a82a;hpb=13b1277cd2f22bca7b4dec40eb6ca762b7d6fafe;p=lyx.git diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index 7b19e48244..c4c1844b66 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -392,7 +392,8 @@ def main(argv): latex = find_exe_or_terminate(latex or latex_commands) bibtex = find_exe(bibtex or bibtex_commands) if lilypond: - lilypond_book = find_exe_or_terminate(lilypond_book or ["lilypond-book"]) + lilypond_book = find_exe_or_terminate(lilypond_book or + ["lilypond-book --safe"]) # These flavors of latex are known to produce pdf output pdf_output = latex in pdflatex_commands @@ -411,19 +412,15 @@ def main(argv): if lilypond: progress("Preprocess the latex file through %s" % lilypond_book) if pdf_output: - lilypond_book += ' --pdf' + lilypond_book += " --pdf" + lilypond_book += " --latex-program=%s" % latex.split()[0] # Make a copy of the latex file lytex_file = latex_file_re.sub(".lytex", latex_file) shutil.copyfile(latex_file, lytex_file) # Preprocess the latex file through lilypond-book. - lytex_call = '%s --safe --latex-program=%s "%s"' % (lilypond_book, - latex, lytex_file) - lytex_status, lytex_stdout = run_command(lytex_call) - if lytex_status: - warning("%s failed to compile %s" \ - % (os.path.basename(lilypond_book), lytex_file)) + lytex_status, lytex_stdout = run_tex(lilypond_book, lytex_file) if pdf_output: progress("Using the legacy conversion method (PDF support)")