Chapter 05 – Including Images

Including an image

\documentclass[a5paper]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}
\section{Including a picture}
\blindtext
\begin{figure}
  \centering
  \includegraphics[width=4cm]{example-image}
  \caption{Test figure}
\end{figure}
\blindtext
\end{document}

Managing floating of images

\documentclass[a5paper]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}
\section{Including a picture}
\blindtext
\begin{figure}[ht]
  \centering
  \includegraphics[width=4cm]{example-image}
  \caption{Test figure}
\end{figure}
\blindtext
\end{document}

An image at the page bottom

\documentclass[a5paper]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}
\section{Including a picture}
\blindtext
\begin{figure}[!b]
  \centering
  \includegraphics[width=4cm]{example-image}
  \caption{Test figure}
\end{figure}
\blindtext
\end{document}

Letting text flow around images

\documentclass[a5paper]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{wrapfig}
\pagestyle{empty}
\begin{document}
\section*{Text flowing around an image}
\blindtext
\begin{wrapfigure}{l}{4cm}
  \includegraphics[width=4cm]{ example-image}
  \caption{Test figure}
\end{wrapfigure}
\blindtext
\end{document}