graphics - francois-rozet/sleek-template GitHub Wiki
This page explains how to include graphically external documents such as images and graphics.
First of all, it should be noted that it is highly preferable to include vectorial images (especially pdf), to your document.
\includegraphics[arguments]{path/file.ext}Where
-
argumentsare the style properties added to the image; -
pathis the relative path to thefile; -
extis its type format extension.
Most image type format (
jpg,png,gif,bmp, etc.) are supported by this command. However, it should be noted that, if possible, it is highly preferable to include vectorial images, such aseps, to your document.
To set the size of the image you can either use the arguments
-
size=xto scalextimes the image. -
width=x\textwidthto set the width of the image relatively to the text width. -
heigth=x\textheightto set the height of the image relatively to the text height.
xis a number without dimension.
\begin{figure}[p]
\centering
\includegraphics[width=0.5\textwidth]{resources/example.pdf}
\caption{Here is a caption}
\label{fig:example}
\end{figure}Where
-
[p]is the (not-mandatory) positioning of the figure relatively to the page. It can take the valuest,bandh, respectively, top, bottom and here. If the chosen position is too restrictive, the program could choose another. -
\centeringcenters the image. -
\captioncaptions the figure. -
\labellabels the figure for cross-referencing (see cross-referencing).