From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Struggling with ConTeXt
Date: Wed, 22 Aug 2012 00:54:44 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.02.1208220047240.13214@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <5032B9D5.6080003@wanadoo.fr>
On Tue, 21 Aug 2012, Olivier Binda wrote:
> 3) I'm flowing text around mathematical text with graphic ornaments (overlay)
> but the bounding box from metapost (red) and from TeX (black) on the
> following minimal example aren't the same which produce all kinds of "flowing
> text" issues.
> is there a way/an option for framedtexts with overlay to get the max
> width/height size of the main content + overlays ?
Can you create a minimal example showing what you are trying to do? The
following example is a bit confusing (where is \MPstring{Content} set? Why
use framedtext instead of framed? What is \framed[fit] supposed to do?
etc).
> \startusableMPgraphic{myFrame}
> numeric o, l, m ; path a, b ; pair c ;
> picture d; d = textext.rt(\MPstring{Content}) ;
> draw (unitsquare xyscaled (OverlayWidth,OverlayHeight) shifted
> (-OverlayWidth/2,-OverlayHeight/2)) withpen pencircle scaled 1pt withcolor
> green;
You could also use
draw OverlayBox withpen ...
> draw (d enlarged 2cm) withcolor red withpen pencircle scaled 2pt;
> draw boundingbox currentpicture withpen pencircle scaled .1mm dashed
> evenly withcolor blue ;
> \stopusableMPgraphic
>
> \defineoverlay[myOverlay][\useMPgraphic{myFrame}]
> \defineframedtext[myStatement][frame=off]
> \setupframedtexts[myStatement][backgroundcolor=lightgray,background=myOverlay,width=\textwidth,autowidth=force]
> \starttext
> \framed[fit]{\startmyStatement
> TEST
> \stopmyStatement}
> \stoptext
You can try \framed[strut=no]{...} and add
\setupframedtext[...][offset=overlay]. See
http://wiki.contextgarden.net/Command/setupframed for details.
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2012-08-22 4:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 15:29 Olivier Binda
2012-08-02 15:43 ` Aditya Mahajan
2012-08-02 15:47 ` Aditya Mahajan
2012-08-03 6:35 ` Olivier Binda
2012-08-03 10:10 ` Hans Hagen
2012-08-03 14:50 ` Sietse Brouwer
2012-08-03 16:14 ` Hans Hagen
2012-08-05 9:35 ` Thomas A. Schmitz
2012-08-20 22:27 ` Olivier Binda
2012-08-22 4:54 ` Aditya Mahajan [this message]
2012-08-22 8:21 ` Olivier Binda
2012-08-22 8:42 ` Aditya Mahajan
2012-08-22 10:31 ` Olivier Binda
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=alpine.LNX.2.02.1208220047240.13214@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--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).