Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing style of latex description lists

Tags:

latex

This should be an easy question for someone out there. I have a description list

\begin{description}
\item[Name:]  Halpo
\item[Email Address:] [email protected]
\item[Address:]  1234 Ivy Ln \\ Springfield, USA
\end{description}

It comes back as

Name: Halpo

Email Address: [email protected]

Address: 1234 Ivy Ln

 Springfield, USA

This is for an official document that has style requirements. The First thing is how do I turn off the bold? second how do I have all the text line up with the item labels and still be left justified?

like image 420
Andrew Redd Avatar asked Apr 29 '10 20:04

Andrew Redd


4 Answers

If you \usepackage{enumitem} you may get what you like:

\begin{description}[style=multiline,leftmargin=3cm,font=\normalfont]
\item[Name:]  Halpo
\item[Email Address:] [email protected]
\item[Address:]  1234 Ivy Ln \\ Springfield, USA
\end{description}

Results in:

Results

Check here for full package documentation.

like image 194
Geoff Avatar answered Nov 19 '22 02:11

Geoff


The formatting of description labels is controlled by the command \descriptionlabel. Here's an example of changing to italics, no bold:

\renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textit{#1}}

To change the formatting of the label to something else, change the \textit{#1} part above.

EDIT 2017-01-24: My original example used \emph, but as @ebo pointed out, it is better to use \textit for this situation because this is a case of changing the text style, not emphasizing text.

like image 23
mhucka Avatar answered Nov 19 '22 03:11

mhucka


Geoff - you can set these parameters for all lists (so that it's automatic) using this code:

\setlist[description]{style=multiline,leftmargin=3cm}

Apologies, I don't have enough rep to reply to your comment, hence the separate answer.

like image 7
ewels Avatar answered Nov 19 '22 04:11

ewels


For a hack, do \item[\rm Name:].

like image 2
lhf Avatar answered Nov 19 '22 04:11

lhf