# Alternative Enumeration Environment

I have a theorem which lists a bunch of properties, and then I prove them one-by-one. Because the proofs are long, it looks awkward when every line is automatically indented by the enumerate environment.

Is it possible to define a new environment, call it enumproof, which is exactly the same as the enumerate environment, but without the indentation?

Bonus challenge: Is it possible to re-define the enumerate environment so that it knows when it is inside the proof environment (from the amsthm package)--and in that case, it automatically switches to act like the enumproof environment (meaning, without the indentation)?

\documentclass{article}

\usepackage{amsthm}
\usepackage{enumitem}

\begin{document}

\noindent I want this enumeration to look normal:
\begin{enumerate}
\item Hello
\item to
\item you
\end{enumerate}

\begin{proof}
But I want this enumeration to have no extra indentation:
\begin{enumerate}
\item Hello
\item to
\item you
\end{enumerate}
\end{proof}

\end{document}

-
I usually write normal paragraphs. The initial number is sufficient to give clues and a long indented text is not so nice. –  egreg Mar 9 '12 at 21:17

The Bonus one can be done by checking the command \@currenvir. Therefor I am using the command BeforBeginEnvironment provided by etoolbox. The changings of the environment enumerate are local because they will be passed only inside the group proof.

For your result you need the following settings:

\setlist[enumerate]{leftmargin=0pt,itemindent=*,listparindent=\parindent,parsep=0pt}


The example:

\documentclass{article}
\usepackage{showframe}
\usepackage{amsthm}
\usepackage{enumitem}
\usepackage{kantlipsum}
\usepackage{etoolbox}
\makeatletter
\BeforeBeginEnvironment{enumerate}{%
\def\@tempa{proof}%
\ifx\@currenvir\@tempa
\setlist[enumerate]{leftmargin=0pt,itemindent=*,listparindent=\parindent,parsep=0pt}%
\fi}
\makeatother
\begin{document}

\noindent I want this enumeration to look normal:
\begin{enumerate}
\item Hello
\item to
\item you
\end{enumerate}

\begin{proof}
But I want this enumeration to have no extra indentation:
\begin{enumerate}
\item Hello \kant[1]\kant[2]
\item to
\item you
\end{enumerate}
\end{proof}

\begin{enumerate}
\item Hello
\item to
\item you
\end{enumerate}
\end{document}


-
@jamaicanworm: Please see my edit –  Marco Daniel Mar 9 '12 at 21:29
@jamaicanworm Clearly your question wasn't so clear, since both Marco and I interpreted it the same way. But Marco has now solved both your problems, so I've deleted my answer. –  Alan Munn Mar 9 '12 at 21:42
This is good, but there is still one problem: if I have a paragraph break within an \item (inside an enumerate inside a proof), for some reason the new paragraph is still not indented as normal paragraphs should be... –  jamaicanworm Mar 10 '12 at 21:13
@jamaicanworm Are you sure Marco's code doesn't do what you want? I've updated his code slightly, and shown an example image. Does this do what you want? If not, you really need to be clearer on what the problem is. –  Alan Munn Mar 10 '12 at 22:26
Before it didn't do what I needed, by thanks to your edit now it does. Thank you Alan! –  jamaicanworm Mar 10 '12 at 22:35