5

I'm using

\usepackage{subfig}
\captionsetup[subfigure]{labelformat=empty} 

Is this possible?

1
  • Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. May 31, 2013 at 14:30

1 Answer 1

5

The title is a little ambiguous; do you want one subfigure with two captions, one above and the other below, or do you want two subfigures, one subfigure with its caption below and another one with its caption above?

Anyway, I present a possible solution for both cases. For the first one, the idea is to use "fake" subfigures having no height but with the same width of the actual subfigures (I used \rules); the captions for those fake subfigures will be the above captions for the real ones.

The second case is a little more involved and required the use of the powerful floatrow package.

The code (depending on your actual figures you might need to adjust the lengths I used in my example):

\documentclass{article}
\usepackage[a6paper]{geometry}% just for the example
\usepackage[demo]{graphicx}
\usepackage{subfig}
\usepackage{floatrow}
\captionsetup[subfigure]{labelformat=empty,justification=raggedright} 

\begin{document}

\begin{figure}
\subfloat[A subfigure with a caption above]{\rule{3cm}{0pt}}\quad
\subfloat[Another subfigure with a caption above]{\rule{3cm}{0pt}}\\[0.6ex]
\subfloat[A subfigure with a caption below]{\includegraphics[width=3cm,height=2cm]{image1}}\quad
\subfloat[Another subfigure with a caption below]{\includegraphics[width=3cm,height=2cm]{image2}}
\caption{A figure with two subfigures}
\label{fig:test1}
\end{figure}

\begin{figure}
\ffigbox[\FBwidth]
{\begin{subfloatrow}
\ffigbox[\FBwidth]
  {\caption{A subfigure with a caption below}}
  {\includegraphics[width=3cm,height=2cm]{image1}}
\floatsetup[subfigure]{capposition=TOP}
\raisebox{1.3\height}{%
\ffigbox[\FBwidth]
  {\caption{A subfigure with a caption above}}  
  {\includegraphics[width=3cm,height=2cm]{image1}}
}%
\end{subfloatrow}}
{\caption{Another figure with two subfigures\label{fig:test2}}}
\end{figure}

\end{document}

enter image description here

The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

1
  • Thanks! Sorry about ambiguity! (I was actually talking about the former)
    – Gus
    Jun 7, 2013 at 9:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .