From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77974 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 04:42:46 -0400 (EDT) Message-ID: References: <501A9CCB.1010400@wanadoo.fr> <5032B9D5.6080003@wanadoo.fr> <5034968E.90304@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 1345624999 25597 80.91.229.3 (22 Aug 2012 08:43:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2012 08:43:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 22 10:43:15 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 1T46Wq-0000Ex-39 for gctc-ntg-context-518@m.gmane.org; Wed, 22 Aug 2012 10:43:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 20F16101F8; Wed, 22 Aug 2012 10:43:06 +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 4zXlCqfuHzB2; Wed, 22 Aug 2012 10:43:00 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 63565101E8; Wed, 22 Aug 2012 10:43:00 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D0B02101E8 for ; Wed, 22 Aug 2012 10:42:59 +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 1bgKuCfWWiYG for ; Wed, 22 Aug 2012 10:42:53 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id E3818101E0 for ; Wed, 22 Aug 2012 10:42:53 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q7M8goQ7018780 for ; Wed, 22 Aug 2012 10:42:51 +0200 Original-Received: FROM adi-netbook (bas2-clarkson16-1088923828.dsl.bell.ca [64.231.168.180]) By tombraider.mr.itd.umich.edu ID 50349B88.2A7DD.1687 ; Authuser adityam; 22 Aug 2012 04:42:48 EDT In-Reply-To: <5034968E.90304@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.12.86; 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: 0NHNIGOdH - 612ab6f24376 - 20120822 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:77974 Archived-At: On Wed, 22 Aug 2012, Olivier Binda wrote: > Thank you for the tips. > > Here, I cleaned up the code some more (sorry to have left stuff over last > time),. > > I added some explanations to make my issue clearer > > > \startusableMPgraphic{myFrame} > draw OverlayBox withpen pencircle scaled 1pt withcolor green; > draw (currentpicture enlarged 2cm) withcolor red withpen pencircle scaled > 2pt; > \stopusableMPgraphic > > \defineoverlay[myOverlay][\useMPgraphic{myFrame}] > \defineframedtext[myStatement][frame=off] > \setupframedtexts[myStatement][background=myOverlay,offset=overlay,autowidth=force] > \starttext > \framed[strut=no]{\startmyStatement FIRST TEST\stopmyStatement} > In the first test, I would like the black box to have the dimensions of the > red box. \defineframed[myStatement][background=myOverlay, offset=overlay,width=fit] \dontleavehmode\framed[strut=no, offset=2cm]{\myStatement{FIRST TEST}} In the first test, I would like the black box to have the dimensions of the red box. > \blank[big,big,big,big,big,big,big,big,big,big] > > \placefigure[left,none]{}{\startmyStatement SECOND TEST\stopmyStatement} > In the second test, I'm going to demonstrate the issue by flowing text around > the framed text, the green color {\em and the red color} shouldn't touch the > flowing text as I want the float box to include the text box {\em and the > overlay box.} \placefigure[left,none]{}{\framed[strut=no,offset=2cm]{\myStatement{SECOND TEST}}} .... If needed, you can hide this behind macros: \def\startmyStatement {\framed[struct=no, offset=2cm]\bgroup\myStatement\bgroup} \def\stopmyStatement {\egroup\egroup} 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 ___________________________________________________________________________________