1

I was writing an article type document containing text, tables and equations but it turned out that my co-workers wanted the article source as a docx file rather than as pdf or tex. So when I tried opening the pdf output of my file in Word, it didn't look as bad as I had expected. The text and table of contents are functional enough, but the docx file seems to break when parsing tables and equations.

After searching around here I've found some sources to websites and software that can convert individual equations to images, but it would be really nice if I could run such a converter on an entire tex file and have it convert the tables and equations to images automatically. It's tedious to manually convert every equation only to plug them back into the document as an image. Output can still be pdf since Word seems to handle it pretty well.

Any suggestions?

Marijn
  • 37,699
  • Did you try Pandoc to convert .tex to .docx directly? It might give better results than opening the pdf in Word. – Marijn Apr 06 '20 at 06:49
  • I haven't, I'll give that a shot – JansthcirlU Apr 06 '20 at 06:50
  • Pandoc is more of a hassle, from the brief testing I've done. It gets rid of whitespaces, the table of contents and section numbering. I still believe that just converting the equations and tables to images will be my best bet. Thanks for the suggestion though! – JansthcirlU Apr 06 '20 at 07:08
  • 1
    try make4ht -f odt filename.tex. it converts LaTeX to ODT, which can be opened in Word. – michal.h21 Apr 06 '20 at 07:57
  • It doesn't seem to be much different to just opening the output pdf in Word, the tabulars and equations are still broken. – JansthcirlU Apr 06 '20 at 09:06
  • how are they broken? you need to be more specific. preferably add a MWE to your post. – michal.h21 Apr 06 '20 at 09:33
  • I've given it some thought and I've decided to rephrase the question and to add an MWE after all. I hope this clears things up. – JansthcirlU Apr 06 '20 at 10:20
  • To avoid confusion I have rolled back this question to the original revision. The new question can be found at https://tex.stackexchange.com/questions/594797/converting-equations-to-images. – Marijn Apr 28 '21 at 12:44

1 Answers1

1

You can use the preview package:

\documentclass{article}
\usepackage[active,tightpage]{preview}
\begin{document}
Look at this table
\begin{preview}
  \begin{tabular}{cc}
    name&letter \\ \hline
    alpha&$\alpha$
  \end{tabular}
\end{preview}

And also this one
\begin{preview}
  \begin{tabular}{cc}
    name&letter \\ \hline
    beta&$\beta$
  \end{tabular}
\end{preview}
\end{document}

The output will be a PDF in which each page has a table.

  • Unfortunately this is not what I was looking for. It would be nice if a package existed that kept the layout of an entire document but replaced all the equations and tabulars with images of those equations and tabulars. – JansthcirlU Apr 06 '20 at 07:21