I need to write about 200 the following environment, so I was thinking to define it at one place.
Here is my original codes
\begin{description}
\item[Description:] \ \\ text 1 here
\item[Analysis: ] \ \\ text 2 here
\item[Related Problems:] \ \\ text 3 here
\item[Code 1:] \
\begin{verbatim}
text 4 here
\end{verbatim}
\item[Code 2:] \
\begin{verbatim}
text 5 here
\end{verbatim}
\end{description}
How can I define a new environment codeExample so that I can use it as below to generate the same content as above,
\begin{codeExample}
\item text 1 here
\item text 2 here
\item text 3 here
\item text 4 here
\item text 5 here
\item text 6 here (it will generate Code 6)
\end{codeExample}
\end{verbatim}is "eaten" by verbatim mode (including the next\item). Putting that into commands is a pretty harmful combination (there are posts about that on this site). I also do not see the need for description here (as you want to produce headings you could manage with counters...). – TeXnician Oct 11 '17 at 14:12codeExample"generate Code 6" from the input/descriptionyou provided? – Werner Oct 11 '17 at 19:36