From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mf <massifr@fastwebnet.it>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: offset for background overlay
Date: Sun, 12 Apr 2020 07:53:26 +0200 [thread overview]
Message-ID: <279f48c8-76e3-d37c-ed0d-6ea8d9c1dcda@gmail.com> (raw)
In-Reply-To: <3617a03a-e849-470b-ed24-daace720e56c@fastwebnet.it>
mf schrieb am 11.04.2020 um 23:59:
> Thanks Hans and Wolfgang.
>
> @Wolfgang: your solution is clearer, but unfortunately it works only for
> this MWE. In the real case the triangle extends over 2 rows, but the
> table has more than 2 rows.
> I tried grouping the first two rows in a
> \bTABLEbody[background=triangle], but it doesn't work.
How about nested tables:
\starttext
\bTABLE[width=1cm,height=1cm]
\bTR
\bTD A \eTD
\bTD B \eTD
\bTD C \eTD
\bTD E \eTD
\eTR
\bTR
\bTD E \eTD
\bTD[nc=2,nr=2,strut=no,align={middle,lohi}] {\bTABLE
\bTR \bTD[nc=2] X \eTD \eTR
\bTR \bTD Y \eTD \bTD Z \eTD \eTR
\eTABLE} \eTD
\bTD H \eTD
\eTR
\bTR
\bTD I \eTD
\bTD L \eTD
\eTR
\bTR
\bTD M \eTD
\bTD N \eTD
\bTD O \eTD
\bTD P \eTD
\eTR
\eTABLE
\stoptext
> @both: \setupoverlay[hoffset=...,voffset=...]?
> \setupframed[backgroundhoffset=...,backgroundvoffset=...] (\bTD inherits
> from \framed)?
> Or maybe a method in MP to set the bounding box of the resulting overlay?
setbounds in combination with leftenlarged, topenlarged etc.
> \setupframed has already a backgroundoffset option, whose value can be:
>
> - a DIMENSION (an offset that is both horizontal and vertical)
>
> - a "frame": what does it mean? (I looked into pack-rul.mkiv, with no
> results)
ConTeXt uses the value from the frameoffset key for backgroundoffset.
\startuseMPgraphic{frameborder}
draw OverlayBox withcolor blue ;
\stopuseMPgraphic
\defineoverlay[frameborder][\useMPgraphic{frameborder}]
\setupheader[state=high]
\setupfooter[state=high]
\starttext
\setupframed
[width=4cm,
height=4cm,
offset=1cm]
\framed{}
\framed[frame=off,background=frameborder]{}
\framed[frameoffset=-5mm]{}
\framed[frameoffset=-5mm,frame=off,background=frameborder]{}
\framed[backgroundoffset=-5mm,frame=off,background=frameborder]{}
\framed[frameoffset=-5mm,backgroundoffset=frame,frame=off,background=frameborder]{}
\stoptext
Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2020-04-12 5:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 14:15 mf
2020-04-11 17:41 ` Hans Hagen
2020-04-11 18:11 ` Wolfgang Schuster
2020-04-11 21:59 ` mf
2020-04-12 5:53 ` Wolfgang Schuster [this message]
2020-04-13 15:21 ` mf
2020-04-13 16:14 ` Wolfgang Schuster
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=279f48c8-76e3-d37c-ed0d-6ea8d9c1dcda@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=massifr@fastwebnet.it \
--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).