我正在使用 documentclass amsart
。现在方程式编号向左对齐,我对此没意见,但让我困扰的是:如果我在环境中有方程式,enumerate
它会将方程式相对于整个页面居中。对我来说,这看起来不太好。我如何将方程式相对于环境主体居中enumerate
?
答案1
只要您不想对方程式进行编号,就可以使用以下命令:
\documentclass{amsart}
%--------------------------------------------------------------------
\newenvironment{shiftequation}
{%
\par\noindent\begin{minipage}{\linewidth}
\begin{equation*}
}
{%
\end{equation*}
\end{minipage}
}
%--------------------------------------------------------------------
\begin{document}
Here's some text. Here's some text. Here's some text. Here's some
text. Here's some text. Here's some text. Here's some text. Here's
some text. Here's some text.
\begin{equation*}
\sin^{2} x + \cos^{2} x =
\int_{0}^{1} \bigl(\sin x + \cos x\bigr)^{4}\, dx +
\int_{-1}^{1} \bigl(\log(x^{3}) + \sin^{5} (x^{5})\bigr)^{4}\,dx
\end{equation*}
\begin{enumerate}
\item Here's some text. Here's some text. Here's some text. Here's
some text. Here's some text. Here's some text. Here's some
text. Here's some text. Here's some text.
\begin{shiftequation}
\sin^{2} x + \cos^{2} x =
\int_{0}^{1} \bigl(\sin x + \cos x\bigr)^{4}\, dx +
\int_{-1}^{1} \bigl(\log(x^{3}) + \sin^{5} (x^{5})\bigr)^{4}\,dx
\end{shiftequation}
\item Here's some text. Here's some text. Here's some text. Here's
some text. Here's some text. Here's some text. Here's some
text. Here's some text. Here's some text.
\end{enumerate}
\end{document}
唉,如果您尝试使用编号显示执行相同的操作(即,更改equation*
为equation
),则方程式编号将与环境内文本的左边距对齐enumerate
,而不是与整个文本区域的左边缘对齐。