+ # Move color information, lyx and tightpage options into the latex file.
+ if not legacy_latex_file(latex_file, fg_color, bg_color):
+ error("""Unable to move the color information, and the lyx and tightpage
+ options of preview-latex, into the latex file""")
+
+ # Compile the latex file.
+ latex_status, latex_stdout = run_latex(latex, latex_file)
+
+ if pdf_output:
+ return legacy_conversion_step3(latex_file, dpi, output_format, True, skipMetrics)
+ else:
+ return legacy_conversion_step2(latex_file, dpi, output_format, skipMetrics)
+
+# Creates a new LaTeX file from the original with pages specified in