Am 02.06.2015 um 17:14 schrieb Richard Heck:
I think we just need to figure out which conversions we want.
Pandoc cannot read OpenDocument but it can write it: - latex -> OpenDocument It can write Office Open XML: - latex -> Office Open XML It can read Office Open XML: - Office Open XML > LaTeX
Yes, that's right. It'd be easy to include the relevant code.
Attached is a patch. regards Uwe
diff --git "a/C:\\Users\\Usti\\AppData\\Local\\Temp\\TortoiseGit\\conDBCF.tmp\\configure-cda4589-left.py" "b/D:\\LyXGit\\Master\\lib\\configure.py" index ba5d2a4..664e483 100644 --- "a/C:\\Users\\Usti\\AppData\\Local\\Temp\\TortoiseGit\\conDBCF.tmp\\configure-cda4589-left.py" +++ "b/D:\\LyXGit\\Master\\lib\\configure.py" @@ -680,11 +680,13 @@ def checkFormatEntries(dtl_tools): checkViewerEditor('an OpenDocument viewer', ['libreoffice', 'lwriter', 'lowriter', 'oowriter', 'swriter', 'abiword'], rc_entry = [r'''\Format odt odt "OpenDocument (tex4ht)" "" "%%" "%%" "document,vector,menu=export" "application/vnd.oasis.opendocument.text" \Format odt2 odt "OpenDocument (eLyXer)" "" "%%" "%%" "document,vector,menu=export" "application/vnd.oasis.opendocument.text" +\Format odt3 odt "OpenDocument (Pandoc)" "" "%%" "%%" "document,vector,menu=export" "application/vnd.oasis.opendocument.text" \Format sxw sxw "OpenOffice.Org (sxw)" "" "" "" "document,vector" "application/vnd.sun.xml.writer"''']) # checkViewerEditor('a Rich Text and Word viewer', ['libreoffice', 'lwriter', 'lowriter', 'oowriter', 'swriter', 'abiword'], rc_entry = [r'''\Format rtf rtf "Rich Text Format" "" "%%" "%%" "document,vector,menu=export" "application/rtf" -\Format word doc "MS Word" W "%%" "%%" "document,vector,menu=export" "application/msword"''']) +\Format word doc "MS Word" W "%%" "%%" "document,vector,menu=export" "application/msword" +\Format word2 docx "MS Word Office Open XML" W "%%" "%%" "document,vector,menu=export" "application/vnd.openxmlformats-officedocument.wordprocessingml.document"''']) # # entries that do not need checkProg addToRC(r'''\Format date "" "date command" "" "" "" "" "" @@ -831,6 +833,9 @@ def checkConverterEntries(): # used as an intermediate step for export to pdf, which is not wanted. checkProg('an OpenDocument -> PDF converter', ['unoconv -f pdf --stdout $$i > $$o'], rc_entry = [ r'\converter odt pdf6 "%%" ""' ]) + # + checkProg('a MS Word Office Open XML converter -> LaTeX', ['pandoc -s -f docx -o $$o -t latex $$i'], + rc_entry = [ r'\converter word2 latex "%%" ""' ]) # According to http://www.tug.org/applications/tex4ht/mn-commands.html # the command mk4ht oolatex $$i has to be used as default, # but as this would require to have Perl installed, in MiKTeX oolatex is @@ -845,6 +850,12 @@ def checkConverterEntries(): checkProg('a LaTeX -> RTF converter', ['latex2rtf -p -S -o $$o $$i', 'latex2rt -p -S -o $$o $$i'], rc_entry = [ r'\converter latex rtf "%%" "needaux"' ]) # + checkProg('a LaTeX -> Open Document (Pandoc) converter', ['pandoc -s -f latex -o $$o -t odt $$i'], + rc_entry = [ r'\converter latex odt3 "%%" "needaux"' ]) + # + checkProg('a LaTeX -> MS Word Office Open XML converter', ['pandoc -s -f latex -o $$o -t docx $$i'], + rc_entry = [ r'\converter latex word2 "%%" "needaux"' ]) + # checkProg('a RTF -> HTML converter', ['unrtf --html $$i > $$o'], rc_entry = [ r'\converter rtf html "%%" ""' ]) # Do not define a converter to pdf6, ps is a pure export format