From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77970 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Struggling with ConTeXt Date: Wed, 22 Aug 2012 00:54:44 -0400 (EDT) Message-ID: References: <501A9CCB.1010400@wanadoo.fr> <5032B9D5.6080003@wanadoo.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345611309 25233 80.91.229.3 (22 Aug 2012 04:55:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2012 04:55:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 22 06:55:05 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T42y8-0005Lj-Qk for gctc-ntg-context-518@m.gmane.org; Wed, 22 Aug 2012 06:55:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E705A101E0; Wed, 22 Aug 2012 06:55:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id O9ThHCMdQM0D; Wed, 22 Aug 2012 06:54:57 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 60AE8101E8; Wed, 22 Aug 2012 06:54:57 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DA954101E8 for ; Wed, 22 Aug 2012 06:54:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cUbb4mHHiZEl for ; Wed, 22 Aug 2012 06:54:51 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 93C9D101E0 for ; Wed, 22 Aug 2012 06:54:51 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q7M4smZd004824 for ; Wed, 22 Aug 2012 06:54:50 +0200 Original-Received: FROM adi-netbook (bas2-clarkson16-1088923828.dsl.bell.ca [64.231.168.180]) By hellskitchen.mr.itd.umich.edu ID 50346616.DFEEB.26629 ; Authuser adityam; 22 Aug 2012 00:54:47 EDT In-Reply-To: <5032B9D5.6080003@wanadoo.fr> User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.82; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07HNESMig - d0af496966b5 - 20120822 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77970 Archived-At: 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 ___________________________________________________________________________________