I have a document with a figure
environment that looks like this:
\documentclass[a4paper,10pt]{article}
\usepackage{subfig}
\usepackage{tikz}
\makeatletter
\newbox\sf@box
\newenvironment{SubFloat}[2][]%
{\def\sf@one{#1}%
\def\sf@two{#2}%
\setbox\sf@box\hbox
\bgroup}%
{ \egroup
\ifx\@empty\sf@two\@empty\relax
\def\sf@two{\@empty}
\fi
\ifx\@empty\sf@one\@empty\relax
\subfloat[\sf@two]{\box\sf@box}%
\else
\subfloat[\sf@one][\sf@two]{\box\sf@box}%
\fi}
\makeatother
\begin{document}
\begin{figure}
\centering
\begin{SubFloat}
{\label{image1}}
\includegraphics[width=0.4\textwidth]{image1.jpg}
\end{SubFloat}
\qquad
\begin{SubFloat}
{\label{image2}}
\includegraphics[width=0.4\textwidth]{image2.jpg}
\end{SubFloat}
\end{figure}
\end{document}
(compiled with pdflatex
)
LaTeX puts letters below each image ((a)
, (b)
, (c)
, etc..) and I want it to put numbers instead.
How could I do that?
Best Answer
For redefine the label for the
subfig
package use:To keep the effect localized, use this within the
figure
environment as I have done below. As you can see in the subsequent use the labels are restored to using the default of(a)
format:If you want this to effect your entire document simply add the
\renewcommand
to the preamble.Code: