2

I want to create a figure with 4 subfigures in an unusual order. Normally in a squared pattern, they are arranged as

A B

C D

But I want to have them in

A C

B D

I already got this by changing the counter and it works fine within the figure. But the list of figures does not change the same way, so there is a wrong order.

What do I have to do to solve that problem? Thank you very much! :)

Here is a MWE:

\documentclass[a4paper, 12pt, headsepline]{scrreprt}
\usepackage[utf8]{inputenc}

\usepackage{graphicx}
\usepackage[format=plain, justification=centering]{caption}
\usepackage[list=true]{subcaption}
\captionsetup[subfigure]{format=default, labelformat=simple, labelsep=colon}

\begin{document}

\listoffigures

\bigskip
------------------------------------------------------------------------------------------------------------------
\bigskip

\begin{figure}[!h]
  \hspace{10pt}
  \centering
  \begin{subfigure}[t]{.45\textwidth}
    \centering
    \includegraphics[width=.6\textwidth]{tmp.png}
    \caption{Figure 1}
  \end{subfigure}
  \hfill

  \addtocounter{subfigure}{1}
  \begin{subfigure}[t]{.45\textwidth}
    \centering
    \includegraphics[width=.6\textwidth]{tmp.png}
    \caption{Figure 3 (changed order)}
  \end{subfigure}

  \hspace{10pt}
  \par\bigskip
  \hspace{10pt}

  \addtocounter{subfigure}{-2}
  \begin{subfigure}[t]{.45\textwidth}
    \centering
    \includegraphics[width=.6\textwidth]{tmp.png}
    \caption{Figure 2 (changed order)}
  \end{subfigure}
  \hfill

  \addtocounter{subfigure}{1}
  \begin{subfigure}[t]{.45\textwidth}
    \centering
    \includegraphics[width=.6\textwidth]{tmp.png}
    \caption{Figure 4}
  \end{subfigure}
  \hspace{10pt}
  \caption{Figures in changed order}
\end{figure}

\end{document}

,

Max16hr
  • 503

1 Answers1

2

Instead of fiddeling around with the counter, I'd suggest using minipages to arrange the images:

enter image description here

\documentclass[a4paper, 12pt, headsepline]{scrreprt}
\usepackage[utf8]{inputenc}

\usepackage[demo]{graphicx}
\usepackage[format=plain, justification=centering]{caption}
\usepackage[list=true]{subcaption}
\captionsetup[subfigure]{format=default, labelformat=simple, labelsep=colon}

\begin{document}

\listoffigures

\bigskip
------------------------------------------------------------------------------------------------------------------
\bigskip

\begin{figure}[!h]

\begin{minipage}{0.5\textwidth}
\centering
  \begin{subfigure}[t]{.9\textwidth}
    \centering
    \includegraphics[width=.6\textwidth]{tmp.png}
    \caption{Figure 1}
  \end{subfigure}

  \begin{subfigure}[t]{.9\textwidth}
    \centering
    \includegraphics[width=.6\textwidth]{tmp.png}
    \caption{Figure 2}
  \end{subfigure}
\end{minipage}%
\begin{minipage}{0.5\textwidth}
\centering
  \begin{subfigure}[t]{.9\textwidth}
    \centering
    \includegraphics[width=.6\textwidth]{tmp.png}
    \caption{Figure 3}
  \end{subfigure}

  \begin{subfigure}[t]{.9\textwidth}
    \centering
    \includegraphics[width=.6\textwidth]{tmp.png}
    \caption{Figure 4}
  \end{subfigure}
\end{minipage}
  \caption{Figures in changed order}
\end{figure}

\end{document}
leandriis
  • 62,593