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.) == What if textbackground doesn't work? ==The textbackground commands require [[write18]] to be enabled; see that page for more information.
== Example: multi-page backgrounded text ==
In the following example, we also reduce the textwidth and bodyfont size.
An example with \stoptextstartunderline underlined\stopunderline\ text.
</context>
== Example: dashed underbar (by WSIf desired, 4/2011) ==the location of the line can also be adjusted.
<context source="yes">
\runMPgraphicsfalse startuseMPgraphic{mpos:par:columnset} % This is needed because the wiki runs MkII and write18 is not enabled.Shift underlining down a touch \iftracepositions show_multi_pars \else draw_multi_pars \fi ; path p ; p := boundingbox currentpicture ; currentpicture := currentpicture shifted (0,-StrutDepth/3) ; setbounds currentpicture to p ;\stopuseMPgraphic\definetextbackground[underline] [location=text,alternative=1,background=,frame=off]\setuppapersizedefinestartstop[B5underline] [before={\setupbodyfontstarttextbackground[10ptunderline]}, after=\stoptextbackground]An example with \startunderline underlined\stopunderline\ text.</context>