Skip to content

Instantly share code, notes, and snippets.

@samueljackson92
Created February 19, 2013 23:17
Show Gist options
  • Save samueljackson92/4991162 to your computer and use it in GitHub Desktop.
Save samueljackson92/4991162 to your computer and use it in GitHub Desktop.
LaTeX code for importing, formatting, centring, captioning and labelling an image. Will force images to follow after each other and stay in the same section. Compliments of @cgddrd
% Include the required packages.
\usepackage{float}
\usepackage{graphicx}
% insert a single centred image into a LaTeX document.
\begin{figure}[H]
\centering
\includegraphics[width=0.7\textwidth]{<path-to-file>}
\caption{<image-caption>}
\label{fig:<image label>}
\end{figure}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment