[Tex/LaTex] Line break and hyphenation for underlined text

hyphenationulemunderline

I am struggling with a problem that occurs using \underline. From other posts I heard that there is no possiblity for linebreaks using this command. However, I tried using the ulem package. In fact, line breaks are possible but hyphenation is not. So, I face another problem. I have a continuous text with some underlined parts of a sentence which need line breaks as well as hyphenation.

How am I supposed to solve this?

My code:

\usepackage[normalem]{ulem}
\begin{document}
\begin{itemize}[leftmargin=*]
\item There is an item:
    \begin{itemize}

        %using \underline
        \item[] Lorem ipsum dolor sit amet, consetetur sadipscing
                elitr, sed diam nonumy eirmod
                 \underline{thereIsAReallyLongWord in a senctence} 
                aliquyam erat, sed diam voluptua.


        %using \uline
        \item[] Lorem ipsum dolor sit amet, consetetur sadipscing
                elitr, sed diam nonumy eirmod
                \uline{thereIsAReallyLongWord in a senctence} 
                aliquyam erat, sed diam voluptua.
    \end{itemize}
 \end{itemize}
 \end{document}

enter image description here

Best Answer

It works with soul, but, please, don't use underlining.

\documentclass{article}
\usepackage{soul}

\begin{document}

\begin{itemize}
\item There is an item:
    \begin{itemize}
    \item Lorem ipsum dolor sit amet, consetetur sadipscing
%          elitr, sed diam nonumy eirmod
          \ul{thereIsAReallyLongWord in a sentence}
          aliquyam erat, sed diam voluptua.
    \end{itemize}
\end{itemize}

\end{document}

enter image description here

Related Question