\newcommand error

I am using following new command:

\newcommand{\legend}[3]{

\begin{itemize}

\item Serial Number: #1

\item #2

\item #3%\href{http://#3}{#3}}

\end{itemize}
}

\legend}{5, April 2015, *.*.com}


and I am getting following error

! Undefined control sequence.
\enit@enditemize ->\enit@after
\endlist \ifx \enit@series \relax \else \ifnu...
l.29   \end{itemize}


Can some one help?

• \legend{5}{April 2015}{*.*.com} (most probably) And welcome to TeX.SX! But there seem to be more errors – user31729 Jun 23 '15 at 8:35
• Please tell us which list related packages you are using. Also you call to the \legend command makes no sense given the difinition, you want something like \legend{A}{B}{C} to specify the three arguments. – Andrew Swann Jun 23 '15 at 8:37
• Note that fixing your call to \legend, your given code works with standard LaTeX, enumerate,paralist and enumitem so you need to gives a minimal working example (MWE) demonstrating the problem. – Andrew Swann Jun 23 '15 at 10:13
• Yes \legend{A}{B}{C} worked, – Umesh Jun 25 '15 at 4:18

2 Answers

This probably produces the requested result, at least it compiles without errors:

\documentclass{article}

\usepackage{hyperref}

\newcommand{\legend}[3]{

\begin{itemize}

\item Serial Number: #1

\item #2

\item #3%\href{http://#3}{#3}}

\end{itemize}
}

\begin{document}

\legend{5}{April 2015}{*.*.com}

\end{document}


I suppose that you load package paralist or enumitem which redefine the itemize environment. powerdotitself also loads by default the package enumerate. The solution is not to load paralist