【发布时间】:2011-02-12 13:26:06
【问题描述】:
我在 LaTeX 中有一个带有标题的图形,我需要在其中添加一个公式(equation* 或 displaymath 环境)。例如:
\documentclass[12pt]{article}
\begin{document}
\begin{figure}[tbph]
\begin{center}
%...
\end{center}
\caption{As you can see
\begin{displaymath}4 \ne 5\end{displaymath}
}
\label{fig:somefig}
\end{figure}
\end{document}
这让 pdflatex 很生气,尽管它会生成一个 PDF。
! Argument of \@caption has an extra }.
<inserted text>
\par
l.9 }
在图形标题中添加方程式的正确方法是什么?
注意:请不要建议简单地使用$ ... $ 数学环境;
所示方程是一个玩具示例;我的真实方程式要复杂得多。
另见:
【问题讨论】:
-
看起来你正在尝试做的事情看起来很丑陋。我赞成在图之前或之后单独显示方程式,并在标题中
\ref它...
标签: latex mathematical-typesetting