Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
22
rated 0 times [  22] [ 0]  / answers: 1 / hits: 55708  / 3 Years ago, sun, september 19, 2021, 12:55:05

I wish to convert a .tex file into an .odt file.

Can you suggest a good step-by-step solution?


More From » libreoffice

 Answers
4

Believe it or not, with complex documents and lots of packages included, I got much better results with LaTeX2HTML than with LaTeX2RTF, Pandoc or TeX4ht.



latex2html texfile.tex -split 0 -no_navigation -info "" -address "" -html_version 4.0,unicode


This will generate a folder with the same texfile name, so you'll be able to convert the generated HTML to ODT:



libreoffice --headless --convert-to odt:"OpenDocument Text Flat XML" texfile/index.html


This will produce a index.odt file. Take a look at this answer to check how to use LibreOffice's convert filters.



Edit from comment discussion:



Although the method above works, it is very disappointing that the only way I found to generate a trully reliable document is using the PDF output from LaTeX on Adobe Acrobat Pro.


[#41834] Sunday, September 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bsorbedeldy

Total Points: 315
Total Questions: 110
Total Answers: 108

Location: Reunion
Member since Mon, Dec 28, 2020
3 Years ago
;