How to make multiline item label ?
Example
\documentclass[a4paper,10pt]{article}
\usepackage{lipsum}
\begin{document}
\begin{itemize}
\item[Great Item] \lipsum[1]
\end{itemize}
\end{document}
I would love to do
\item[Great \newline Item] \lipsum[1]
But I does not work.
Expected result – first lines of litem label and item content aligned:
Great Lorem ipsum dolor sit amet,
Item consectetuer adipiscing elit.
Ut purus elit, ver...
To be more specific I use mydesc
environment provided at https://tex.stackexchange.com/a/23569/7128 .
I would love to make it work together.
Above example is overslimplified.
Here is more detailed :
\documentclass[a4paper,10pt]{article}
\usepackage{lipsum}
% mydesc thanks for https://tex.stackexchange.com/a/23569/7128
\newenvironment{mydesc}[1]
{\list{}{\renewcommand\makelabel[1]{\it##1\hfil}%
\settowidth\labelwidth{\makelabel{\it#1}}%
\setlength\leftmargin{\dimexpr\labelwidth+\labelsep\relax}}}
{\endlist}
\begin{document}
\begin{mydesc}{LongestItem}
\item[Great Item] \lipsum[1]
\end{mydesc}
\end{document}
Best Answer
LaTeX offers a command
\shortstack
for this kind of thing, so your solution could look like this:Unfortunately,
\shortstack
is bottom-aligned by default, so we have to hack a "top" variant:The code for
\tshortstack
was just copied from the respective code in the LaTeX sources. If you don't want to copy so much code, you can also use\patchcmd
: