Skip to content

Instantly share code, notes, and snippets.

@shane5ul
Created September 8, 2017 18:32
Show Gist options
  • Save shane5ul/3e0a7bd37c1871939ac837a949793d5a to your computer and use it in GitHub Desktop.
Save shane5ul/3e0a7bd37c1871939ac837a949793d5a to your computer and use it in GitHub Desktop.
Adjusting figure captions in LaTeX using the caption command. A minimal working example.
\documentclass[11pt,letterpaper]{article}
\usepackage{caption}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}
\begin{figure}
\begin{center}
\includegraphics[scale=0.3]{fsu}
\end{center}
\caption{Using the default figure environment.}
\end{figure}
\begin{figure}
\begin{center}
\includegraphics[scale=0.3]{fsu}
\end{center}
\caption*{Remove caption label using the \texttt{caption} package.}
\end{figure}
\begin{figure}
\captionsetup{name=Photo}
\begin{center}
\includegraphics[scale=0.3]{fsu}
\end{center}
\caption{Change Figure to Photo using \texttt{caption}.}
\end{figure}
% reset next figure number to arbitrary number + 1
\setcounter{figure}{1}
\renewcommand{\thefigure}{\arabic{figure}A}
\begin{figure}
\begin{center}
\includegraphics[scale=0.3]{fsu}
\end{center}
\caption{Adjust figure number and format.}
\end{figure}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment