9

I made a figure within my LaTeX document using the subfigure package, containing three subfigures. The part where the subfigures are now automatically labelled "(a)", "(b)", "(c)" need to be uppercased, though.

I.e. the result from the LaTeX code in the finally rendered PDF is

(a) img1 (b) img2 (c) img3

but it needs to be

(A) img1 (B) img2 (C) img3

How can I set this up?

The code looks something like this:

    \usepackage{subfigure}
[...]
    \begin{sidewaysfigure}[p]
        \centering
        \subfigure[image1]{
            \label{fig:img1}
            \includegraphics[scale=2]{figures/img1.png}
        }
        \subfigure[image2]{
            \label{fig:img2}
            \includegraphics[scale=2]{figures/img2.png}
        }
        \subfigure[image3]{
            \label{fig:img3}
            \includegraphics[scale=2]{figures/img3.png}
        }
        \caption[my images]{\textbf{ My images} I am referring to (A), (B) and (C) respectively.}\label{fig:imgs}\end{sidewaysfigure}
12

I didn't try this, but putting

\renewcommand{\thesubfigure}{(\Alph{subfigure})}

in your preamble should do it.

  • 3
    \renewcommand{\thesubfigure}{\Alph{subfigure}} did the job! – Hasan Aug 3 '13 at 15:35
1

In answer to the new question within an answer by salmaaries, here is a tested, working version using the suggestion from AVB:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}
\renewcommand{\thesubfigure}{\Alph{subfigure}}
\begin{document}
    \begin{figure}[H]
        \centering
        \begin{tabular}{c}
            \subfloat[First caption]{\label{fig:figure1a}}
             \includegraphics[width=0.8\textwidth]{Figure1A}\\
             \subfloat[Second caption]{\label{fig:figure1b}}
             \includegraphics[width=0.8\textwidth]{figure1B}\\
             \subfloat[Third caption]{\label{fig:figure1c}}
            \includegraphics[width=0.8\textwidth]{figure1C}
        \end{tabular} 
    \end{figure}
\end{document}
0

To force capital letters, put the offending character in curly brackets.

\caption[my images]{\textbf{ My images} I am referring to ({A}), ({B}) and ({C}) respectively.}\label{fig:imgs}\end{sidewaysfigure}
  • The text in the caption is uppercase anyway. The problem is that the automatically generated (=atuomatically generated figure caption by "subfigure" package) text in the figure caption is lowercase. The automaticcaly generated text needs to be made uppercase. The text which I type is fine as it is. – gojira Mar 14 '10 at 13:33
  • OK. just try to put the miss-generated-case letters inside curly brackets, as in the example. it was i meant to say. – darlinton Mar 14 '10 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy