0

How can I make it so that when a line gets too long it goes to the next line?

1
  • 3
    See the enumitem package. And next time please provide a full code example, makes it much clearer what you are talking about
    – daleif
    Feb 9 '20 at 14:58
3

In order to ensure that a description label can span multiple lines, you can make use of the unboxed style offered by the enumitem package:

enter image description here

\documentclass{article}
\usepackage{enumitem}

\begin{document}
\begin{description}[style=unboxed]
\item[description] here is the description of the label
\item[this is a very long description label this is a very long description label ] here is the description of the label here is the description of the label here is the description of the label
\end{description}
\end{document}
3
  • Would it be possible to tweak this so that it doesn't indent? To be clear, it gives me right now imgur.com/a/aoxqRuP but I'd like to not have an indent.
    – medihde
    Feb 20 '20 at 18:38
  • In your question you asked about a description, while the screenshot you show in your comment lookas like you actually used itemize. If this is the case, please post your question as a follow up question to this one and please also include a minimal example showing how you achieved this output.
    – leandriis
    Feb 20 '20 at 18:49
  • I'm using description, see code below \begin{description} [align=left,leftmargin=*,labelsep=\parindent,font=\normalfont, style = unboxed] \item[• Magret de canard (150-200g par personne)] \item[• Riz] \item[• Brocolis] \item[• Ketchup, ail, gingembre, huile d'olive, sauce soja salée, vinaigre de balsamique, orange, miel de cuisine, poivre, piment espelette, thym, laurier] \end{description}
    – medihde
    Feb 20 '20 at 22:56
0

Two solutions that might be better suited to what you actually want to achieve. Just use itemize or use paragraphs instead:

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{itemize}[label={}]
\bfseries
\item An extremely long description that is written in bold and so on which is long enough to wrap properly
\item Another item
\end{itemize}

Or you could just use paragraphs:

\paragraph{A very long item with lots of words in it and so on and then some normal text}

This text is normal
\end{document}
1
  • 1
    \paragraph is a 4th level heading, like \section it is just intended to be used after \subsubsection Feb 9 '20 at 23:44

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.