# Formatting subfloatrow captions as Figure 1.A etc

I have been looking all over the place for a solution to this problem but I can't seem to find one. Basically I want subfigures captioned as "Figure 1.A", "Figure 1.B" etcetera. I use floatrow's subfloatrow environment to create my subfigures, and it seems able to change almost anything about the captions (place the labels next to/above/under/idk), but I can't arrange the caption to do what I want them to do. I do not want a general caption for two figures, but one caption per figure and labels A-Z, see my MWE:

\documentclass{report}
\usepackage{floatrow}
\usepackage{blindtext}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}

\begin{document}
\chapter{A Nice chapter}

\blindtext

\begin{figure}[!h]
\begin{subfloatrow}
\ffigbox
{
\caption{This is where I would like caption formatted as: Figure 1.A: ....}
\label{fig:niceFigure}
}
{
\includegraphics[width=0.48\textwidth]{./testimage.jpg}
}
\ffigbox
{
\caption{This is where I would like caption formatted as: Figure 1.B: ....}
\label{fig:nicefigure2}
}
{
\includegraphics[width=0.48\textwidth]{./testimage.jpg}
}
\end{subfloatrow}
\end{figure}

\end{document}


Amounts to this:

The current figure is contained as subfigure counter if the subcaption package is used, however, it's better to use self - defined format for the subcaption, via \DeclareCaptionLabelformat

\documentclass{report}
\usepackage{floatrow}
\usepackage{blindtext}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[demo]{graphicx}

\DeclareCaptionLabelFormat{subfig}{\figurename #1~\arabic{chapter}.\Alph{subfigure}:}

\begin{document}
\chapter{A Nice chapter}

\blindtext

%\renewcommand{\thesubfigure}{\arabic{figure}.\Alph{subfigure}}%

\clearcaptionsetup{figure}
\captionsetup[subfigure]{labelformat=subfig}

\begin{figure}[!h]
\begin{subfloatrow}
\ffigbox
{
\caption{This is where I would like caption formatted as: Figure 1.A: ....}
\label{fig:niceFigure}
}
{
\includegraphics[width=0.48\textwidth]{./testimage.jpg}
}
\ffigbox
{
\caption{This is where I would like caption formatted as: Figure 1.B: ....}
\label{fig:nicefigure2}
}
{
\includegraphics[width=0.48\textwidth]{./testimage.jpg}
}
\end{subfloatrow}
\end{figure}

\end{document}


• Thanks, I think this is a more elegant solution than my own! (We crossposted, unfortunately ;)). – MTDJassen Sep 15 '14 at 12:56
• But referencing with \ref{fig:nicefigure1} gives 1.1a ... I expected, that if someone require capital character for subfigure numbering, they also should appear in referencing as capital and not small. – Zarko Sep 15 '14 at 13:20
• @Zarko: Caption format and counter format are two different things. It can be done, of course! – user31729 Sep 15 '14 at 13:22
• @MTDJassen: I think, the subfloatrow is perhaps not the best choice. Try subfig package instead, it should provide easier handling of this – user31729 Sep 15 '14 at 13:30
• @Christian Hupfer: I know. I just like to say that using upper case and lower case letters for the same thing is not good idea. So I'd define '\renewcommand\thesubfigure{Alph{subfigure} \DeclareCaptionLabelFormat{subfig}{\figurename #1~\arabic{chapter}.\thesubfigure:}'. Just a my 2 cents ... – Zarko Sep 15 '14 at 16:10

As with all questions, I should've sought a little harder because the answer, apparently, was within my grasp. For all future answer-seekers, here is my workaround / solution.

I added this to the preamble:

\DeclareCaptionSubType*{figure}
\renewcommand\thesubfigure{\thefigure\alph{subfigure}}
\renewcommand{\subfigurename}{Figure}


Which amounted to:

• To further modify the labels, you may use \Alph instead of \alph to get upper case letters and \captionsetup[subfigure]{labelformat=simple,labelsep=colon} to remove the parentheses and get a ":" separator. Reference: subcaption manual. – mvkorpel Sep 15 '14 at 13:12