Esteemed Colleagues,
This is not a LaTeX-related question, but I looked for, and did not find, a TeX forum, so I am submitting my question here, hopeful that it will be read by someone who can answer it.
After writing my most recent book in TeX, I came across a likely publisher for it, likely except for the bizarre requirement "All manuscripts must be submitted in Microsoft Word format". How do I satisfy this publisher's bizarre requirement? Is there a program that can convert a .dvi file to Microsoft Word format?
I duly attempted to answer this question on my own before appealing to the readership of this forum, and I found https://en.wikibooks.org/wiki/LaTeX/Export_To_Other_Formats, which offered a technique to convert a LaTeX input file to a file in RTF format, which could then be converted to Microsoft Word format through other means. It seems, however, that LaTeX is not what I thought it was, TeX that has read some input files that define some useful macros. On the contrary, the LaTeX program appears to create .aux, and sometimes .bbl, files, which the conversion-to-RTF procedure requires. I do not know what .aux and .bbl files are. Hence my original question, How can I convert a .dvi file to Microsoft Word format, so I can satisfy this publisher's bizarre requirement? If you think that the answer to this question is not of general interest, please send electronic mail to the address that is indicated below. Thank you in advance for any and all replies.
jay at m5 dot chicago dot il dot us
Conversion Tools ⇒ converting a .dvi file to Microsoft Word format
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10347
- Joined: Mon Mar 10, 2008 9:44 pm
Re: converting a .dvi file to Microsoft Word format
Hi Jay!
.aux files contain external data such as labels for references. A .bbl file contains the bibliography in TeX format.
I think would not convert dvi to rtf or word, , but start with the .tex file. There are tools to convert TeX to html, such as tex4ht, and html can be imported in Word, and you keep the logical structure.
Or use pandoc to convert from .tex to .html and then open in Word, or to Markdown format first.
Stefan
.aux files contain external data such as labels for references. A .bbl file contains the bibliography in TeX format.
I think would not convert dvi to rtf or word, , but start with the .tex file. There are tools to convert TeX to html, such as tex4ht, and html can be imported in Word, and you keep the logical structure.
Or use pandoc to convert from .tex to .html and then open in Word, or to Markdown format first.
Stefan
LaTeX.org admin
Re: converting a .dvi file to Microsoft Word format
I tried both pandoc and tex4ht. Neither one worked adequately.
Pandoc did not work at all. The command "pandoc -o parasha_puzzles.html parasha_puzzles.tex" immediately produced the following error:
Error at "source" (line 1, column 8):
unexpected mac
\input mac
Maybe pandoc needs other, uninstalled, files to work properly, but if so it gives no information of what they are.
The tex4ht program did not fail immediately with an error message, but it produced output that is useless. In the html file that it produced, all the spacing is gone. There are no line breaks. There are no paragraph breaks. The entire 135-page book is one very long line, and there are no changes in typeface or point size, either, all the characters are the same size and in the same typeface. I can show you the output that it produces, because I put it on my website, but before you look at it, please remember that this is an unpublished book, so please respect my copyright on my unpublished book. Also, the book will be published pseudonymously, so please respect the privacy of my pseudonym.
Bearing in mind those two things, you can now look at http://m5.chicago.il.us/docs/parasha_puzzles.html (make sure you type http: and not https: because my website is unforgiving of errors). You will agree that the output of tex4ht is completely useless. Now replace the .html at the end of that URL with a .pdf and you will now see what the book is supposed to look like (except that in the .pdf file, I manually moved the table of contents from the end of the book to immediately after the titlepage). There are spaces where there are supposed to be, there are changes in typeface and pointsize where there are supposed to be. Also there are characters like h with an underdot, which is a legitimate Unicode character that can be rendered in html, but in the output of tex4ht it shows up as "h ." which is different, and utterly unreadable. I am certain you will agree that the HTML generated by text4ht is useless.
The .pdf file was generated by running etex on the TeX input document to create a .dvi file, running dvips 3 times on the .dvi file to create 3 PostScript files (titlepage, body, table of contents) and then running gs on the 3 PostScript files to put the table of contents after the titlepage instead of at the end, and to convert the whole thing to PDF. How do I create a Microsoft Word document that looks like what the book is supposed to look like, to satisfy my publisher's bizarre request that all manuscripts be submitted in Microsoft Word format? Thank you in advance for any and all replies.
jay at m5 dot chicago dot il dot us
Pandoc did not work at all. The command "pandoc -o parasha_puzzles.html parasha_puzzles.tex" immediately produced the following error:
Error at "source" (line 1, column 8):
unexpected mac
\input mac
Maybe pandoc needs other, uninstalled, files to work properly, but if so it gives no information of what they are.
The tex4ht program did not fail immediately with an error message, but it produced output that is useless. In the html file that it produced, all the spacing is gone. There are no line breaks. There are no paragraph breaks. The entire 135-page book is one very long line, and there are no changes in typeface or point size, either, all the characters are the same size and in the same typeface. I can show you the output that it produces, because I put it on my website, but before you look at it, please remember that this is an unpublished book, so please respect my copyright on my unpublished book. Also, the book will be published pseudonymously, so please respect the privacy of my pseudonym.
Bearing in mind those two things, you can now look at http://m5.chicago.il.us/docs/parasha_puzzles.html (make sure you type http: and not https: because my website is unforgiving of errors). You will agree that the output of tex4ht is completely useless. Now replace the .html at the end of that URL with a .pdf and you will now see what the book is supposed to look like (except that in the .pdf file, I manually moved the table of contents from the end of the book to immediately after the titlepage). There are spaces where there are supposed to be, there are changes in typeface and pointsize where there are supposed to be. Also there are characters like h with an underdot, which is a legitimate Unicode character that can be rendered in html, but in the output of tex4ht it shows up as "h ." which is different, and utterly unreadable. I am certain you will agree that the HTML generated by text4ht is useless.
The .pdf file was generated by running etex on the TeX input document to create a .dvi file, running dvips 3 times on the .dvi file to create 3 PostScript files (titlepage, body, table of contents) and then running gs on the 3 PostScript files to put the table of contents after the titlepage instead of at the end, and to convert the whole thing to PDF. How do I create a Microsoft Word document that looks like what the book is supposed to look like, to satisfy my publisher's bizarre request that all manuscripts be submitted in Microsoft Word format? Thank you in advance for any and all replies.
jay at m5 dot chicago dot il dot us
- Stefan Kottwitz
- Site Admin
- Posts: 10347
- Joined: Mon Mar 10, 2008 9:44 pm
Re: converting a .dvi file to Microsoft Word format
tex4ht comes with a lot of options to customize its behavior. If the output is so wrong, perhaps you can find better settings. Did you try the things from the manual?
Similar with pandoc, it can be used in various ways.
I'm pretty confident that with some reading and tries both tex4ht and pandoc cam produce usable output.
Worst scenario, you could copy&paste from the PDF into Word and go manually through it.
An interesting option could be the .tex file to an LLM like ChatGPT and tell it, to convert it in a certain way. Or upload the PDF and tell it to render it in html or rtf. The output may be a base for finalizing.
Stefan
Similar with pandoc, it can be used in various ways.
I'm pretty confident that with some reading and tries both tex4ht and pandoc cam produce usable output.
Worst scenario, you could copy&paste from the PDF into Word and go manually through it.
An interesting option could be the .tex file to an LLM like ChatGPT and tell it, to convert it in a certain way. Or upload the PDF and tell it to render it in html or rtf. The output may be a base for finalizing.
Stefan
LaTeX.org admin