Hello everybody.
Is there any way to insert a linebreak within the label of an item of the description enviroment?
Thanks, for you support.
Text Formatting ⇒ linebreak in a label of a description item
-
- Posts: 11
- Joined: Thu Sep 03, 2009 11:02 am
NEW: TikZ book now 40% off at Amazon.com for a short time.

linebreak in a label of a description item
Hi,
one possible quick solution is to use a \parbox command:
one possible quick solution is to use a \parbox command:
Code: Select all
Code, edit and compile here:
\documentclass{article}\begin{document}\begin{description}\item[{\parbox[t]{3cm}{first line\\second line}}] first item\end{description}\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: linebreak in a label of a description item
Hi there,
As far as I know, the description option is a paragraph environment. I normally break the lines by just adding second carriage return, or by adding \\ or by adding \newline.
Cheers
As far as I know, the description option is a paragraph environment. I normally break the lines by just adding second carriage return, or by adding \\ or by adding \newline.
Cheers
linebreak in a label of a description item
Hi fatra2,fatra2 wrote:Hi there,
As far as I know, the description option is a paragraph environment. I normally break the lines by just adding second carriage return, or by adding \\ or by adding \newline.
Cheers
please notice that the original request is for a line break inside the label; in this case, your suggestions won't apply:
Code: Select all
Code, edit and compile here:
\documentclass{book}\begin{document}\begin{description}% won't work\item[first line\\second line]% won't work\item[first line\newline second line]% will work\item[{\parbox[t]{3cm}{first line\\second line}}]\end{description}\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
-
- Posts: 11
- Joined: Thu Sep 03, 2009 11:02 am
Re: linebreak in a label of a description item
Thanks a lot!