Text Formatting ⇒ linebreak in a label of a description item
-
silentboom
- Posts: 11
- Joined: Thu Sep 03, 2009 11:02 am
linebreak in a label of a description item
Is there any way to insert a linebreak within the label of an item of the description enviroment?
Thanks, for you support.
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
linebreak in a label of a description item
one possible quick solution is to use a \parbox command:
Code: Select all
\documentclass{article}
\begin{document}
\begin{description}
\item[{\parbox[t]{3cm}{first line\\second line}}] first item
\end{description}
\end{document}Re: linebreak in a label of a description item
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
\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}-
silentboom
- Posts: 11
- Joined: Thu Sep 03, 2009 11:02 am