As an alternative to a KOMA class or to scrextend
, you can use the enumitem
package, setting the key labelwidth
to the width of your label.
I got this solution by combining (a) Bernard's answer to Simple chronology using the description environment and (b) Bernard's answer to How to set leftmargin of description to width of a particular label in enumitem?. You can find the same solution in Gonzalo Medina's answer to Description list with aligned descriptions.
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\begin{document}
\begin{description}[%
labelwidth=3cm,%
leftmargin=!%
]
\item [Label]Here is a long item that requires a line break. The second line of this item
won't line up with the first word. I no longer need to achieve this manually by forcing a
line break and setting an appropriate value in \textbackslash hspace*.
Here's a second paragraph of the same item.
\item [A longer label]Here is a second item. It has a longer label, necessitating a larger labelwidth.
\end{description}
\end{document}
Here's the output:

You can also calculate the width of the widest label by adding the calc
package and using its \widthof
command:
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\usepackage{calc}% Supports \widthof command
\begin{document}
\begin{description}[%
labelwidth=\widthof{\bfseries A longer label},%
leftmargin=!%
]
\item [Label]Here is a long item that requires a line break. The second line of this item
won't line up with the first word. I no longer need to achieve this manually by forcing a
line break and setting an appropriate value in \textbackslash hspace*.
Here's a second paragraph of the same item.
\item [A longer label]Here is a second item. It has a longer label, necessitating a larger labelwidth.
\end{description}
\end{document}
This gives essentially the same output. Note in \widthof{\bfseries A longer label}
, the necessity of specifying \bfseries
: The label is typeset as bold. You need to make sure that the text whose width you measure with \widthof
is also typeset as bold.
You can go a step further in automation by having the environment automatically determine which label is widest. See Gonzalo Medina's answer to Automatically set description list labelwidth
based on widest label?.
labeling
from the koma-script package might be an alternative.