Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

description list

2 views
Skip to first unread message

Bart

unread,
Aug 6, 2008, 8:26:43 AM8/6/08
to
In a description list, I have an item like this:

\item [Address:] MyStreet 999, B-9999 MyTown

I would like to change this to something which consists of two
lines, nemaly with the street on the first line and the town on
the last line. I tried

\item [Address:] MyStreet 9999,\\B-9999 MyTown

But then the indentation of B-999 Mytown is not correct. It
should start at the same level as MyStreet.

How would I do this?

Thanks,
Bart

Ulrike Fischer

unread,
Aug 6, 2008, 8:32:21 AM8/6/08
to

\item[Address:]\begin{tabular}[t]{@{}l}My Street\\my town\end{tabular}

or by using a special list type from the KOMA-classes:

\documentclass{scrartcl}

\begin{document}

\begin{labeling}{Address:}
\item[Address:]My\\My
\end{labeling}
\end{document}

--
Ulrike Fischer

Jean-Côme Charpentier

unread,
Aug 6, 2008, 8:43:48 AM8/6/08
to
Bart a écrit :

Then depends of "Adress:"'s width? Right?

> How would I do this?

I think the simplest way is to use a minipage:

\documentclass{article}
\usepackage{calc}

\begin{document}
\begin{description}
\item [Address:]
\begin{minipage}[t]{\linewidth-\leftmargin}
MyStreet 9999,\\B-9999 MyTown
\end{minipage}
\end{description}
\end{document}

Jean-Côme Charpentier

Lars Madsen

unread,
Aug 6, 2008, 9:25:36 AM8/6/08
to

why write 'Address:' all the time? ;-)

\documentclass[a4paper]{memoir}
\usepackage{enumitem}
\begin{document}

\noindent\rule{\textwidth}{4mm} % just shows the textwidth

\begin{itemize}[leftmargin=*,label=\textbf{Address:}]
\item MyStreet 9999,\\B-9999 MyTown
\end{itemize}

\end{document}

(memoir is irrelevant in this case)

--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

Peter Flynn

unread,
Aug 6, 2008, 6:51:53 PM8/6/08
to

In writing documentation, it's always good to try and understand why
users expect certain things to happen, so it would be very useful to
know why you expected it to do that.

If I write

\begin{description}


\item[Address:] MyStreet 9999,\\B-9999 MyTown

\item[Previous Employers:] IBM\\Microsoft\\DELL
\end{description}

would you expect each item to use a different level of wrapped indentation?

It's not hard to do -- the LaTeX Companion has examples, I think -- but
the description environment was set up to use the same level of
indentation for every item.

///Peter

0 new messages