1

I need to achieve similar effect like in this question: enumerate custom label

However I would rather use description list with enumerated labels. Like I would write:

\begin{description}
  \item[UR-1] blah blah
  \item[UR-2] foo bar
\end{description}

but without manual labels counting.

WojciechKo
  • 133
  • 6

2 Answers2

3

You could just define your own counter:

% arara: pdflatex    

\documentclass{article}
\newcounter{mycounter}
\newcommand*{\mycount}{\stepcounter{mycounter}\themycounter}

\begin{document}
\begin{description} 
    \item[UR-\mycount] blah blah
    \item[UR-\mycount] foo bar
    \setcounter{mycounter}{0} % if you want to use it again.
\end{description}
\end{document}

enter image description here

Of course you may add the "UR-" or anything else to the command \mycount. And you may define automatic labelling with help of the package enumitem. Bit it is not clear from your question, what you are achieving to do and why you want to have it as a description.

LaRiFaRi
  • 43,807
2

You can do that quite easily with the enumitem package and an enumerate environment:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\setlength{\parindent}{0cm}

\usepackage[shortlabels]{enumitem}

\usepackage{lipsum}

\begin{document}

\lipsum[11]
\begin{enumerate}[label=UR-\arabic*., font=\bfseries, wide= 0pt, leftmargin=2em]
\item Some text, some text, , some text, some text, , some text, some text, some text, some text, some text.
\item Some more text, some more text, some more text, some more text, some more text, some more text, some more text, some more text, some more text, some more text.
\end{enumerate}

\end{document} 

enter image description here

Bernard
  • 271,350