两栏页面顶部有三个图表,另加标题

两栏页面顶部有三个图表,另加标题

您好,我无法将 3 个图对齐到 2 列页面的顶部。我想占用尽可能多的空间(在页边距内)。我还需要在图下插入长标题,但它们不会停留在有限的空间内。我正在使用\documentclass[conference]{IEEEtran} 如何正确使用figure\includegrapghics

这就是我想做的但我不想要子图:

\begin{figure*}[t]
\centering
\begin{subfigure}[b]{width=0.3\textwidth}
\includegraphics[width=\textwidth]{images/fig1.eps}\caption{Here goes a very looooooooooooong caption.}\label{fig:vishay}
\end{subfigure}
\begin{subfigure}[b]{width=0.3\textwidth}
\includegraphics[width=\textwidth]{images/fig2.eps}\caption{Here goes a very looooooooooooong caption.}
\label{fig:fig2}
\end{subfigure}
% Same thing for fig3...
\end{figure*}

答案1

IEEEtran与不兼容,请改用包中的subcaption环境:subfloatsubfig

\documentclass[conference]{IEEEtran}
\usepackage{graphicx}
\usepackage{subfig}

\usepackage{lipsum}

\begin{document}
    \begin{figure*}
    \centering
    \setkeys{Gin}{width=0.3\textwidth}
\subfloat[Here goes a very looooooooooooong caption,
          \label{fig:subfig-a}]{\includegraphics{example-image-a}}
    \hfill
\subfloat[Here goes a very looooooooooooong caption,
          \label{fig:subfig-b}]{\includegraphics{example-image-b}}
    \hfill
\subfloat[Here goes a very looooooooooooong caption,
          \label{fig:subfig-c}]{\includegraphics{example-image-c}}

\caption{common caption for sub figures \dots}
\label{fig:common}
    \end{figure*}
\lipsum\lipsum
\end{document}

enter image description here

编辑: 在这种情况下,您希望将三幅图像排成一行,然后将它们封装在minipages 或table环境中。在后一种情况下,mwe 是:

\documentclass[conference]{IEEEtran}
\usepackage{graphicx}
\usepackage{tabularx}

\usepackage{lipsum}

\begin{document}
    \begin{figure*}
    \centering
    \setkeys{Gin}{width=\linewidth}
    \begin{tabularx}{\linewidth}{XXX}
\includegraphics{example-image-a}
\caption{Here goes a very very very very very long caption}
\label{fig:subfig-a}
    &
\includegraphics{example-image-b}
\caption{Here goes a very  very very very very long caption}
\label{fig:subfig-b}
    &
\includegraphics{example-image-c}
\caption{Here goes a very  very very very very long caption}
\label{fig:subfig-c}
    \end{tabularx}
    \end{figure*}
\lipsum\lipsum
\end{document}

enter image description here

相关内容