# Allow line breaks in highlighted text [duplicate]

When I highlight a bit of text using \colorbox, it prevents line breaking. How does one give tex permission to break lines?

Example:

\documentclass{article}
\usepackage{color}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
\colorbox{yellow}{Stop playing with latex and start writing your article!}
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
\end{document}


I'm sure the gut reaction will be to tell me to use such-and-such other method which already permits line-breaking. By all means! But resist the urge to do so while not answering my question :)

## marked as duplicate by Fran, Peter Jansson, Werner, Ludovic C., diabonasNov 7 '13 at 18:44

• \colorbox works like \mbox and prevents breaking that is really deep in its nature and not really changeable, soul or ulem packages define highlighting possibilities – David Carlisle Nov 7 '13 at 16:35