This question already has an answer here:

I want have three subfigures in a special order. One on the right, two on the left. Therefor I found a snippet here on StackExchange. Alone the snippet works fine, you can check this by comment out the first figure-enviroment.

The problem is, that I have a lot of subfloats in my document and the packages subfig and subcaption are incompatible.

Is there a way to use normal subfloats and also get the 3-subfigure-example running?

Best, TomBoo!

minimal example:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption,subcaption}
\usepackage{subfig}

\begin{document}

\begin{figure}[htb]
    \centering
        \subfloat[test figure one \label{fig:1:test1}] {\includegraphics[width=0.30\textwidth]{image1}}
        \qquad %
        \subfloat[test figure two \label{fig:1:test2}] {\includegraphics[width=0.30\textwidth]{image1}}
    \caption{test figures}
  \label{fig:1:tests}
\end{figure}

\begin{figure}
\begin{minipage}[c][11cm][t]{.5\textwidth}
  \vspace*{\fill}
  \centering
  \includegraphics[width=5cm,height=10cm]{image1}
  \subcaption{test figure one}
  \label{fig:2:test1}
\end{minipage}%
\begin{minipage}[c][11cm][t]{.5\textwidth}
  \vspace*{\fill}
  \centering
  \includegraphics[width=5cm,height=4.5cm]{image1}
  \subcaption{test figure two}
  \label{fig:2:test2}\par\vfill
  \includegraphics[width=5cm,height=4.5cm]{image1}
  \subcaption{test figure three}
  \label{fig:3:test3}
\end{minipage}
\caption{another test figures}
\label{fig:2:tests}
\end{figure}

\end{document}

marked as duplicate by egreg, Werner, mafp, Martin Schröder, Kurt Aug 8 '13 at 1:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Welcome to TeX.SX! I have added a subfig based solution to the other question because it's better not having information scattered through different questions. If that new solution is good for you, please let us know so we can close this one as duplicate. Don't worry about this: this was indeed a good question. – egreg Aug 6 '13 at 16:54
  • The solution works perfectly fine! So can be closed. – TomBoo Aug 7 '13 at 22:09
up vote 5 down vote accepted

Since you say you are already using subfig extensive, I am assuming it would be a hassle to change all the \subfloats. Therefore, you can use the capt-of package and set the \captionsetup.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\captionsetup[subfigure]{labelformat=parens,labelsep=space,font=small}
\usepackage{subfig}

\begin{document}

\begin{figure}[htb]
    \centering
        \subfloat[test figure one \label{fig:1:test1}] {\includegraphics[width=0.30\textwidth]{image1}}
        \qquad %
        \subfloat[test figure two \label{fig:1:test2}] {\includegraphics[width=0.30\textwidth]{image1}}
    \caption{test figures}
  \label{fig:1:tests}
\end{figure}

\begin{figure}
\begin{minipage}[c][11cm][t]{.5\textwidth}
  \vspace*{\fill}
  \centering
  \includegraphics[width=5cm,height=10cm]{image1}
  \captionof{subfigure}{test figure one}
  \label{fig:2:test1}
\end{minipage}%
\begin{minipage}[c][11cm][t]{.5\textwidth}
  \vspace*{\fill}
  \centering
  \includegraphics[width=5cm,height=4.5cm]{image1}
  \captionof{subfigure}{test figure two}
  \label{fig:2:test2}\par\vfill
  \includegraphics[width=5cm,height=4.5cm]{image1}
  \captionof{subfigure}{test figure three}
  \label{fig:3:test3}
\end{minipage}
\caption{another test figures}
\label{fig:2:tests}
\end{figure}

\end{document}

enter image description here

I need to figure out what I set to remove the : so I will update when I find it. With Gonzalo Medina's suggestion, we can achieve the look of subfigures by having this line of code: \captionsetup[subfigure]{labelformat=parens,labelsep=space,font=small}

Not the answer you're looking for? Browse other questions tagged or ask your own question.