我应该使用哪一个来注释方程式?\tag 还是 \text?

我应该使用哪一个来注释方程式?\tag 还是 \text?

我仍然对选择是否使用\text\tag注释方程式感到困惑。我应该使用哪一个?如果是个人喜好,它们之间的优缺点是什么?

\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{mathtools}

\begin{document}

\section*{With \textbackslash text}
\begin{align*}
v = u + at && \text{without $s$}\\
s = vt - \tfrac{1}{2}at^2 && \text{without $u$}\\
s = ut + \tfrac{1}{2}at^2 && \text{without $v$}\\
s = \frac{v+u}{2}t && \text{without $a$}\\
v^2 = u^2 +2as && \text{without $t$}
\end{align*}


\section*{With \textbackslash tag}
\begin{gather}
v = u + at \tag*{without $s$}\\
s = vt - \tfrac{1}{2}at^2 \tag*{without $u$}\\
s = ut + \tfrac{1}{2}at^2 \tag*{without $v$}\\
s = \frac{v+u}{2}t \tag*{without $a$}\\
v^2 = u^2 +2as \tag*{without $t$}
\end{gather}
\end{document}

在此处输入图片描述

答案1

\tag旨在用作一次性方程编号,而不是在最后使用的数字上加一。特别是,它成为的默认文本\ref。这为何时使用其中一个或另一个提供了一些线索。如果注释本质上是方程的一部分,如您的示例中所示,则使用\text您永远不会想要 see equation \ref{foo}

参见不含 t 的方程

另一方面,如果评论是您可能想要引用的一种标签,请使用\tag

相关内容