PDF出力におけるサブ図の番号付けと間隔のランダム化

PDF出力におけるサブ図の番号付けと間隔のランダム化

私の PDF 出力内のサブ図の番号付けはランダムですが、エディターでは番号付けは適切です。

サブ図は (a) から (d) まで正しく番号が付けられていますが、PDF にエクスポートすると次のようになります。

ここに画像の説明を入力してください

また、最初の行の数字の水平間隔が異なるのはなぜですか? 各行の設定は同じですが、最初の行は従っていません。

これを修正する方法がわかりません。LaTeX図のコードは次のとおりです。

%% 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}

答え1

必要なキャプションが 4 つ ((a) から (d)、各行に 1 つずつ) だけであると正しく理解している場合は、ネストされた を削除するだけで済みます\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}

ここに画像の説明を入力してください

答え2

\includegraphics希望する幅のミニページ内でコマンドを使用します。

\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}

必要に応じて、次のコマンドを使用してキャプションを含めることができます。\captionof{subfigure}{Caption (a)}

関連情報