我在背页使用 IEEE 双栏格式。为什么我的前两个数字太近,而第二和第三个数字却有很大空间?
代码是这样的
\begin{figure*}
\begin{minipage}[t]{.31\linewidth}
\includegraphics[width=\linewidth]{example-image-a}%
\caption{eeee} \label{ssss}
\end{minipage}\hfil
\begin{minipage}[t]{0.31\linewidth}
\includegraphics[width=\linewidth]{{example-image-a}}
\caption{bbbbbbb} \label{xx}
\end{minipage}\hfill
\begin{minipage}[t]{0.31\linewidth}
\includegraphics[width=\linewidth]{{example-image-a}}
\caption{aaaaaaaaa} \label{dd}
\end{minipage}
\end{figure*}
答案1
我猜你的代码片段中有输入错误。我将其标记为% <---
:
\begin{figure*}
\begin{minipage}[t]{.31\linewidth}
\includegraphics[width=\linewidth]{example-image-a}%
\caption{eeee} \label{ssss}
\end{minipage}\hfil % <--- probably should be \hfill
\begin{minipage}[t]{0.31\linewidth}
\includegraphics[width=\linewidth]{{example-image-a}}
\caption{bbbbbbb} \label{xx}
\end{minipage}\hfill
\begin{minipage}[t]{0.31\linewidth}
\includegraphics[width=\linewidth]{{example-image-a}}
\caption{aaaaaaaaa} \label{dd}
\end{minipage}
\end{figure*}
- 或者您可能喜欢定义
minipage
由 s 确定的距离\hfil
和居中的内容figure*
:
\begin{figure*}
\centering
\begin{minipage}[t]{.31\linewidth}
\includegraphics[width=\linewidth]{example-image-a}%
\caption{eeee} \label{ssss}
\end{minipage}\hfil
\begin{minipage}[t]{0.31\linewidth}
\includegraphics[width=\linewidth]{{example-image-a}}
\caption{bbbbbbb} \label{xx}
\end{minipage}\hfil
\begin{minipage}[t]{0.31\linewidth}
\includegraphics[width=\linewidth]{{example-image-a}}
\caption{aaaaaaaaa} \label{dd}
\end{minipage}
\end{figure*}
答案2
或者minipage
,您可以加载subfig
包并使用\subfloat[]{}
以便更好地控制主标题和子标题的格式和间距。
附注:\stretch{n}
允许不均匀但受控的图像分布,以防您想让一些图像彼此更接近。例如,使用\stretch{1}
和\stretch{3}
会产生以下效果
\stretch
如果在图形之间应用相同的方法,其工作原理就完全一样\hfill
。
\documentclass[12pt]{IEEEtran}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{cleveref}
\usepackage{kantlipsum} % For dummy text
%%% Settings for subfigures
% If lofdepth=2, LoF will also contain sub-figures
%\captionsetup{lofdepth=1}
% Position and format of the main caption
\captionsetup[figure]{position=bottom,skip=12pt}
% Position and format of sub-captions
\captionsetup[subfigure]{font=small,position=bottom,captionskip=6pt}
\begin{document}
\section{The first section}
\kant[1-4] % Dummy text
\begin{figure*}
\centering
\subfloat[The left]{%
\label{subfig:three-images-a}%
\includegraphics[width=0.28\textwidth,height=2.3cm]{example-image-a}}%
\hspace{\stretch{1}}%
\subfloat[The middle]{%
\label{subfig:three-images-b}%
\includegraphics[width=0.28\textwidth,height=2.8cm]{example-image-b}}%
\hspace{\stretch{1}}%
\subfloat[The right]{%
\label{subfig:three-images-c}%
\includegraphics[width=0.28\textwidth,height=2.5cm]{example-image-c}}%
\caption{Three images}\label{fig:three-images}
\end{figure*}
\section{The other section}
\kant[5-7] % Dummy text
References: % Demonstrates referencing to sub-figures
\begin{itemize}
\item[] the left image: \cref{fig:three-images}~\subref{subfig:three-images-a}
\item[] the right image: \cref{fig:three-images}~\subref{subfig:three-images-c}
\item[] the middle image: \cref{fig:three-images}~\subref{subfig:three-images-b}
\end{itemize}
\end{document}