Conversion from TeX to Postscript, PDF, and PNG
[ TeX source: hello.tex ][ PDF output: hello.pdf ]
[ PNG first page: 43 dpi 87 dpi 144 dpi ]
[ PNG last page: 43 dpi 87 dpi 144 dpi ]


\documentclass[a4paper,12pt,onecolumn]{article}
\usepackage[utf8]{inputenc}
\begin{document}
\title{Conversion from \TeX{} to \\ Postscript, PDF, and PNG}
\author{Alexander Edward Genaud}
\maketitle
\begin{abstract}
\TeX{} document describing its own processing
(some human intervention required).
We convert from TeX to PS, two methods of conversion to PDF,
full multi-page PNG as well as small image snippets (math equation).
\end{abstract}
\section{PS Postscript}
To convert this \verb\hello.tex\ or any other TeX document to PS,
we must first convert to DVI using the \verb\latex\ command.
Then we can convert from DVI to PS with \verb\dvips\:
\begin{verbatim}
$ latex hello
$ dvips hello.dvi -o hello.ps
\end{verbatim}
\section{PDF Portable Document Format}
To convert from TeX to DVI to PDF,
we use \verb\dvipdf\ instead of \verb\dvips\,
with slightly different arguments (sans \verb\-o\):
\begin{verbatim}
$ latex hello
$ dvipdf hello.dvi hello.pdf
\end{verbatim}
However, we could have instead jumped straight from TeX to PDF with a single command:
\begin{verbatim}
$ pdflatex hello
\end{verbatim}
\section{PNG Portable Network Graphics}
We can convert a multi-page TeX to full page PNG images.
We must first convert to PS as before
then, using ImageMagick's \verb\convert\ command, to PNG:
\begin{verbatim}
$ latex hello
$ dvips hello.dvi -o hello.ps
$ convert -density 144 hello.ps hello.png
\end{verbatim}
The \verb\dvips\ command accepts an \verb\-E\ flag which should produce EPSF
output. EPSF only works with single pages and the \verb\-E\ flag should be
ignored with multiple page documents.
The EPSF contains minimal white space margins and is useful for
generating small graphics such as complex AMS math equations.
The \verb\-o\ flag of \verb\dvips\ seems to be optional as long as the default
output file extension \verb\*.ps\ is acceptable.
The \verb\-density\ flag of the convert command indicates the output resolution.
While 72 DPI is default and standard for computer monitors,
in my opinion, it is too low for legible text.
Many printers can handle hundreds if not thousands of pixels
per inch. For casual reading, I prefer well over a hundred,
hence \verb\-density 144\ above.
\begin{thebibliography}{1}
\bibitem{robertsabs} Andy Roberts {\em Absolute Beginners -
Getting to Grips with LaTeX} \\
http://www.andy-roberts.net/writing/latex/absolute\_beginners
\bibitem{robertspdf} Andy Roberts {\em PDFs -
Getting to Grips with LaTeX} \\
http://www.andy-roberts.net/writing/latex/pdfs
\bibitem{mitcite} Hermes, MIT. {\em How do I create
bibliographies in LaTeX?} 2088: Information
Services \& Technology, Massachusetts Institute of Technology. \\
http://kb.mit.edu/confluence/pages/viewpage.action?pageId=3907111
\bibitem{png} Michael Mazack {\em Converting TeX/LaTeX to PNG} \\
http://mazack.org/unix/tex2png.php
\end{thebibliography}
\end{document}



