]> git.lyx.org Git - lyx.git/commitdiff
Disable preview converters that need dv2dt if dv2dt is not available.
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 1 Feb 2011 20:03:01 +0000 (20:03 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 1 Feb 2011 20:03:01 +0000 (20:03 +0000)
This gives a better error message on the console (although it is still
impossible to figure out what went wrong from the GUI).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37407 a592a061-630c-0410-9148-cb99ea01b6c8

RELEASE-NOTES
lib/configure.py

index 0727a18feb05e0c83375d29d53fca47e3f6d9509..0341ae90a3f6898f7994fe0b81a9085d0e239162 100644 (file)
@@ -219,7 +219,7 @@ least version 2.14 for proper work.
 4.) INSTANT PREVIEW:
 
 Make sure that dv2dt (often part of LaTeX distributions) is installed
-on your system.
+on your system. Instant preview wil be disabled if dv2dt is not found.
 
 
 Known issues in version 2.0.0
index aecbfaf2b498bc09b109677bf804ed37ddf95b5f..99b931edd76ef4f2fbbfaa9fc526589bcd4ae2f3 100644 (file)
@@ -726,10 +726,17 @@ def checkConverterEntries():
         rc_entry = [ r'\converter dvi        pdf3       "%%"   ""' ])
     #
     path, dvipng = checkProg('dvipng', ['dvipng'])
-    if dvipng == "dvipng":
+    path, dv2dt  = checkProg('DVI to DTL converter', ['dv2dt'])
+    if dvipng == "dvipng" and dv2dt == 'dv2dt':
         addToRC(r'\converter lyxpreview png        "python -tt $$s/scripts/lyxpreview2bitmap.py"       ""')
     else:
+        # set empty converter to override the default imagemagick
         addToRC(r'\converter lyxpreview png        ""  ""')
+    if dv2dt == 'dv2dt':
+        addToRC(r'\converter lyxpreview ppm        "python -tt $$s/scripts/lyxpreview2bitmap.py"       ""')
+    else:
+        # set empty converter to override the default imagemagick
+        addToRC(r'\converter lyxpreview ppm        ""  ""')
     #  
     checkProg('a fax program', ['kdeprintfax $$i', 'ksendfax $$i', 'hylapex $$i'],
         rc_entry = [ r'\converter ps         fax        "%%"   ""'])
@@ -833,10 +840,15 @@ def checkConverterEntries():
             version_number = match.groups()[0]
             version = version_number.split('.')
             if int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 13):
-                addToRC(r'\converter lyxpreview-lytex ppm "python -tt $$s/scripts/lyxpreview-lytex2bitmap.py" ""')
-                if dvipng == "dvipng":
+                if dv2dt == 'dv2dt':
+                    addToRC(r'\converter lyxpreview-lytex ppm "python -tt $$s/scripts/lyxpreview-lytex2bitmap.py" ""')
+                else:
+                    # set empty converter to override the default imagemagick
+                    addToRC(r'\converter lyxpreview-lytex ppm "" ""')
+                if dvipng == "dvipng" and dv2dt == 'dv2dt':
                     addToRC(r'\converter lyxpreview-lytex png "python -tt $$s/scripts/lyxpreview-lytex2bitmap.py" ""')
                 else:
+                    # set empty converter to override the default imagemagick
                     addToRC(r'\converter lyxpreview-lytex png "" ""')
                 # Note: The --lily-output-dir flag is required because lilypond-book
                 #       does not process input again unless the input has changed,
@@ -860,8 +872,7 @@ def checkConverterEntries():
     # checkProg('Image converter', ['convert $$i $$o'])
     #
     # Entries that do not need checkProg
-    addToRC(r'''\converter lyxpreview ppm        "python -tt $$s/scripts/lyxpreview2bitmap.py" ""
-\converter lyxpreview-platex ppm        "python -tt $$s/scripts/lyxpreview-platex2bitmap.py"   ""
+    addToRC(r'''\converter lyxpreview-platex ppm        "python -tt $$s/scripts/lyxpreview-platex2bitmap.py"   ""
 \converter csv        lyx        "python -tt $$s/scripts/csv2lyx.py $$i $$o"   ""
 \converter date       dateout    "python -tt $$s/scripts/date.py %d-%m-%Y > $$o"       ""
 \converter docbook    docbook-xml "cp $$i $$o" "xml"