I need to convert Latex file (prepared using Elsevier elsarticle class in TexWorks) in to a Ms Word document. I searched for possible routes and came out with htlatex. I used htlatex to convert the tex file into html and then open that html in word and save it as docx. For conversion I used command prompt as following,

htlatex myfile.tex html "--interaction=nonstopmode"

The nonstopmode did not work, I manually had to press any key several times for it to complete. I am not sure about the reason, but it eventually did the conversion to html. I opened the converted file in Word and then saved it as docx format.

I had the following issue with this type of conversion. (i) The images were not embedded in the word document. Instead they were link with some image files (maybe because it was html conversion). In short, I sent the converted docx file via email to my other account to access it in another PC. There were no images when I opened the file (downloaded from email) in the other pc. (ii) All of the equations were inserted as image in the converted docx file and they were also not showing in the other pc account.

My questions are;

For htlatex how can I have (i) the equations not being added as images in the file and (ii) have the images already part of the html or word file instead of being linked through external files so that I can open the file with same result everywhere?

Thank you

  • 1
    You may try make4ht -f odt filename.tex. This will create ODT file, which can be directly opened by Word. Math should be preserved. It seems that there are some issues with your document, this is the reason why you need to press keys. make4ht should compile in the non-stop mode, but it will probably list some errors. It is impossible to tell what cause the errors withou MWE. – michal.h21 Nov 27 '20 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.