1

This is literally my first time using Latex, so although I found threads like How to export a table? or Compile a LaTeX document into a PNG image that's as short as possible, I'm not sure where to find dvipng.exe. I am using WinEdt8 if that helps.

\documentclass[12pt]{article}
\begin{document}

\begin{table}[ht] \centering \begin{tabular}{rrrrr} \hline Seed & Current System & n=5 & n=7 & n=9 \ \hline 1 & 25.00 & 15.63 & 22.26 & 29.03 \ 2 & 19.90 & 11.80 & 15.02 & 17.50 \ 3 & 15.60 & 9.27 & 10.74 & 11.47 \ 4 & 11.90 & 8.36 & 9.29 & 9.51 \ 5 & 8.80 & 6.64 & 6.73 & 6.31 \ 6 & 6.30 & 5.87 & 5.67 & 5.08 \ 7 & 4.30 & 5.19 & 4.77 & 4.06 \ 8 & 2.80 & 4.64 & 4.09 & 3.34 \ 9 & 1.70 & 4.06 & 3.40 & 2.65 \ 10 & 1.10 & 3.50 & 2.76 & 2.04 \ 11 & 0.80 & 3.27 & 2.53 & 1.83 \ 12 & 0.70 & 2.85 & 2.07 & 1.39 \ 13 & 0.60 & 2.54 & 1.77 & 1.15 \ 14 & 0.50 & 2.29 & 1.54 & 0.96 \ Playoff Teams & 0.00 & 14.08 & 7.35 & 3.70 \ \hline \end{tabular} \end{table}

\end{document}

A very simple answer would be much appreciated

7
  • dvipng is on a Win8.1 system at C:\Program Files (x86)\MiKTeX 2.9\miktex\bin. Another option is to compile to pdf, open the pdf, copy and paste image into powerpoint. Now save as a png. Ok for one time actions. If you need to do this a lot then set up a user option in winedt to run dvipng on the current base filename after it has compiled a *.dvi file. May 15, 2015 at 17:26
  • Perhaps, instead use \documentclass[convert=true]{standalone} which should convert the output (PS or PDF) to PNG by default. It requires the addition of --shell-escape and also having Imagemagick installed.
    – Werner
    May 15, 2015 at 17:26
  • Even though I only need this once for right now, I would like to be able to do this in the future. I just installed Imagemagick, how do I add --shell-escape?
    – qwertylpc
    May 15, 2015 at 17:41
  • @R.Schumacher Can you steer me into how I set up a user option. I have zero experience with LaTeX
    – qwertylpc
    May 15, 2015 at 17:51
  • @qwertylpc: I'm unfamiliar with the WinEd interface. However, in TeXnicCenter, under Build > Define Output Profiles, choose your compiler of choice (say LaTeX > PDF) and add --shell-escape to the "Command line arguments to pass to the compiler")
    – Werner
    May 15, 2015 at 17:52

1 Answer 1

3

If you upgrade to WinEdt 10, there's a plugin called dvi2pic which lets you run dvipng from within WinEdt (TeX -> DVI menu).

First of all, use the standalone class and reduce your code to

\documentclass{standalone}
\begin{document}
\begin{tabular}{rrrrr}
  \hline
  Seed & Current System & n=5 & n=7 & n=9 \\
  \hline
  1 & 25.00 & 15.63 & 22.26 & 29.03 \\
  2 & 19.90 & 11.80 & 15.02 & 17.50 \\
  3 & 15.60 & 9.27 & 10.74 & 11.47 \\
  4 & 11.90 & 8.36 & 9.29 & 9.51 \\
  5 & 8.80 & 6.64 & 6.73 & 6.31 \\
  6 & 6.30 & 5.87 & 5.67 & 5.08 \\
  7 & 4.30 & 5.19 & 4.77 & 4.06 \\
  8 & 2.80 & 4.64 & 4.09 & 3.34 \\
  9 & 1.70 & 4.06 & 3.40 & 2.65 \\
  10 & 1.10 & 3.50 & 2.76 & 2.04 \\
  11 & 0.80 & 3.27 & 2.53 & 1.83 \\
  12 & 0.70 & 2.85 & 2.07 & 1.39 \\
  13 & 0.60 & 2.54 & 1.77 & 1.15 \\
  14 & 0.50 & 2.29 & 1.54 & 0.96 \\
  Playoff Teams & 0.00 & 14.08 & 7.35 & 3.70 \\
   \hline
\end{tabular}
\end{document} 

At this point, run first latex and then dvipng.

The resulting png looks like:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .