From: Enrico Forestieri Date: Mon, 27 Apr 2015 15:22:25 +0000 (+0200) Subject: Try hard to obtain an instant preview. X-Git-Tag: 2.2.0alpha1~955 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=691fdea346eb5643bff3f84017629d966a90af05;p=lyx.git Try hard to obtain an instant preview. When the dvipng route is selected and latex fails, the lyxpreview2bitmap.py script simply bails out. The failure may be due to using a specific pdf only feature in ERT (for example, the inclusion of a pdf image). In this case the procedure may succeed simply trying to use pdflatex and the legacy conversion method. --- diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index 5655bf36ca..b387529189 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -413,7 +413,9 @@ def main(argv): # Compile the latex file. latex_status, latex_stdout = run_latex(latex, latex_file, bibtex) if latex_status: - return (latex_status, []) + progress("Using the legacy conversion method and pdflatex (latex failed)") + return legacy_conversion_step1(latex_file, dpi, output_format, fg_color, + bg_color, "pdflatex", True) # The dvi output file name dvi_file = latex_file_re.sub(".dvi", latex_file)