Wednesday, August 24, 2011

Graphics inclusion

http://mactex-wiki.tug.org/wiki/index.php?title=Graphics_inclusion

The following is found on wiki:

Including graphics in a LaTeX-document is done with a command like this:

\includegraphics{image.jpg} 

where image.jpg is a graphic-file of the JPEG-type. It is assumemed that you have loaded the graphics-package in your preamble. There are variants of this command, for example

\includegraphics[width=0.8\textwidth]{image.jpg} 

- see for other options, for example, here or the documentation of the graphics-package. While this is very easy, one needs to be aware that not all file types are supported.

supported file types

These are the file types that are supported, depending on the typesetting-mode you are using. As a Mac-User, you are most likely a user of (pdf)latex with pdf-output.

latex with dvi-outputlatex with pdf-output
epspdf,jpg,png,mps

See this article in the PracTeX Journal for more on this.

epstopf: including eps-graphics in a pdfLaTeX-document

The epstopf-package helps to overcome the limitations of latex and pdflatex when it comes to available graphic-formats. Its main purpose is to allow the inclusion of .eps-graphic in documents that are typeset in pdflatex (with a pdf as an output file). What the package does is that it calls an external script (with the same name: epstopdf) that converts a eps-graphic into a pdf such that pdflatex can use this. So, if you are using pdflatex, the following document would work:

\documentclass[11pt]{article} \usepackage{graphicx} \usepackage{epstopdf} \begin{document} \includegraphics[width=0.8\textwidth]{image.eps} \end{document}