Skip to content

Instantly share code, notes, and snippets.

@ashwin
Created June 29, 2012 06:35
Show Gist options
  • Save ashwin/3016274 to your computer and use it in GitHub Desktop.
Save ashwin/3016274 to your computer and use it in GitHub Desktop.
Inserting a figure in LaTeX
% At the beginning of the document
\usepackage{graphicx}
% At the place you want a figure
\begin{figure}[h]
\centering
\includegraphics[scale=0.3]{pics/foobar.png}
\caption{This is a caption for the figure.}
\label{foobar-figure}
\end{figure}
% Refer to the figure when you want to
As shown in Figure \ref{foobar-figure}, the Foobar is a good choice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment