Zufällige Nummerierung und Abstände von Unterabbildungen in der PDF-Ausgabe

Zufällige Nummerierung und Abstände von Unterabbildungen in der PDF-Ausgabe

Die Nummerierung der Unterabbildungen in meiner PDF-Ausgabe ist irgendwie zufällig, aber im Editor ist die Nummerierung wie sie sein sollte.

Dabei sind die Unterabbildungen korrekt von (a) bis (d) nummeriert, aber beim Export als PDF erhalte ich Folgendes:

Bildbeschreibung hier eingeben

Außerdem möchte ich fragen, warum der horizontale Abstand in der ersten Zahlenreihe unterschiedlich ist. Die Einstellungen für jede Zeile sind gleich, aber die erste Reihe folgt nicht.

Ich weiß nicht, wie ich das beheben kann. Hier ist ein LaTeXCode der Abbildung:

%% LyX 2.3.2-2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{IEEEtran}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{graphicx}

\makeatletter
\@ifundefined{showcaptionsetup}{}{%
 \PassOptionsToPackage{caption=false}{subfig}}
\usepackage{subfig}
\makeatother

\usepackage{babel}
\begin{document}
\begin{figure*}
\subfloat[]{\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_0_ground_truth}}\enskip{}\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_1_ground_truth}}\enskip{}\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_2_ground_truth}}}

\subfloat[]{\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_0_ground_truth}}\enskip{}\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_1_ground_truth}}\enskip{}\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_2_ground_truth}}}

\subfloat[]{\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_0_ground_truth}}\enskip{}\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_1_ground_truth}}\enskip{}\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_2_ground_truth}}}

\subfloat[]{\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_0_ground_truth}}\enskip{}\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_1_ground_truth}}\enskip{}\subfloat{\includegraphics[width=0.28\paperwidth]{volume_4_2_ground_truth}}}

\caption{Comparison}
\end{figure*}

\end{document}

Antwort1

Wenn ich es richtig verstanden habe, dass Sie nur vier Überschriften benötigen (von (a) bis (d), eine pro Zeile), können Sie einfach die verschachtelten entfernen \subfloat:

\documentclass[english]{IEEEtran}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{graphicx}

\makeatletter
\@ifundefined{showcaptionsetup}{}{%
 \PassOptionsToPackage{caption=false}{subfig}}
\usepackage{subfig}
\makeatother

\usepackage{babel}
\begin{document}
\begin{figure*}
\centering
\subfloat[]{%
    \includegraphics[width=0.25\paperwidth]{example-image}\enskip
    \includegraphics[width=0.25\paperwidth]{example-image}\enskip
    \includegraphics[width=0.25\paperwidth]{example-image}%
}

\subfloat[]{%
    \includegraphics[width=0.25\paperwidth]{example-image}\enskip
    \includegraphics[width=0.25\paperwidth]{example-image}\enskip
    \includegraphics[width=0.25\paperwidth]{example-image}%
}

\subfloat[]{%
    \includegraphics[width=0.25\paperwidth]{example-image}\enskip
    \includegraphics[width=0.25\paperwidth]{example-image}\enskip
    \includegraphics[width=0.25\paperwidth]{example-image}%
}

\subfloat[]{%
    \includegraphics[width=0.25\paperwidth]{example-image}\enskip
    \includegraphics[width=0.25\paperwidth]{example-image}\enskip
    \includegraphics[width=0.25\paperwidth]{example-image}%
}

\caption{Comparison}
\end{figure*}

\end{document}

Bildbeschreibung hier eingeben

Antwort2

Verwenden Sie \includegraphicsden Befehl innerhalb von Miniseiten der gewünschten Breite.

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}

\begin{figure*}
\begin{minipage}{0.3\textwidth}
\includegraphics[width=\linewidth]{volume_4_0_ground_truth}
\end{minipage}\hspace*{\fill}
\begin{minipage}{0.3\textwidth}
\includegraphics[width=\linewidth]{volume_4_1_ground_truth}
\end{minipage}\hspace*{\fill}
\begin{minipage}{0.3\textwidth}
\includegraphics[width=\linewidth]{volume_4_2_ground_truth}
\end{minipage}\vspace{15pt}

\begin{minipage}{0.3\textwidth}
\includegraphics[width=\linewidth]{volume_4_0_ground_truth}
\end{minipage}\hspace*{\fill}
\begin{minipage}{0.3\textwidth}
\includegraphics[width=\linewidth]{volume_4_1_ground_truth}
\end{minipage}\hspace*{\fill}
\begin{minipage}{0.3\textwidth}
\includegraphics[width=\linewidth]{volume_4_2_ground_truth}
\end{minipage}
\caption{Comparison}
\end{figure*}

\end{document}

Mit dem folgenden Befehl können Sie bei Bedarf eine Überschrift einfügen:\captionof{subfigure}{Caption (a)}

verwandte Informationen