I need to make my Enumerate look like this:
REQ/Text/001
REQ/Text/002
…
What i can do is this:
REQ/Text/1
…
But how can i add leading Zeros? I tried the answer in:
Enumerate list – numbers with prefix
but it doesnt work. It brings me something like:
REQ/Text/1!100 01!10 001
but the exclamation mark is turned around.
Sorry for my bad English, im from Germany.
Thanks.
Edit:
A minimal Code example is:
\documentclass[12pt, a4paper]{article}
\usepackage{german,epsfig,longtable,graphicx,fullpage,float}%
\usepackage[ansinew]{inputenc} % Umlaute (Windows)
\usepackage{enumitem}
\def\threedigits#1{%
\ifnum#1<100 0\fi
\ifnum#1<10 0\fi
\number#1}
\begin{document}
\begin{enumerate}[label=\textbf{RQ/Gru/\threedigits{\theenumi}}, leftmargin = *]
\item \label{anfo:norm:S1}
\item \label{anfo:norm:S2}
\item \label{anfo:norm:S3}
\item \label{anfo:norm:S4}
\end{enumerate}
\end{document}
This minimal example produces the Error.
Error Messages are:
Missing number, threated as zero
Missing = inserted for \ifnum
Best Answer
You miss the
\protect
command before using the\threedigits
one.