How to add a jpg image to latex

I want to insert a .jpg image (that is, in my current folder, where there is a .tex file) after the paragraph. How can I do this in latex? What should I include / which commands to use?

+83
latex
Jun 28 '10 at 16:23
source share
2 answers

You need to use a graphics library. Put this in your preamble:

\usepackage{graphicx} 

Then you can add images as follows:

 \begin{figure}[ht!] \centering \includegraphics[width=90mm]{fixed_dome1.jpg} \caption{A simple caption \label{overflow}} \end{figure} 

This is the main template that I use in my documents. Position and size should be customized to your needs. For more information on which options to use in \figure and \includegraphics , see the manual below. Then you can refer to the image in the text using the label shown in the figure:

 And here we see figure \ref{overflow}. 

Read this guide for more detailed instructions: http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions

+166
Jun 28 '10 at 16:29
source share

If you add a jpg, png, pdf image, you must use pdflatex to compile it.

+7
Aug 05 '13 at 14:48
source share



All Articles