I want to create an environment that will have indentation to all the content inside it. Similar to \begin{enumberate}- \end{enumerate}
but without need of writing \item
I tried doing it like this
\newenvironment{indented}
{\par\leftskip1cm\relax}
{\par\leftskip0cm\relax}
This works partially with 2 problems -
- Nesting doesn't work.
- Code listing using
lstlisting
doesn't honor this.
Please suggest how to make this work.
\newenvironment{indented} {\par\leftskip=\dimexpr\leftskip+1cm\relax} {\par\leftskip=\dimexpr\leftskip-1cm\relax}
. However, it will not address thelstlisting
issue.\advance\leftskip 1cm\relax
?