[Tex/LaTex] line break in enumeration and \underline command

line-breaking

How can I break a line that is inside of an enumeration, and \underline{} command, without using \usepackage{soul} and it's \ul{} command?

\item{\textbf{\underline{Long string of text that needs to be broken.}}}

I need it to break mid way through. e.g.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\begin{enumerate}
\item{\textbf{\underline{This is a long string\\ that I want to break}}}
\end{enumerate}
\end{document}

Best Answer

\underline can’t be broken across lines, thats why soul exists … if you need a break you have to split the command manually.

\item \textbf{\underline{This is a long string} \\
      \underline{that I want to break}}

I strongly recommend not to use underlines, though!

Furthermore you may note that \item doesn’t have an argument …

Related Question