2

I would like to write an .odt file programmatically e.g. include figures from a directory or use different style writing code (like a LaTeX document).

I wonder how can I compile an .odt file and if there are any, which is the best python libraries to do that.

G M
  • 303
  • 5
  • 14
  • Related: [How to convert .tex into .odt? on Ask Ubuntu](http://askubuntu.com/questions/82634/how-to-convert-tex-into-odt) Or try Google for "latex2odt" which brought me plenty of interesting-looking hits. – user Dec 19 '13 at 14:40
  • 2
    Your question is off-topic here now. It's about programming (-> stackoverflow), but also too broad as the topic you ask is just too long to be answered correctly. Regarding the best library to use it's software / tool recommendation, which is again off-topic here. – Máté Juhász Nov 28 '18 at 07:27
  • https://appyframework.org/pod.html this is the best solution I found, I hope it can be useful to others unfortunately I can not post it as an answer! – G M Aug 19 '20 at 06:53

1 Answers1

2

Writing a library to do this would be considerably harder then your are anticipating.

Instead, convert the .tex file into an intermediary format, such as HTML (or PDF) and then convert it again into .odt using already existing tools.

Source/Example

David
  • 9,144
  • 3
  • 24
  • 41