0

How can I make a multi-line description label with the description following the label instead of under the label, on a new line?

I currently use:

\usepackage{enumitem}
:
\setlist[description]{leftmargin=0em}
:
\begin{description}
  \item [{\parbox[t]{1\linewidth}{Optimization of molecular methods and
  statistical procedures for forensic fingerprinting of microbial
  soil communities}}]
  description of this item
\end{description}

Which gives me multiline but (of course) the text comes on a new line underneath the label.

Desired result is:

Optimization of molecular methods and statistical procedures for forensic fingerprinting of microbial soil communities description of this item

3
  • 1
    Welcome to TeX SX! Would you mind posting a fully compilable, albeit minimal, document?
    – Bernard
    Aug 8, 2016 at 20:03
  • Isn't it what style sameline does? Aug 8, 2016 at 20:12
  • @ChristophFrings Thanks, that does the trick!
    – John Bokma
    Aug 9, 2016 at 1:18

1 Answer 1

0

As @Christoph Frings says, this partly what style=sameline does. You are also working too hard in that you do not need to put the label into a \parbox, as the enumitem package will take care of this for you. In fact, using the \parbox forces the line break that you don't want!

With these two changes your MWE produces:

enter image description here

Here is the full code:

\documentclass{article}
\usepackage{enumitem}
\begin{document}

\setlist[description]{leftmargin=0em,style=sameline}
\begin{description}
  \item [Optimization of molecular methods and statistical procedures
  for forensic fingerprinting of microbial soil communities]
  description of this item
\end{description}
\end{document}
2
  • @JohnBokma The normal way to thank is to give a green tick:)
    – user30471
    Aug 9, 2016 at 2:12
  • done, apologies for my n00b (ab)use of stackexchange (first post). Will read up later this week to avoid such mishaps in the future.
    – John Bokma
    Aug 9, 2016 at 21:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .