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)까지, 행당 하나씩)만 필요하다는 것을 올바르게 이해했다면 중첩된 캡션을 제거하면 됩니다 \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)}

관련 정보