Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the amsart documentclass. Now the equation numbers are aligned to the left, I'm okay with that but what bothers me is the following: If I have equations in an enumerate environment it centers the equations with respect to the whole page. To me that doesn't look very good. How do I center the equation with respect to the body of the enumerate environment?

share|improve this question
    
@Jonas: Welcome to TeX.SX! Have a look at How to enumerate equations. There are solutions for itemize environments which may be used for enumerate environments as well. –  Stefan Kottwitz Mar 7 '11 at 15:54
    
@Jonas: Or do you still want the equations centered, but centered in the part of the text without the additional left margin? –  Hendrik Vogt Mar 7 '11 at 17:02
    
@Hendrik: Exactly, that is what I want! –  Jonas Teuwen Mar 7 '11 at 20:46
    
@Jonas: OK, that's what I thought. I've taken the liberty to try and clarify your question a bit. –  Hendrik Vogt Mar 7 '11 at 20:54
    
Does one of the solutions in “How can I center text/math inside a list environment?” work with amsart? –  Caramdir Mar 7 '11 at 23:37
show 4 more comments

1 Answer

up vote 2 down vote accepted

As long as you don't want the equations to be numbered, you can use the following:

\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}

Alas, if you try the same thing with a numbered display (i.e., changing equation* to equation), then the equation numbers line up with the left margin of the text inside the enumerate environment, rather than with the left edge of the overall text area.

share|improve this answer
    
Great! Thanks. –  Jonas Teuwen Mar 28 '11 at 22:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.