I am attempting to construct a new environment which will allow me to format arbitrary list types (itemize, enumerate, description etc.) with the new environment. As such I am passing it as a parameter to the new environment but it complains when I attempt the following:
\newenvironment{mylist}[1]
{
\begin{#1}
#Environment definition here
}
{\end{#1}}
I get the following error:
! Illegal parameter number in definition of \endmylist. 1 l.15 {\end{#1}}
How can I pass my parameters into the end block?