I'm writing a document (article class), and I'm including some png graphics, this is the code that includes them (it's a subimage environment):
\begin{center}
\begin{figure}
\centering
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[natwidth=512px,natheight=511px,width=4cm,height=4cm]{param.png}
\caption{img1}
\label{img1}
\end{subfigure}%
~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[natwidth=512px,natheight=511px,width=4cm,height=4cm]{crtpnt.png}
\caption{img2}
\label{fig:img2}
\end{subfigure}
~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[natwidth=512px,natheight=511px,width=4cm,height=4cm]{ferro.png}
\caption{img3}
\label{fig:img3}
\end{subfigure}
\caption[prueba]{\label{fig:images}caption}\end{figure}\end{center}
I'm compiling through latex and then dvipdf to get a pdf. Firt of all, if I compile with pdflatex it works perfectly, but I would like to compile with an intermediate dvi file. When running Latex the dvi file is alright, although images don't show up. If I run then the dvipdf, it cuts the document up to the page in which the previous snippet is, not showing the images, or anything else beyond them.
I have previous images in eps format which are perfectly included. Is the way I'm including png graphics right? Am I doing anything wrong?
.pngfiles withlatex. Thepdflatexruns were successfull, as you wrote. Either use the.epsversion orpdflatex– Apr 26 '15 at 11:30.epsfiles it would be much better than using a pixel format such as png – Apr 26 '15 at 11:36convert file.png file.epsand it worked perfectly. They're very simple images graphically, so I guess any problem I could have producing vector images dissappears. – MyUserIsThis Apr 26 '15 at 11:37\begin{center}outside the figure is wrong, it doesn't affect the alignment, just adds spurious vertical space. Also~is a slightly odd way to specify a space of three word spaces, and it relies on 6 word spaces being less than .1\textwidth. – David Carlisle Apr 26 '15 at 11:39pdflatexwill read PNG files natively, and I've never needed anatwidthornatheightparameter for\includegraphics.heightand/orwidth, sure, all the time. Modern TeX distributions can automatically convert EPS graphics to PDF for use withpdflatexas well, with no additional packages added to your document. – Mike Renfro Apr 26 '15 at 14:40