]> git.lyx.org Git - features.git/commitdiff
configure.py:
authorUwe Stöhr <uwestoehr@web.de>
Wed, 11 Aug 2010 00:57:48 +0000 (00:57 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 11 Aug 2010 00:57:48 +0000 (00:57 +0000)
- use eLyXer not only for HTML but also for HTML (MS Word) if it is found; this is simply the same code as we are already using for HTML converter check
- fix a bug that the copier calling would be wrong if neither eLyXer nor tex4ht is found (this is already fixed in the HTML converter check

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

lib/configure.py

index 6ac45507b651b78a0ad4b71d4039ec03dab02c01..4b7fbcbdc2ce8e01c43cd0fe461b7812a7ba0ec0 100644 (file)
@@ -621,6 +621,7 @@ def checkConverterEntries():
     #
     checkProg('an MS Word -> LaTeX converter', ['wvCleanLatex $$i $$o'],
         rc_entry = [ r'\converter word       latex      "%%"   ""' ])
+
     # eLyXer: search as a Python module and then as an executable (elyxer.py, elyxer)
     elyxerfound = checkModule('elyxer')
     if elyxerfound:
@@ -653,13 +654,29 @@ def checkConverterEntries():
       addToRC(r'\Format    blog       blog       "LyxBlogger"           "" "" ""  "document"')
       addToRC(r'\converter xhtml      blog       "lyxblogger $$i"       ""')
 
-    # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
-    path, htmlconv = checkProg('a LaTeX -> MS Word converter', ["htlatex $$i 'html,word' 'symbol/!' '-cvalidate'", \
-        "htlatex.sh $$i 'html,word' 'symbol/!' '-cvalidate'", \
-        "/usr/share/tex4ht/htlatex $$i 'html,word' 'symbol/!' '-cvalidate'"],
-        rc_entry = [ r'\converter latex      wordhtml   "%%"   "needaux"' ])
-    if htmlconv.find('htlatex') >= 0:
-      addToRC(r'''\copier    wordhtml       "python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o"''')
+    if elyxerfound:
+      addToRC(r'''\converter lyx      wordhtml       "python -m elyxer --html --directory $$r $$i $$o" ""''')
+    else:
+      path, elyxer = checkProg('a LyX -> MS Word converter',
+        ['elyxer.py --directory $$r $$i $$o', 'elyxer --html --directory $$r $$i $$o'],
+        rc_entry = [ r'\converter lyx      wordhtml       "%%" ""' ])
+      if elyxer.find('elyxer') >= 0:
+        elyxerfound = True
+
+    if elyxerfound:
+      addToRC(r'''\copier    wordhtml       "python -tt $$s/scripts/ext_copy.py -e html,png,jpg,jpeg,css $$i $$o"''')
+    else:
+      # search for other converters than eLyXer
+      # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
+      path, htmlconv = checkProg('a LaTeX -> MS Word converter', ["htlatex $$i 'html,word' 'symbol/!' '-cvalidate'", \
+          "htlatex.sh $$i 'html,word' 'symbol/!' '-cvalidate'", \
+          "/usr/share/tex4ht/htlatex $$i 'html,word' 'symbol/!' '-cvalidate'"],
+          rc_entry = [ r'\converter latex      wordhtml   "%%" "needaux"' ])
+      if htmlconv.find('htlatex') >= 0:
+        addToRC(r'''\copier    wordhtml       "python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o"''')
+      else:
+        addToRC(r'''\copier    wordhtml       "python -tt $$s/scripts/ext_copy.py $$i $$o"''')
+
     #
     checkProg('an OpenOffice.org -> LaTeX converter', ['w2l -clean $$i'],
         rc_entry = [ r'\converter sxw        latex      "%%"   ""' ])