8

I am a beginner in LaTeX and I want know if there is a way to have 2 images of different types in LaTeX:

\documentclass[a4paper,openright,12pt]{report}
\usepackage[spanish]{babel} % espanol
\usepackage[latin1]{inputenc} % acentos sin codigo
\usepackage{graphicx} % gráficos
\usepackage{subfigure} % subgráficos

\begin{document}

\begin{figure}[H]
\centering
 \includegraphics[scale=1.8]{figura/pantalla1.eps}
    \caption{IIIIIIIIIIIIIIIIIII. }
\label{fig:interfas}
\end{figure} 

\begin{figure}[H]
\centering
 \includegraphics[scale=1.8]{figura/pantalla1.pdf}   %error also if .png error 
    \caption{IIIIIIIIIIIIIIIIII. }
\label{fig:interfas2}
\end{figure} 

\end{document}

I have in all my documents .eps, and all looks excellent but I need to put 2 images in .pdf or .png, and if I convert it 2 images and .eps looks so bad because they are screen shot of cell.

7

The image types you can include depend on whether you use latex or pslatex, and if you use latex they depend on the dvi driver (usually dvips) that you use. So it is better to omit the extension

\includegraphics[scale=1.8]{figura/pantalla1}

Rather than

\includegraphics[scale=1.8]{figura/pantalla1.eps}

then if you use pdflatex it will find a pdf (or png) version and if you use latex it will find a eps (or png).

Of course for bitmaps it may be best if possible to generate them at the correct size rather than scale them on inclusion as they do not necessarily scale so well.

Do not use [H] on figures unless you are absolutely sure you want that, and if you are sure you want that, try to persuade yourself otherwise:-)

2

As Werner stated, you could use the on-the-fly method for eps to pdf conversion... As an alternative convert the .pdf file to .eps and then use the usual latex command. Regarding the .png file: converting it to .eps or .pdf will almost always look awkward... pdflatex can include .png and .jpg files!

By the way: Screen shots look nicer when the document is printed, on-screen document scale badly however.

  • Interesting, I would have said that deficiencies in bitmaps are much more apparent when the document is printed, you generally need quite high dpi (>300) to make a passable printed result. – ach Jun 21 '13 at 7:39
  • @ach: Perhaps my statement on quality of printed screen shots was too positive. I helped a former colleague writing a book in LaTeX years ago. That book was published actually and contained about 10 screen shots which looked quite nice in the final hardcopy output. – user31729 Jun 21 '13 at 10:57

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.