4

I defined a table in LaTeX : \begin{tabular}....\end{tabular}.

Now i want to export that table to an image (PNG or something}.

It is possible? How can i do that?

migrated from stackoverflow.com Jul 12 '12 at 18:02

This question came from our site for professional and enthusiast programmers.

  • Welcome to TeX.sx! Your question was migrated here from Stack Overflow site. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner Jul 12 '12 at 18:48
8

The easiest way to do that would be to enclose your tabular in a document, with the standalone class.

\documentclass[a4paper, 11pt]{standalone}
\begin{document}

    \begin{tabular}{}

    \end{tabular}       

\end{document}

Then compile it with dvipng or use ImageMagick to convert the div into a png.

The credits go to Martin Scharrer.

  • How can i get the dvipng? – Ricardo Jul 12 '12 at 13:37
  • Right here – Laura Jul 12 '12 at 13:49
  • Btw i m using MikTek in Windows 7 – Ricardo Jul 12 '12 at 13:52
  • 1
    divpng is also available for windows. You could also use ImageMagick to convert the div in an png. Apparently MikTex has a program called dvipng.exe that converts dvi's to png's. – Laura Jul 12 '12 at 14:30
  • @Ricardo Please note the difference between preview and crop option of standalone package. More about it here: tex.stackexchange.com/q/63045/3235 – percusse Jul 12 '12 at 22:08

Your Answer

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