# enumerate list embedded in table with custom label

I'd like to augment the embedded enumerated list inside tabular to have custom labels. I am using Yiannis Lazarides's tabular example, but would like to add a custom label that can do circled number as in Stefan Kottwitz's solution

So combined, this is what I'm trying to do:

\documentclass{article}
\usepackage{enumitem}
\usepackage{tikz}
\usepackage[demo]{graphicx}
\newcommand*\numcircledtikz[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}

\begin{document}

\begin{table}[!h]
\begin{minipage}{1\textwidth}\centering
\begin{tabular}{p{.8\textwidth} | p{.2\textwidth} }
\raisebox{\dimexpr\ht\strutbox-\height\relax}{\includegraphics[width=0.8\textwidth]{test}}
&
\begin{enumerate}[label=\protect\numcircledtikz{\arabic*}]
\item ext steps\ldots
\item num. circled
\end{enumerate} \\
\end{tabular}\end{minipage}\end{table}

\end{document}


And this is the error messages I get:

! Missing number, treated as zero. <to be read again>
\c@*  l.62 ...e}[label=\protect\numcircledtikz{\arabic*}
] ?


When I try something more simple [label=\textcircled{\arabic*}], I get the same error message. How should I fix this error?

-

## 1 Answer

Without a complete example of your actual code, it's difficult to see where the problem might be. However, this works:

\documentclass{article}
\usepackage{enumitem}
\usepackage{tikz}

\newcommand*\numcircledtikz[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}

\begin{document}

\begin{tabular}{|p{4cm}|}
\hline
\textbf{Name:} Foo \\
\hline
\textbf{Main success scenario:}
\begin{enumerate}[label=\protect\numcircledtikz{\arabic*}]
\item [\numcircledtikz{1}]Entry action
\item Next steps\ldots
\end{enumerate}\\
\hline
\end{tabular}

\end{document}


-
I thought I had in my preamble \usepackage{enumitem} but I did not. So after checking that, now the code works. Thank you. –  Sal Jr Jul 25 '12 at 16:10