]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.py
* po/*.po: remerge.
[lyx.git] / lib / configure.py
index 94668e72337c6e7d731c856ef2e6dc343fb26502..395e29a12b765131536b3fb44670c09db675d4fc 100644 (file)
@@ -349,6 +349,7 @@ def checkFormatEntries(dtl_tools):
 \Format dot        dot    "Graphviz Dot"          "" ""        "%%"    "vector"
 \Format platex     tex    "LaTeX (pLaTeX)"        "" "" "%%"    "document"
 \Format literate   nw      NoWeb                  N  ""        "%%"    "document"
+\Format sweave     Rnw    "Sweave"                S  "" "%%"    "document"
 \Format lilypond   ly     "LilyPond music"        "" ""        "%%"    "vector"
 \Format latex      tex    "LaTeX (plain)"         L  ""        "%%"    "document"
 \Format pdflatex   tex    "LaTeX (pdflatex)"      "" ""        "%%"    "document"
@@ -358,6 +359,11 @@ def checkFormatEntries(dtl_tools):
 \Format text3      txt    "Plain text (ps2ascii)" "" ""        "%%"    "document"
 \Format text4      txt    "Plain text (catdvi)"   "" ""        "%%"    "document"
 \Format textparagraph txt "Plain Text, Join Lines" "" ""       "%%"    "document"''' ])
+ #
+    path, xhtmlview = checkViewer('an HTML previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
+        rc_entry = [r'\Format xhtml      html   "LyX HTML"              "" "%%" ""    "document"'])
+    if xhtmlview == "":
+        addToRC(r'\Format xhtml      html   "LyX HTML"              "" "" "%%"  "document"')
  #
     checkViewer('a BibTeX editor', ['sensible-editor', 'jabref', 'JabRef', \
         'pybliographic', 'bibdesk', 'gbib', 'kbib', \
@@ -371,7 +377,7 @@ def checkFormatEntries(dtl_tools):
     checkViewer('a Postscript previewer', ['kghostview', 'okular', 'evince', 'gv', 'ghostview -swap'],
         rc_entry = [r'''\Format eps        eps     EPS                    "" "%%"      ""      "vector"
 \Format ps         ps      Postscript             t  "%%"      ""      "document,vector"'''])
-    #
+    # for xdg-open issues look here: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg151818.html
     checkViewer('a PDF previewer', ['kpdf', 'okular', 'evince', 'kghostview', 'xpdf', 'acrobat', 'acroread', \
                    'gv', 'ghostview'],
         rc_entry = [r'''\Format pdf        pdf    "PDF (ps2pdf)"          P  "%%"      ""      "document,vector"
@@ -448,13 +454,9 @@ def checkConverterEntries():
         rc_entry = [r'''\converter literate   latex      "%%"  ""
 \converter literate   pdflatex      "%%"       ""'''])
     #
-    path, elyx = checkProg('eLyXer converter', ['elyxer.py $$i $$o'],
-        rc_entry = [ r'\converter lyx html2 "%%" ""' ] )
-    if elyx.find('elyxer.py') >= 0 :
-      addToRC(r'''\copier    html2       "python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o"''')
-      checkViewer('an eLyXer previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
-          rc_entry = [r'\Format html2   html    "HTML (eLyXer)"        e  "%%" ""      "document"'])
-
+    checkProg('a Sweave -> LaTeX converter', ['R CMD Sweave $$i'],
+        rc_entry = [r'''\converter sweave   latex      "%%"    ""
+\converter sweave   pdflatex      "%%" ""'''])
     #
     checkProg('an HTML -> LaTeX converter', ['html2latex $$i', 'gnuhtml2latex $$i', \
         'htmltolatex -input $$i -output $$o', 'java -jar htmltolatex.jar -input $$i -output $$o'],
@@ -462,20 +464,26 @@ def checkConverterEntries():
     #
     checkProg('an MS Word -> LaTeX converter', ['wvCleanLatex $$i $$o'],
         rc_entry = [ r'\converter word       latex      "%%"   ""' ])
-    # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
-    path, htmlconv = checkProg('a LaTeX -> HTML converter', ['htlatex $$i', 'htlatex.sh $$i', \
-        '/usr/share/tex4ht/htlatex $$i', 'tth  -t -e2 -L$$b < $$i > $$o', \
-        'latex2html -no_subdir -split 0 -show_section_numbers $$i', 'hevea -s $$i'],
-        rc_entry = [ r'\converter latex      html       "%%"   "needaux"' ])
-    if htmlconv.find('htlatex') >= 0 or htmlconv == 'latex2html':
-      addToRC(r'''\copier    html       "python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o"''')
+    #
+    path, elyxer = checkProg('a LyX -> HTML converter', ['elyxer.py --directory $$r $$i $$o','elyxer --directory $$r $$i $$o'],
+      rc_entry = [ r'\converter lyx      html       "%%"       ""' ])
+    if elyxer.find('elyxer') >= 0:
+      addToRC(r'''\copier    html       "python -tt $$s/scripts/ext_copy.py -e html,png,jpg,jpeg,css $$i $$o"''')
     else:
-      addToRC(r'''\copier    html       "python -tt $$s/scripts/ext_copy.py $$i $$o"''')
+      # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
+      path, htmlconv = checkProg('a LaTeX -> HTML converter', ['htlatex $$i', 'htlatex.sh $$i', \
+          '/usr/share/tex4ht/htlatex $$i', 'tth  -t -e2 -L$$b < $$i > $$o', \
+          'latex2html -no_subdir -split 0 -show_section_numbers $$i', 'hevea -s $$i'],
+          rc_entry = [ r'\converter latex      html       "%%" "needaux"' ])
+      if htmlconv.find('htlatex') >= 0 or htmlconv == 'latex2html':
+        addToRC(r'''\copier    html       "python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o"''')
+      else:
+        addToRC(r'''\copier    html       "python -tt $$s/scripts/ext_copy.py $$i $$o"''')
 
     # 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'"],
+        "/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"''')
@@ -867,9 +875,9 @@ def processModuleFile(file, bool_docbook):
 
         The top of a module file should look like this:
           #\DeclareLyXModule[LaTeX Packages]{ModuleName}
-          #BeginDescription
+          #DescriptionBegin
           #...body of description...
-          #EndDescription
+          #DescriptionEnd
           #Requires: [list of required modules]
           #Excludes: [list of excluded modules]
         The last two lines are optional