Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Figures are a normal part of most projects, and they may be included in your LaTeX document using a number of different methods. We will now look at some of the methods including their faults.

We say if often, but that's because it's very imporant. The methods we explain here are not necessarily always the best option or approach for your problem. Use the web to find other tutorials on the same or different methods. This will improve your LaTeX knowledge by a lot, we assure you!

Some relevant documentation:

Info

To enable figures in your document, include the package graphicx. ( \usepackage{graphicx} )



Panel
borderColor#dfe1e5
bgColor#eff9ff
borderWidth2
titlePage content

Table of Contents


Caption

It is usually beneficial to include caption to your images. To do so, simply use the command \caption{'text'} either below or above your figure (usually below for images and above for tables).

Code Block
\begin{figure}[]
    \centering
    \includegraphics[width=0.5\textwidth]{CylinderImage.jpg}
    \caption{Caption written below figure.}
\end{figure}


\begin{figure}[]
    \centering
    \caption{Caption written above figure.}
    \includegraphics[width=0.5\textwidth]{CylinderImage.jpg}
\end{figure}


Image AddedImage Added

Figure Environment

Plain Figures

The most comman method to included images is using the Figure environment. 

Code Block
\begin{figure}[placement specifier]
... figure contents ...
\end{figure}

Placement specifiers

The placement specifiers available when inserting figures are as shown in the table below. This table is taken from LaTeX Floats, Figures and Captions, so check it out for more detailed information.

SpecifierPermission
hPlace the float here, i.e., approximately at the same point it occurs in the source text (however, not exactly at the spot)
tPosition at the top of the page.
bPosition at the bottom of the page.
pPut on a special page for floats only.
!Override internal parameters LaTeX uses for determining "good" float positions.
HPlaces the float at precisely the location in the LaTeX code. Requires the float package, i.e., \usepackage{float}

It is also common to use the command \centering to center the image on the page. For example:

Code Block
\begin{figure}[]
    \centering
    \includegraphics[width=0.5\textwidth]{CylinderImage.jpg}
\end{figure}




BibTeX Display Table