colorbox won't break across lines

3,281 views
Skip to first unread message

Jan Snajder

unread,
Sep 4, 2010, 1:34:19 PM9/4/10
to LaTeX Users Group
Hi everyone,

I'd like to highlight a region of text (by setting a background color)
that spans across multiple lines. I've tried \colorbox, but it won't
break across lines.

This is reminiscent of
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=underline
which, however, can be solved using the ulem package.

Any suggestions?

Jan

Jan Snajder

unread,
Sep 5, 2010, 6:21:15 AM9/5/10
to LaTeX Users Group

I've just stumbled across this:
http://ctan.org/tex-archive/macros/latex/contrib/soul/

So, to answer my own question, for text highlighting one should use
the soul package.

Jan

On 4 ruj, 19:34, Jan Snajder <jan.snaj...@gmail.com> wrote:
> Hi everyone,
>
> I'd like to highlight a region of text (by setting a background color)
> that spans across multiple lines. I've tried \colorbox, but it won't
> break across lines.
>
> This is reminiscent ofhttp://www.tex.ac.uk/cgi-bin/texfaq2html?label=underline
Reply all
Reply to author
Forward
0 new messages