How to center gathered/aligned equations in enumerate environment?

This question explains how to center single equations in the enumerate environment, but I'm not sure how to do the same thing with multiple equations (e.g., gather or align).

-

1 Answer

Also the amsmath environments are using TeX's $$ display equations internally. The latter is using \displaywidth for the width of the equation and \displayindent for the left indentation of the equation. Both can be changed. Thus the following example patches internal amsmath macros to add the settings: \displaywidth=\textwidth \displayindent=-\leftskip  Full example: \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \makeatletter \patchcmd\start@gather{$$}{%
% \displaywidth=\textwidth \displayindent=-\leftskip }{}{\errmessage{Cannot patch \string\start@gather}} \patchcmd\start@align{}{%
% \displaywidth=\textwidth \displayindent=-\leftskip }{}{\errmessage{Cannot patch \string\start@align}} \patchcmd\start@multline{}{%
$$% \displaywidth=\textwidth \displayindent=-\leftskip }{}{\errmessage{Cannot patch \string\start@multline}} \patchcmd\mathdisplay{$$}{%
%
\displaywidth=\textwidth
\displayindent=-\leftskip
}{}{\errmessage{Cannot patch \string\mathdisplay}}
\makeatother

\begin{document}
\begin{gather}
A=A
\end{gather}
\begin{enumerate}
\item Hello
\begin{gather}$$A=A$$\end{gather}
\item Hello
\begin{align}$$A=A$$\end{align}
\item Hello
$$$A=A$$$
\item Hello
$$A=A$$
\begin{enumerate}
\item Hello
\begin{gather}
A=A
\end{gather}
\end{enumerate}
\end{enumerate}
\end{document}


-
Is there a way to disable these commands for a single list, while leaving them active for the rest of the document? – Randy Randerson Jul 28 '14 at 2:35
@fctaylor25 Then the redefinitions and the list should go into a local group between \begingroup and \endgroup. – Heiko Oberdiek Jul 28 '14 at 5:12