I want to define a theoremstyle using amsthm, such that the complete environments content produced by \newtheorem
with this style are indented.
The following standalone example uses an adapted version of a suggestion posted in theorem-environment-with-hanging-indentation:
\documentclass{article}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[english]{babel}
\usepackage{blindtext}
\newtheoremstyle{indented}{3pt}{3pt}{\addtolength{\leftskip}{2.5em}}{}{\bfseries}{.}{.5em}{}
\theoremstyle{indented}
\newtheorem{definition}{Definition}
\begin{document}
\blindtext
\begin{definition}[test]
some text
\begin{enumerate}
\item an item
\item another item
\end{enumerate}
more text.
\end{definition}
\blindtext
\end{document}
which will produce a result like this:
The question at hand is of course, how can an indentation be realized, such that lists will be indented too. Would it for instance be advisable, to format the whole environment as a list? If so, how?
I would prefer to keep the definition as simple as possible, without for instance redefining amsthm commands.
Best Answer
Your code can be made to work by modifying both
\@totalleftmargin
(which controls nested list indentation) and\linewidth
as well as issuing a\parshape
to take these changes into consideration: