Skip to content

Instantly share code, notes, and snippets.

@sorrell
Created February 20, 2012 03:48
Show Gist options
  • Save sorrell/1867671 to your computer and use it in GitHub Desktop.
Save sorrell/1867671 to your computer and use it in GitHub Desktop.
latex intro (8)
\documentclass{article}
\usepackage{graphicx}
\newcommand\figraph[2]{
\begin{figure}[htb] %htb
\begin{center}
\includegraphics[width=0.75\textwidth]{#1}
\parbox{0.75\textwidth}{
\caption[width=0.6\textwidth]{#2}}
\end{center}
\end{figure}
}
\title{My First Document}
\author{Nick}
\date{\today}
\begin{document}
\begin{figure}
\centering
\includegraphics[width=3in]{dog.png}
\caption{It's dog!}
\end{figure}
\figraph{dog.png}{I told ya, it's dog!}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment