ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re:  Is there “toffset” option for \setupbackgrounds in context
Date: Fri, 26 Feb 2016 13:03:36 +0100	[thread overview]
Message-ID: <56D03F18.2000704@gmail.com> (raw)
In-Reply-To: <CAA9mf=cFvTtT0sTPRduChj9wqACS1sMWJyRxYWdmg_X9CytZjQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1309 bytes --]

> Bou Salim <mailto:salimcollo7@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

[-- Attachment #1.2: Type: text/html, Size: 2650 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2016-02-26 12:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 11:44 Bou Salim
2016-02-26 12:03 ` Wolfgang Schuster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D03F18.2000704@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).