GeneralImporting .jpg graphics

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
DW0051798
Posts: 2
Joined: Sun May 11, 2008 10:40 am

Importing .jpg graphics

Post by DW0051798 »

Would someone please be kind enough to walk me through how to import a picture in .jpg format?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

Importing .jpg graphics

Post by Stefan Kottwitz »

Hi DW0051798,

welcome to the LaTeX Community board!
Put the jpg graphic file into the same directory like your main document. (other path is possible too, but then you hav to specify that)
Use the graphicx package and the command \includegraphics.

Here is one short but complete example for including name.jpg:

Code: Select all

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{name}
\end{document}
You can even specify width and height if you want and more. Here you will find the documentation of the graphicx package for more options.

Let's extend that example for a centered graphic with description etc.::

Code: Select all

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\listoffigures
\section{First Section}
\begin{figure}[ht]
\centering
\includegraphics[width=4cm]{name}
\caption{Description of the picture}
\end{figure}
\end{document}
Stefan
LaTeX.org admin
DW0051798
Posts: 2
Joined: Sun May 11, 2008 10:40 am

Re: Importing .jpg graphics

Post by DW0051798 »

Thanks, I will give it another try the next chance I get.
Post Reply