我正在尝试使用以下命令以 2x2 格式显示 4 个 .jpg 文件:
\begin{figure}[htb]
\centering
\begin{tabular}{@{}cccc@{}}
\includegraphics[scale=0.26]{error1.jpg}
\includegraphics[scale=0.26]{afperror1.jpg} \\
\includegraphics[scale=0.26]{error2.jpg}
\includegraphics[scale=0.26]{afperror2.jpg}
\multicolumn{4}{c}{\includegraphics[width=.23\textwidth]}
\end{tabular}
\end{figure}
但我收到以下错误:
!Misplaced \omit.\multispan ->\omit@\multispan ...c}
这很奇怪,因为查看生成的 PDF 时图像渲染正常。是什么导致了这个问题?
答案1
\begin{figure}[htb]
\centering
\begin{tabular}{@{}cc@{}}
\includegraphics[scale=0.26]{error1.jpg} &
\includegraphics[scale=0.26]{afperror1.jpg} \\
\includegraphics[scale=0.26]{error2.jpg} &
\includegraphics[scale=0.26]{afperror2.jpg} \\
\multicolumn{2}{c}{\includegraphics[width=.23\textwidth]{something}}
\end{tabular}
\end{figure}