# Changing the subfigure caption by removing brackets & font of the subcaption

Note that by using \usepackage[bf]{subfigure} I'm able to change the label of the subfigure to be boldface. However, the label appears with brackets, e.g., "(a)". How could I get a subfigure label that would look like "a)"

Another issue is the font of the text that follows "(a)". What package and options should be put in the preamble to set text to italics?

-
the package subfigure is outdated, it is superseeded by subfig. However, you should use package caption by default. It can set nearly everything for the captions. –  Herbert Jun 29 '12 at 8:53
But, is it possible to achieve italics with subfigure? –  boy Jun 29 '12 at 9:01

Understanding that it might be difficult to switch packages, even from a deprecated one, here's an update that addresses your requirements.

• In order get the sub-figure label to be displayed as a) instead of (a) you have two options:

• Either redefine the counter displaying mechanism \thesubfigure. By default, it is defined as

\renewcommand*{\thesubfigure}{(\alph{subfigure})}


which adds the parentheses around the (alphabetic) counter subfigure. Therefore, using

\renewcommand*{\thesubfigure}{\alph{subfigure})}


removes the left parenthesis. However, using only this, you need to accept that text label references to sub-figures will also include this adjustment:

\documentclass{article}
\usepackage[bf]{subfigure}% http://ctan.org/pkg/subfigure
\renewcommand{\thesubfigure}{\alph{subfigure})}% (a) -> a)
\begin{document}
\begin{figure}
\centering
\subfigure[Second figure\label{subfig2}]{\rule{100pt}{50pt}}
\caption{Some figures}\label{mainfigure}
\end{figure}
See Figure~\ref{subfig1} and~\ref{subfig2}.
\end{document}

• or, change the way the sub-caption is set. That is, not mess with the counter representation, but rather the caption setup. This required a modification to \thesubfigure and \@thesubfigure:

\documentclass{article}
\usepackage[bf]{subfigure}% http://ctan.org/pkg/subfigure
\makeatletter
\renewcommand{\thesubfigure}{\alph{subfigure}}% (a) -> a
\renewcommand{\@thesubfigure}{\thesubfigure)\hskip\subfiglabelskip}% a -> a)
\makeatother
\begin{document}
\begin{figure}
\centering
\subfigure[Second figure\label{subfig2}]{\rule{100pt}{50pt}}
\caption{Some figures}\label{mainfigure}
\end{figure}
See Figure~\ref{subfig1} and~\ref{subfig2}.
\end{document}

• Addressing the italic shape of the sub-caption is done using the IT package option:

\usepackage[bf,IT]{subfigure}% http://ctan.org/pkg/subfigure


In general, lower case (old-school) options like bf, it, and sf reference the sub-caption label, while upper case options like BF, IT, and SF reference the sub-caption title/text. See Table 1 (p 6) of the subfigure documentation.

Here is a complete MWE using the above suggestions:

\documentclass{article}
\usepackage[bf,IT]{subfigure}% http://ctan.org/pkg/subfigure
\makeatletter
\renewcommand{\thesubfigure}{\alph{subfigure}}% (a) -> a
\renewcommand{\@thesubfigure}{\thesubfigure)\hskip\subfiglabelskip}% a -> a)
\makeatother
\begin{document}
\begin{figure}
\centering
\subfigure[Second figure\label{subfig2}]{\rule{100pt}{50pt}}
\caption{Some figures}\label{mainfigure}
\end{figure}
See Figure~\ref{subfig1} and~\ref{subfig2}.
\end{document}


All of the above discussions pertain to sub-figures. However, since subfigure defines an analogous sub-table component, all references to subfigure can be replaced with subtable.

-
Many thanks for such an answer! –  boy Jun 30 '12 at 11:12

I would really recommend subcaption package because it really offers great customization possibilities as sampled below. See also the caption documentation as it is the underlying mechanism behind subcaption package from the same author.

\documentclass{article}%
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{mwe} %<- For some example pictures
\DeclareCaptionLabelFormat{r-parens}{\textbf{#2)}} %Define our custom label

\captionsetup{font=footnotesize} % The general caption settings
\captionsetup[sub]{              % The subcaption settings
font=footnotesize,           % Make the font smaller for both label and text
textfont=sl,                 % Make only the caption text slanted
labelformat=r-parens}        % Use our custom label format

\begin{document}
\begin{figure}
\begin{subfigure}{.5\linewidth}\centering
\includegraphics[width=4cm]{example-image-a}
\caption{A figure}\label{fig:1a}
\end{subfigure}%
\begin{subfigure}{.5\linewidth}\centering
\includegraphics[width=4cm]{example-image-a}
\caption{Another figure}\label{fig:1b}
\end{subfigure}%
\caption{Figure Caption}\label{fig:1}
\end{figure}

The Figure \ref{fig:1} has two subfigures Figure~\ref{fig:1a} and Figure~\ref{fig:1b}.
\end{document}


-
Many thank. However, the document I work with has several hundred pages, and \subfigure[A figure]{} is used in figure. So, I would prefer to just change the preamble, and not to replace the existing code. –  boy Jun 29 '12 at 10:33
@boy I fear that you have to bite the bullet and change them since you are using an obsolete package. It might come back again and hit you with, say hyperref problems. See subcaption vs. subfig for more info. –  percusse Jun 29 '12 at 10:38