Moved and edited contents of Underlining_With_TextBackgrounds
{{todo|Add more examples of usage of textbackgrounds.}}
Pages, paragraphs, words can have a background: color or screenframe. ConTeXt creates these using [[MetaPost]].
(See, eventually, the [[manual:details.pdf| details]] manual or the {{src|anch-bck.mkvi|source}} for further explanations.)
== Example: multi-page backgrounded text ==
Perhaps one might like to offset examples from the running text, or signal to the reader that the following paragraphs contain secondary, detailed information that is of interest only to the specialists. This can be achieved using textbackgroundstextbackground.
In contrast, [[Framed]] creates text blocks that do not span columns or pages.
In the following example, we also reduce the textwidth and bodyfont size.
Underlining is generally frowned upon by experienced TeXnicians. Occasionally,
however, it is necessary and <cmd>ul</cmd> or <cmd>underbar</cmd> doesn’t do what you want. In those
cases using <cmd>definetextbackground</cmd> for the underlining may also be tried.
<context source="yes">\stoptextdefinetextbackground[underline] [location=text,alternative=1,background=,frame=off]\definestartstop[underline] [before={\starttextbackground[underline]}, after=\stoptextbackground] An example with \startunderline underlined\stopunderline\ text.
</context>
If desired, the location of the line can also be adjusted.
<context source="yes">
\startuseMPgraphic{mpos:par:columnset} % Shift underlining down a touch