6

I need to highlight some text in ConTeXt to get something like this:

highlighted text

Concerning background colors, all I've found in the manual is some example with \framed command, which is inappropriate to me because it breaks the layout.

1

1 Answer 1

5

You can use the command \defineunderbar. See example:

\setuplayout
  [width=9.4cm]

\definebar
  [foobar]
  [color=yellow,
   rulethickness=1.2em,
   offset=1.2,
   continue=yes,
   order=background]

\starttext
There must be \foobar{a way to set the background color when I need to
highlight multiple lines of text. And then return to normal mode} without
affecting the layout.
\stoptext

screenshot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .