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

qwertylpc
  • 111
  • 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. – R. Schumacher May 15 '15 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 '15 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 '15 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 '15 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 '15 at 17:52
  • In WinEdt, go to Options -> Execution modes -> Console application, choose the accessory you're compiling with, and, in Switches, write --shell-escape – Sterry May 15 '15 at 19:18
  • @Sterry how do I know which accessory I should compile with? Also if I set this up, will I have to change it back to convert to PDF's in the future? – qwertylpc May 15 '15 at 22:41

1 Answers1

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

karlkoeller
  • 124,410