25. Inserting images

LaTeX provides commands for adding images within text. Parameters allow you to resize the images or scale the images, as well as define placement relative to the margins.

The graphicx pack­age pro­vid­es a key-value in­ter­face for op­tional ar­gu­ments to the \in­clude­graph­ics com­mand.

Note: Do not use the other graphics package when using graphicx.

Add the graphicx package using the following command:

## Insert images using includegraphics

Then insert an image within a text flow using includegraphics.

In the following example, the image is resized:

Note: The file extension can be omitted, but I prefer to keep the entire filename, including the extension.

In this example, the image is resized to the following values;

• Set the width to 10.19 cm

• Set the height to 2.33 cm

Alternatively, the image can be scaled.

Note: [-1em] is a positioning element, which moves the image 1em to the left of the defined left margin. This is a page design issue.

You can optionally set the path to graphics using the \graphicspath command:

Click to continue.