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
-
arguments
are the style properties added to the image; -
path
is the relative path to thefile
; -
ext
is 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=x
to scalex
times the image. -
width=x\textwidth
to set the width of the image relatively to the text width. -
heigth=x\textheight
to set the height of the image relatively to the text height.
x
is 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
,b
andh
, respectively, top, bottom and here. If the chosen position is too restrictive, the program could choose another. -
\centering
centers the image. -
\caption
captions the figure. -
\label
labels the figure for cross-referencing (see cross-referencing).