::
Devo creare un environment in cui sono utilizzati due parametri. Mi sono accorto che se metto uno dei due parametri nella parte di chiusura dell’environment ottengo errore. Un esempio è `\newenvironment{margins}[2]
{
\begin{list}{} {
\setlength{\leftmargin}{#1} \setlength{\rightmargin}{#2} } \item }
{#1\end{list}}`
da usarsi come
`\begin{margins}{0.5cm}{1cm}
But please note that this paragraph has custom margins. But please
note that this paragraph has custom margins.But please note that this
paragraph has custom margins.But please note that this paragraph has
custom margins.vBut please note that this paragraph has custom
margins.But please note that this paragraph has custom margins.But
please note that this paragraph has custom margins.But please note
that this paragraph has custom margins.But please note that this
paragraph has custom margins.
\end{margins}`
Non funziona ma se si toglie il parametro dalla chiusura, ovvero`\newenvironment{margins}[2]
{
\begin{list}{} {
\setlength{\leftmargin}{#1} \setlength{\rightmargin}{#2} } \item }
{\end{list}}`
tutto funziona. Come posso fare?