Can someone help my why are the two warning messages different syntactically (when they seem to be generated the same way)?
\documentclass{article}
\usepackage{enumitem}
\usepackage{refcount}
\makeatletter
\newcommand\statuslabel[1]{%
\def\nref{\getrefnumber{#1}}
\@latex@warning{Not a number (\#3): \nref}
}
\makeatother
\makeatletter
\newcounter{enumerateof} % to create unique labels
\newenvironment{enumerateof}
{\stepcounter{enumerateof}
\begin{enumerate}[
label=\protect\statuslabel{enof@\arabic{enumerateof}},
ref=\arabic*]}
{\label{enof@\arabic{enumerateof}}%
\end{enumerate}}
\makeatother
\begin{document}
\begin{enumerateof}
\item example
\end{enumerateof}
\begin{table}
\caption{example}
\label{tab@ex}
\end{table}
\protect\statuslabel{tab@ex}
\end{document}
Warning messages:
LaTeX Warning: Not a number (\#3): {1} on input line 27.
LaTeX Warning: Not a number (\#3): 1 on input line 35.
Where does those curly braces come from? How can I remove them (define something which is equal to the content of the braces}?
enumitem? – masu Oct 28 '13 at 17:10refis supposed to print a string (and also\arabicfor that matter), which may include formating commands, and which should be local. (But I discovered sometimes there is an extra pair of redundant braces.) – Javier Bezos Nov 04 '13 at 16:24