# How to rename or “copy” a latex environment

I want to rename or "copy" the enumerate environment twice in order to have two different named enumerate environments. E.g.

\begin{questions}
\item lorem ipsum
\item lorem ipsum
\end{questions}

\item lorem ipsum
\item lorem ipsum

-
Hello, try to look the ctan.org/pkg/enumitem package – flav Jan 5 at 12:56
Can you specify what you want to achieve? Please show an example case where you'd use these new lists/environments. – Alenanno Jan 5 at 13:03
Your sample text suggests that you want to keep questions and answers together in your source. That's a good idea. The answers package is designed for that - you might want to take a look. – Ethan Bolker Jan 5 at 13:31

## Edit: Questionnaire time!

This solution sets a new command called \qanda, a modified version of this post by cgnieder and this question for placing a title.

The new command takes two arguments, but inside of each argument we have a potentially infinite list, so in the first argument you'll write the questions, while in the second one the answers, obviously in the same order.

Additionally the answers' list has been rotated but you can do what you want with it. Here's the output:

And here's the code:

\documentclass{article}
\usepackage{enumitem}
\usepackage{xparse}
\usepackage{rotating}

\setlist[enumerate]{itemsep=-1mm}

\NewDocumentCommand\qanda{>{\SplitList{;}}m>{\SplitList{;}}m}
{
\paragraph{Questions:}
\begin{enumerate}
\ProcessList{#1}{ \insertq }
\end{enumerate}
\vspace{2cm}
\begin{turn}{180}
\begin{minipage}{\textwidth}
\begin{enumerate}
\ProcessList{#2}{ \inserta }
\end{enumerate}
\end{minipage}
\end{turn}
}
\newcommand\insertq[1]{\item #1}
\newcommand\inserta[1]{\item #1}

\begin{document}

\section*{Questionnaire}

And now some questions and (rotated) answers.

\qanda{% Questions
What's the name of our star?;
What planet comes after the Earth?}%
Sun;%
Mars}%

\end{document}


\documentclass{article}
\usepackage{enumitem}

\newlist{questions}{enumerate}{3}
\setlist[questions]{label=\arabic*.}

\begin{document}
\begin{questions}
\item lorem ipsum
\item lorem ipsum
\end{questions}

\item lorem ipsum
\item lorem ipsum
\end{document}

-

There are four ways how to copy an environment:

1. Using low-level copy. This is a true copy in the TeX's sense, but it's a non-LaTeXy solution. The environment answers is now independent from any re-definition of questions.

\let\answers\questions

2. Using slightly higher-level copy. If questions is re-defined, so is answers automatically.

\newenvironment{answers}{\questions}{\endquestions}

3. Using proper LaTeX groups too. Same as the previous, but an extra level of unnecessary grouping is added. I wouldn't recommend it.

\newenvironment{answers}{%
\begin{questions}%
}{%
\end{questions}%
}

4. Defining the environment from scratch. If you define questions, you can define answers the same way:

\newenvironment{questions}{BLA}{BLABLA}

\newtheorem{questions}{BLA}