
我正在使用對齊環境,並希望透過在某些步驟中指定使用的方程式編號來添加一些關於等號的提示。但是,如果我這樣做,等號就不再對齊了。有沒有辦法讓等號對齊而不是整個堆疊關係?請參閱下面的最小範例。
\documentclass{book}
\usepackage{amsmath}
\begin{document}
\chapter{Test align equality}
\begin{equation}\label{eq::ac}
a=c
\end{equation}
\begin{align*}
a &= b \\
&\stackrel{(\ref{eq::ac})}{=} c
\end{align*}
\end{document}
答案1
您可以使用\mathclap
來自mathtools
(加載amsmath
)的命令來獲得它,但我提出了另一種不帶 的解決方案\stackrel
,在我看來,它看起來更好:
\documentclass{book}
\usepackage{mathtools}
\begin{document}
\chapter{Test align equality}
\begin{equation}\label{eq::ac}
a=c
\end{equation}
\begin{align*}
a &= b \\
&\stackrel{\mathclap{\eqref{eq::ac}}}{=} c
\end{align*}
\begin{align*}
a &= b \\
&= c\rlap{ \qquad by \eqref{eq::ac}}
\end{align*}
\end{document}