Question
How can I create a new label for list items in the enumitem environment with tikz that include a variable (a counter in this case)?
Problem
Code does not compile. Runaway argument?....
Example
\documentclass{article}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{fontspec}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{enumitem}
\newcommand{\redcircle}[1]{%
\begin{tikzpicture}[font=\sffamily\bfseries]
\node[shape=circle,fill=red,text=white] at (0,0) {#1};
\end{tikzpicture}
}%
\begin{document}
\begin{enumerate}[label=\redcircle{\arabic*.}]
\item Test
\end{enumerate}
\end{document}
\protectbefore applying the new style. – azetina Jan 09 '15 at 15:48\protect\redcircle. – Werner Jan 09 '15 at 15:48