[Tex/LaTex] Changing the subfigure caption by removing brackets & font of the subcaption

floatsfontsformattingsubfloats

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?

Best Answer

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:

      enter image description here

      \documentclass{article}
      \usepackage[bf]{subfigure}% http://ctan.org/pkg/subfigure
      \renewcommand{\thesubfigure}{\alph{subfigure})}% (a) -> a)
      \begin{document}
      \begin{figure}
        \centering
        \subfigure[First figure\label{subfig1}]{\rule{100pt}{50pt}} \quad
        \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:

      enter image description here

      \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[First figure\label{subfig1}]{\rule{100pt}{50pt}} \quad
        \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:

enter image description here

\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[First figure\label{subfig1}]{\rule{100pt}{50pt}} \quad
  \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.