X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fscripts%2Flegacy_lyxpreview2ppm.py;h=be242cc19247d08ad5a3c0172efafe78876b633d;hb=f97bc9b9e754367c325f04448975993aafb152e7;hp=cf73897d675b3c294b9cbf31c140e7b42e8dba71;hpb=01c71419d9e8e21fab0dfcd6363b31b53f61faf7;p=lyx.git diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py index cf73897d67..be242cc192 100644 --- a/lib/scripts/legacy_lyxpreview2ppm.py +++ b/lib/scripts/legacy_lyxpreview2ppm.py @@ -224,8 +224,11 @@ def crop_files(pnmcrop, basename): def legacy_conversion(argv): + latex_commands = ["latex", "pplatex", "platex", "latex2e"] # Parse and manipulate the command line arguments. - if len(argv) != 6: + if len(argv) == 7: + latex_commands = [argv[6]] + elif len(argv) != 6: error(usage(argv[0])) dir, latex_file = os.path.split(argv[1]) @@ -242,7 +245,7 @@ def legacy_conversion(argv): # External programs used by the script. path = string.split(os.environ["PATH"], os.pathsep) - latex = find_exe_or_terminate(["latex", "pplatex", "platex", "latex2e"], path) + latex = find_exe_or_terminate(latex_commands, path) # Move color information into the latex file. if not legacy_latex_file(latex_file, fg_color, bg_color, bg_color_gr):