Say I want the description
environment in
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some text\\
some more
\begin{center}
center
\end{center}
\begin{description}
\item[desc1] text1
\item[desc2] text2 text2
\item[desc3] text3 text3 text3
\end{description}
other text
\end{document}
do be horizontally centered, as a whole, i.e. the longest item should be horizontally centered in the page. Clearly, if one of the entries is longer than \textwidth
, then it would be back the original position.
Enclosing it in the center
environment doesn't seem to work.
I thought \hfill
would come handy, but I haven't managed to write a solution using it.
I guess another strategy could consist in computing the width of the environment being typeset, and using that as the width of an enclosing minipage
, or something.
I see here using tabular
as an alternative is proposed, but I was looking for a cleaner solution.
description
generate full lines... thinking about it.