我想知道是否可以调整 6 行、3 列的数字矩阵,以完全适合 IEEE 格式的一侧。
目前我拥有的是以下内容:
\documentclass{IEEEconf}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\newcommand\extralabel[2]{{\edef\@currentlabel{\@currentlabel#2}\label{#1}}}
\begin{document}
\begin{figure*}[t]\centering
\captionsetup{justification=centering}
\begin{tabular}{cccc}
\includegraphics[width=0.315\linewidth,height=\textheight,keepaspectratio]{example-image-a} &
\includegraphics[width=0.315\linewidth,height=\textheight,keepaspectratio]{example-image-b} &
\includegraphics[width=0.315\linewidth,height=\textheight,keepaspectratio]{example-image-c} \\
\textbf{(a)} & \textbf{(b)} & \textbf{(c)}\\[6pt]
\end{tabular}
\begin{tabular}{cccc}
\includegraphics[width=0.315\linewidth]{example-image-a} &
\includegraphics[width=0.315\linewidth]{example-image-b} &
\includegraphics[width=0.315\linewidth]{example-image-c} \\
\textbf{(d)} & \textbf{(e)} & \textbf{(f)}\\[6pt]
\end{tabular}
\begin{tabular}{cccc}
\includegraphics[width=0.315\linewidth]{example-image-a} &
\includegraphics[width=0.315\linewidth]{example-image-b} &
\includegraphics[width=0.315\linewidth]{example-image-c} \\
\textbf{(g)} & \textbf{(h)} & \textbf{(i)}\\[6pt]
\end{tabular}
\begin{tabular}{cccc}
\includegraphics[width=0.315\linewidth]{example-image-a} &
\includegraphics[width=0.315\linewidth]{example-image-b} &
\includegraphics[width=0.315\linewidth]{example-image-c} \\
\textbf{(j)} & \textbf{(k)} & \textbf{(l)}\\[6pt]
\end{tabular}
\begin{tabular}{cccc}
\includegraphics[width=0.315\linewidth]{example-image-a} &
\includegraphics[width=0.315\linewidth]{example-image-b} &
\includegraphics[width=0.315\linewidth]{example-image-c} \\
\textbf{(m)} & \textbf{(n)} & \textbf{(o)}\\[6pt]
\end{tabular}
\begin{tabular}{cccc}
\includegraphics[width=0.315\linewidth]{example-image-a} &
\includegraphics[width=0.315\linewidth]{example-image-b} &
\includegraphics[width=0.315\linewidth]{example-image-c} \\
\textbf{(p)} & \textbf{(q)} & \textbf{(r)}\\[6pt]
\end{tabular}
\caption
{
\textbf{(a)}
\textbf{(b)}
\textbf{(c)}
\textbf{(d)}
\textbf{(e)}
\textbf{(f)}
\textbf{(g)}
\textbf{(h)}
\textbf{(i)}
\textbf{(j)}
\textbf{(k)}
\textbf{(l)}
\textbf{(m)}
\textbf{(n)}
\textbf{(o)}
\textbf{(p)}
\textbf{(q)}
\textbf{(r)}
}
\label{fig:test_figure}
\extralabel{fig:test_figure:a}{(a)}
\extralabel{fig:test_figure:b}{(b)}
\extralabel{fig:test_figure:c}{(c)}
\extralabel{fig:test_figure:d}{(d)}
\extralabel{fig:test_figure:e}{(e)}
\extralabel{fig:test_figure:f}{(f)}
\extralabel{fig:test_figure:g}{(g)}
\extralabel{fig:test_figure:h}{(h)}
\extralabel{fig:test_figure:i}{(i)}
\extralabel{fig:test_figure:j}{(j)}
\extralabel{fig:test_figure:k}{(k)}
\extralabel{fig:test_figure:l}{(l)}
\extralabel{fig:test_figure:m}{(m)}
\extralabel{fig:test_figure:n}{(n)}
\extralabel{fig:test_figure:o}{(o)}
\extralabel{fig:test_figure:p}{(p)}
\extralabel{fig:test_figure:q}{(q)}
\extralabel{fig:test_figure:r}{(r)}
\end{figure*}
\end{document}
我希望它们全部适合并且图形的标题也位于页面内。
答案1
顺便说一句,IEEE 不喜欢弄乱他们的标题格式。
\documentclass{IEEEconf}
\usepackage{graphicx}
%\usepackage{caption}
%\usepackage{subcaption}
\newcommand\extralabel[2]{{\edef\@currentlabel{\@currentlabel#2}\label{#1}}}
\newlength{\mywidth}
\newlength{\myheight}
\usepackage{showframe}
\begin{document}
\begin{figure*}[t]\centering
%\captionsetup{justification=centering}
\setbox0=\vbox{\caption
{
\textbf{(a)}
\textbf{(b)}
\textbf{(c)}
\textbf{(d)}
\textbf{(e)}
\textbf{(f)}
\textbf{(g)}
\textbf{(h)}
\textbf{(i)}
\textbf{(j)}
\textbf{(k)}
\textbf{(l)}
\textbf{(m)}
\textbf{(n)}
\textbf{(o)}
\textbf{(p)}
\textbf{(q)}
\textbf{(r)}
}
\label{fig:test_figure}
\extralabel{fig:test_figure:a}{(a)}
\extralabel{fig:test_figure:b}{(b)}
\extralabel{fig:test_figure:c}{(c)}
\extralabel{fig:test_figure:d}{(d)}
\extralabel{fig:test_figure:e}{(e)}
\extralabel{fig:test_figure:f}{(f)}
\extralabel{fig:test_figure:g}{(g)}
\extralabel{fig:test_figure:h}{(h)}
\extralabel{fig:test_figure:i}{(i)}
\extralabel{fig:test_figure:j}{(j)}
\extralabel{fig:test_figure:k}{(k)}
\extralabel{fig:test_figure:l}{(l)}
\extralabel{fig:test_figure:m}{(m)}
\extralabel{fig:test_figure:n}{(n)}
\extralabel{fig:test_figure:o}{(o)}
\extralabel{fig:test_figure:p}{(p)}
\extralabel{fig:test_figure:q}{(q)}
\extralabel{fig:test_figure:r}{(r)}
}% labels are local to \vbox
\setlength{\mywidth}{\dimexpr \textwidth - 8\tabcolsep}%
\divide\mywidth by 3
\setlength{\myheight}{\dimexpr \textheight-\ht0-\dp0}%
\divide\myheight by 6
\advance\myheight by -\arraystretch\dp\strutbox% added to bottom of this row
\advance\myheight by -\arraystretch\baselineskip% row containing labels
\advance\myheight by -6pt% from \\[6pt]
%
\begin{tabular}{ccc}
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-a} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-b} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-c} \\
\textbf{(a)} & \textbf{(b)} & \textbf{(c)}\\[6pt]
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-a} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-b} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-c} \\
\textbf{(d)} & \textbf{(e)} & \textbf{(f)}\\[6pt]
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-a} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-b} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-c} \\
\textbf{(g)} & \textbf{(h)} & \textbf{(i)}\\[6pt]
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-a} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-b} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-c} \\
\textbf{(j)} & \textbf{(k)} & \textbf{(l)}\\[6pt]
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-a} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-b} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-c} \\
\textbf{(m)} & \textbf{(n)} & \textbf{(o)}\\[6pt]
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-a} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-b} &
\includegraphics[width=\mywidth,height=\myheight,keepaspectratio]{example-image-c} \\
\textbf{(p)} & \textbf{(q)} & \textbf{(r)}\\[6pt]
\end{tabular}
\unvbox0
\hrule% show bottom of caption
\end{figure*}
\end{document}