]> git.lyx.org Git - lyx.git/commitdiff
Fix preview of lilypond (book) snippets (#13103) master
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 27 Sep 2024 07:27:32 +0000 (09:27 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 27 Sep 2024 07:27:32 +0000 (09:27 +0200)
1. The --safe option has been removed with lilypond 2.24 and causes
   the program to error out
2. We default to PDF output (and pdflatex) if no program is explicitly
   given, since latex generates *.eps snippets which fail to convert
   on many recent systems due to security measures

lib/scripts/lyxpreview2bitmap.py

index ab9afaa21cc432c67b878656b53f7471b598acce..f7d4edcc8d284b98bc2fa0b3972915560721d65f 100755 (executable)
@@ -400,7 +400,11 @@ def main(argv):
     bibtex = find_exe(bibtex or bibtex_commands)
     if lilypond:
         lilypond_book = find_exe_or_terminate(lilypond_book or
-            ["lilypond-book --safe"])
+            ["lilypond-book"])
+        if lilypond_book and latex == "latex":
+            # with lilypond, we default to pdflatex rather than latex
+            # as we do not want to deal with eps conversion (see #13103)
+            latex = "pdflatex"
 
     # These flavors of latex are known to produce pdf output
     pdf_output = latex in pdflatex_commands