# Itemize inside newenvironment

I am new at LaTeX. My question is why this code doesn't work.

\documentclass[a4paper,12pt]{article}

\usepackage{fullpage}

\newcounter{const}
\renewcommand{\theconst}{\roman{const}}

\renewcommand{\item}{\stepcounter{const} (\theconst)}
\newcommand{\myitem}{\item}

\newenvironment{myenumerate}
{ \begin{itemize} }
{ \end{itemize} }

\begin{document}

\begin{myenumerate}
\myitem A
\myitem B
\myitem C
\end{myenumerate}

\end{document}

• Are you just interested in a list that prints its items using (i), (ii), (iii), ...? Should it look like a regular list?
– Werner
Jun 6, 2017 at 6:57
• you have redefined \item are you sure you want to redefine that? this is used in the following environments none of which would work now, enumerate, itemize, description, verbatim, center, quote, ... Jun 6, 2017 at 6:59

The issue is that \item does more than just print the items within the list. Specifically, it sets a flag to identify that you've provided at least one \item within any list (amongst other things). Redefining \item in the way you did removes this functionality and therefore throws an error under the regular list environment (myenumerate in your example emulates a regular enumerate list).

If all you're after is an enumerated list using \roman numbers, then you can use enumitem:

\documentclass{article}

\usepackage{enumitem}

\newlist{myenumerate}{enumerate}{1}
\setlist[myenumerate,1]{label = (\roman*)}
\newcommand{\myitem}{\item}

\begin{document}

\begin{myenumerate}
\myitem A
\myitem B
\myitem C
\end{myenumerate}

\end{document}


This can also be changed to print an inline list, as well as a host of other modifications.