Code: Select all
Label is long text
lab2 blalballalaa
possible second rule
label3 hello worldCode: Select all
Label is long text
lab2 blalballalaa
possible second rule
label3 hello worldLearn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Code: Select all
\documentclass{article}
\newenvironment{mydescription}[1]
{\begin{list}{}%
{\renewcommand\makelabel[1]{##1:\hfill}%
\settowidth\labelwidth{\makelabel{#1}}%
\setlength\leftmargin{\labelwidth}
\addtolength\leftmargin{\labelsep}}}
{\end{list}}
\begin{document}
\begin{mydescription}{longest label}
\item[label1] text text text.
\item[longest label] text text text.
\item[lab2] text text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text.
\end{mydescription}
\end{document}The enumitem package should be preferred as mentioned in the CTAN entry of mdwlist.Stefan_K wrote:[…] I guess it's easier with the mdwlist package. […]
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis