I'm trying to get a theorem-derived environment to indent the entire block of text. What I have is
\theoremstyle{aside}
\newtheorem{asides}{Aside}[chapter]
\NewDocumentEnvironment{aside}{m o}
{\begin{adjustwidth}{1in}{0em}
\IfNoValueTF{#2}
{\asides \label{#1} \addtheocontentsline[]{#1}{Aside}}
{\asides[#2] \label{#1} \addtheocontentsline[#2]{#1}{Aside}}
\ignorespaces
\end{adjustwidth}
}
{\endasides}
where you type \begin{aside}{label}[Title] and it puts it into the TOC based on a discussion here: AMS theorems in table of contents
The whole {aside} block should indent. However, what's happening is that only the header indents and nothing else. (When I try to adjust the indent in the {aside} environment style, the same thing happens}.

\end{adjustwidth}in the begin code for theasideenvironment, ie. before the body starts. This means that in the body the normal indentation is restored, just as you observe. I think the\end{adjustwidth}must be put in the end code, i.e. just before\endasides. I haven't tested it, though. – Pieter van Oostrum Nov 25 '16 at 23:28}with the\endadjustwidth(} \end{adjustwidth} {\endasides}), I end up with the errorExtra \endgroup. \end{adjustwidth– Necarion Nov 26 '16 at 21:32...\ignorespaces} {\end{adjustwidth}\endasides}instead. – Pieter van Oostrum Nov 26 '16 at 22:34