How to set enumitem for theorem enviroments?

2018-02-06 05:51:23

I currently have the following enumitem patter for theorems:

\begin{theorem}

text

\begin{enumerate}[label={(\arabic*)}]

\item text 1

\item text 2

\end{enumerate}

\end{theorem}

which yields

Is there a way I make this label automatic for every enumerate environment nested in the theorem environment so I don't need to type the label in each time? More specifically, is there a way to make a preset for enumerate in specific environments? It is not necessary to use enumitem if I can reproduce the same "indenting" for enumerate in the theorem environment.

The label options of the enumerate environment can be set inside the theorem environment right at its start with \AtBeginEnvironment from etoolbox and \setlist[enumerate].

This does not change the way enumerate environments are numbered outside of theorem!

Another way is to use a special enumtheo list with \newlist and the same settings for enumtheo as would have done with enumerate and apply enumtheo instead of e

  • The label options of the enumerate environment can be set inside the theorem environment right at its start with \AtBeginEnvironment from etoolbox and \setlist[enumerate].

    This does not change the way enumerate environments are numbered outside of theorem!

    Another way is to use a special enumtheo list with \newlist and the same settings for enumtheo as would have done with enumerate and apply enumtheo instead of enumerate inside the theorems (I've used another theorem environment just for preventing interference between enumerate and enumtheo)

    \documentclass{article}

    \usepackage{amsthm}

    \usepackage{enumitem}

    \usepackage{etoolbox}

    \newtheorem{theorem}{Theorem}

    \newtheorem{othertheorem}{Other Theorem}

    \newlist{enumtheo}{enumerate}{1}

    \setlist[enumtheo]{label={(\arabic*)}}

    \AtBeginEnvironment{theorem}{%

    \setlist[enumerate]{label={(\arabic*)}}

    }

    \begin{document}

    \begin{theorem}

    text

    \begin{enumerate}

    \item text 1

    \item text 2

    \end{enumerate}

    \end{theorem}

    \begin{enumerate}

    2018-02-06 08:20:46