[NTG-context] Is there “toffset” option for \setupbackgrounds in context

Wolfgang Schuster schuster.wolfgang at gmail.com
Fri Feb 26 13:03:36 CET 2016


> Bou Salim <mailto:salimcollo7 at gmail.com>
> 26. Februar 2016 um 12:44
> I'm trying to learn `context`, and I'm satisfied with their capacities.
>
> I read in contextgarden 
> <http://wiki.contextgarden.net/Command/setupbackgrounds> that options 
> of `\setupbackgrounds` inherit from `\setupframed`, but if I setup 
> `toffset=5mm` for 
>  `\setupbackgrounds[text][text][frame=on,toffset=5mm]` I have no effect?
>
> With `frameoffset` you can modify the four directions but how about a 
> single direction?
The background mechanism for the text areas supports only a fraction of 
the normal framed options but you can do a lot when you use Metapost to 
draw the background.

\startuniqueMPgraphic{TextBackground}
     path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
     draw p topenlarged 5mm ;
     setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic

\defineoverlay[TextBackground][\uniqueMPgraphic{TextBackground}]

\setuppapersize[A4]
\setuppagenumbering[state=none]

\setupbackgrounds[text][text][background=TextBackground]

\starttext

\input knuth

\stoptext

BTW: It’s rude to crosspost without mentioning this 
(http://tex.stackexchange.com/questions/296037/is-there-toffset-option-for-setupbackgrounds-in-context)

Wolfgang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20160226/4109c209/attachment.html>


More information about the ntg-context mailing list