2

I managed to change the labels in enumerate, but when I use a \label and \ref it keeps giving me brackets like ()REQ-2.0-C. How do I get rid of the brackets?

%begin requirement listing definition

\renewcommand{\labelenumi}{\bfseries{\arabic{enumi}}}
\renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}}
\renewcommand{\labelenumiii}{REQ-\arabic{enumi}.\arabic{enumii}-\Alph{enumiii}}

\renewcommand{\theenumi}{}
\renewcommand{\theenumii}{}
\renewcommand{\theenumiii}{REQ-\arabic{enumi}.\arabic{enumii}-\Alph{enumiii}}

\makeatletter

\let\@noitemerr\relax
\show\@currentlabel

\makeatother

%end requirement listing definition
  • 1
    Please make your example compilable (MWE). That includes the documentclass and the document environment. – TeXnician May 7 '17 at 11:22
  • 1
    Is the label empty like ()REQ-2.0-C or is it like (REQ-2.0-C)? – Moriambar May 7 '17 at 11:35
  • 1
    I suggest you use the enumitem package: it defines keys label=(formatting commands) and ref=(own formatting commands). – Bernard May 7 '17 at 12:01
  • Please have a look here: tex.stackexchange.com/questions/118445 – clemens May 7 '17 at 12:50
  • \labelenumi is used to format \item. \p@enumi is used to format \label (actually, \@currentlabel). – John Kormylo May 7 '17 at 18:13

Browse other questions tagged or ask your own question.