3

I want to make a list similar to the following in HTML, but in LaTeX:

<dl><dt>Foo</dt>
<dd>Bar</dd>
<dd>Baz</dd>
<dt>Things I do</dt>
<dd>Can Haz</dd>
<dd>Like trains</dd></dl>

which I would like to have look like http://jsbin.com/xutokeraka/edit?html,css,output.

What is the easiest way to generate something like that without having to define it all on my own? Or should I just define my own list style with itemize?

  • 2
    It is called description, see the enumitem package for options as to configure it. – daleif Aug 23 '18 at 11:33
3

Like this?

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enumitem}

\begin{document}
\begin{description}[style=unboxed, labelwidth=\linewidth, font =\sffamily\itshape\bfseries, listparindent =0pt, before =\sffamily]
\item[Foo]

Bar 

Baz

  \item[Things I do]
        Can Haz

        Like Trains
\end{description}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.