[Tex/LaTex] Is it possible to have italic and bold text, and linebreaks under the \underline{text} command

bolditalicline-breakingunderline

I was trying to emphasize text with \textbf, \textit and \underline commands. But the text will not automatically wrap to the next line. I also tried the ulem package, and it did not work too.
Does anybody know how to have italic, bold, underline and linebreaks for some text?

Best Answer

Do the following self explanatory combinations work for you? (Leaving aside aesthetic issues.)

\documentclass{article}

\usepackage{ulem}

\begin{document}

I think computer \uline{viruses should count as life. I think it says
something about human nature} that the only form of life we have
created so far is purely destructive. We've created life in our own
image. 

I think computer \uline{viruses should \textit{count as life. I think
    it} says something about human nature} that the only form of life
we have created so far is purely destructive. We've created life in
our own image.

I think computer \uline{\textit{viruses should count as life. I think
    it} says something about human nature} that the only form of life
we have created so far is purely destructive. We've created life in
our own image.

I think computer \uline{\textit{viruses should count \textbf{as
      life. I think} it} says something \textbf{about human} nature}
that the only form of life we have created so far is purely
destructive. We've created life in our own image.


\textit{\textbf{\uline{I think computer viruses should count as
      life. I think it says something about human nature that the only
      form of life we have created so far is purely destructive. We've
      created life in our own image.}}}


\end{document}
\documentclass{article}

\usepackage{ulem}

enter image description here


Tips

Always make \uline the last one to be applied when you need multiple effects on a complete paragraph. It behaves badly (no line wraps) when other font commands are applied after it.

Related Question