Quote:
Originally Posted by dugan
Look. When I asked you “what is your actual use case here,” I was asking why you were converting .tex to .odt. You still haven’t answered, but since you mentioned that you were writing a book, I’m guessing that it’s because your publisher wants ODT.
That’s the only reason I can imagine for not just keeping it in a format that won’t lose any formatting (LaTeX, Postscript or PDF).
That means that you don’t have to worry about things like page widths. They expect to request revisions, which will likely mean that formatting has to be redone, and then they’re probably going to do their own typesetting.
|
I just hadn't gotten to your post, I don't mind publicizing my use case which is as follows:
Yes, I'm writing a book, and I simply assumed that Libre Office Writer was the correct tool since I haven't used Microsoft Word in over ten years - I hunted down all of my XP and Windows 10 machines, and NONE of them have Word on them, or any of Office. I have used Writer sporadically but can passably use it enough to write a book as I've already gotten 110 pages done and it looks quite nice - it's just that I don't yet do fancy things with textflow. My publisher - it sounds like they use Word in their houses of worship. So when I upload to our publishing repository (each revision) I upload in 3 documents - odt, doc, and pdf. But honestly, I do the writing in odt within Libre Office. I would only use pdf as a final stage. The problem comes down to the inclusion of scientific or engineering style publications which I did in tex and exported to pdf which is tex's output. So when I went to include them in the odt, that's when the trouble started. I actually have NOT expermimented much with actually including the pdf directly in the odt but I suspect it's not going to work. Hence I started researching tex to odt conversion and got as far as HTML (which looks absolutely perfect). But I cannot get a nice-looking odt file to be generated by my processes which are the following two (I have not yet investigated opening the file in Word as I don't have Word):
1)
Commands 1 and 3 run without error if in 1 I use .eps file (not jpeg). But 2 has errors, not sure if the 3 errors mattered or not as it DID produce some output. But the 3rd command returned 0 – no errors at all, and it made an odt file – need to view the file.
1. latex filename.tex
2. bibtex filename.aux
3. mk4ht oolatex filename.tex
It’s sad but the #3 command turns vec into rightarrow and so it doesn’t work. I don’t know why the html file producing command preserves the vectors.
and
2) (this one shows real promise as it generates a terrific HTML file once I add one little tiny bit to it)
I tried various converters and combinations, but I obtained the best results with the following procedure.
1) Use htlatex to produce HTML code, with the following options:
htlatex document.tex "xhtml,mathml" " -cunihtf -utf8"
2) Convert the html with pandoc:
pandoc -s document.html -o document.docx
The above html conversion goes fabulously well but my t4ht is out of date.
The above looks great at the html stage but not good after the odt is generated. The odt file is just not there yet.
So the above is my USE CASE.
I do have some work on Windows but most of the book has been written on Linux with Libre Office Writer. I started the first
60 pages on my cellphone because I was sick but I'm better now and work on 3 of my PCs: Fatdog, Linux Mint, and Windows 10.
I guess I don't yet know exactly what the publisher will do with typesetting the final book - I can ask them though. They seem to like Word.