From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92354 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: Text around a figure in a framedtext Date: Thu, 13 Aug 2015 21:38:07 -0400 Message-ID: <55CD467F.6070200@rik.users.panix.com> References: <310F8718-4C0E-4485-A8C1-CA7A33A6AF29@me.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0427823177==" X-Trace: ger.gmane.org 1439516359 1997 80.91.229.3 (14 Aug 2015 01:39:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Aug 2015 01:39:19 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 14 03:39:05 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZQ3xY-0005QW-7y for gctc-ntg-context-518@m.gmane.org; Fri, 14 Aug 2015 03:39:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3F9741022B for ; Fri, 14 Aug 2015 03:39:03 +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 gI0GHa1jKfaN for ; Fri, 14 Aug 2015 03:39:02 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 2220D10235 for ; Fri, 14 Aug 2015 03:38:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 12D38101F7 for ; Fri, 14 Aug 2015 03:38:21 +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 xTR4Zlcmj_xL for ; Fri, 14 Aug 2015 03:38:19 +0200 (CEST) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 57002101E6 for ; Fri, 14 Aug 2015 03:38:19 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter3-utr.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t7E1cFBG031190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Aug 2015 03:38:17 +0200 Original-Received: from [192.168.201.10] (cpe-74-76-74-238.nycap.res.rr.com [74.76.74.238]) by mailbackend.panix.com (Postfix) with ESMTPSA id EE36A1883B for ; Thu, 13 Aug 2015 21:38:12 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=166.84.1.89; country=US; region=New York; city=New York; latitude=40.7553; longitude=-73.9924; http://maps.google.com/maps?q=40.7553,-73.9924&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08P4pCgs5 - 498f54114a86 - 20150814 (trained as not-spam) Received-SPF: pass (filter3-utr.mf.surf.net: domain of context@rik.users.panix.com designates 166.84.1.89 as permitted sender) receiver=filter3-utr.mf.surf.net; client-ip=166.84.1.89; envelope-from=; helo=mailbackend.panix.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:92354 Archived-At: This is a multi-part message in MIME format. --===============0427823177== Content-Type: multipart/alternative; boundary="------------040508080203000406000007" This is a multi-part message in MIME format. --------------040508080203000406000007 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-08-13 11:19, Fabrice Couvreur wrote: > Hi, > Sorry to revive this discussion (which I initiated), but the text in=20 > the following code does not wrapped around the figure. > Why ? > Fabrice > > > \setupcolors > [state=3Dstart] > > \definecolor[MyColorB][c=3D0.00, m=3D0.62, y=3D1.00, k=3D0.00] > \definecolor[MyColorA][.75(MyColorB,white)] > > \defineframedtext > [MyText] > [frame=3Doff, > background=3DMyFrame, > width=3D\textwidth, > height=3Dfit, > location=3Dleft, > style=3Ditalic] > > \defineoverlay > [MyFrame] > [\useMPgraphic{MyFrame}] > > \definelabel > [D=C3=A9finition] > [headstyle=3D\bf\smallcaps] > > \startuseMPgraphic{MyFrame} > path b ; > picture p ; > p :=3D textext.rt("\white\D=C3=A9finition") ; > p :=3D p shifted (2BodyFontSize,OverlayHeight-ypart center=20 > p+.25ExHeight) ; > b :=3D boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth= ; > fill OverlayBox withcolor \MPcolor{MyColorA} ; > fill b withcolor \MPcolor{MyColorB} ; > draw p ; > \stopuseMPgraphic > > \starttext > > \startMyText > > \starthanging[location=3Dright] > {\startMPcode > path p ; > p :=3D fullcircle xscaled 4cm yscaled 2cm ; > fill p withcolor cmyk(0,0.62,1,0) ; > path q ; q :=3D fullcircle scaled 1cm shifted (1cm, ypart=20 > center p) ; > fill q withcolor blue ; > picture r ; > r :=3D textext("\white E")shifted (-0.75cm,ypart center p) ; > picture s ; > s :=3D textext("\white A")shifted (1cm, ypart center p) ; > draw r ; > draw s ; > draw p ; > draw q ; > \stopMPcode} > Soit A une partie d'un ensemble E. > > Si $n_E$ et $n_A$ sont respectivement les nombres d'=C3=A9l=C3=A9ments = de E et=20 > de A, la {\bi proportion} des =C3=A9l=C3=A9ments de A dans E est le quo= tient=20 > $p=3D\frac{n_A}{n_E}$. > \stophanging > > \stopMyText > > Wolfgang wrote on the list a few days ago=20 (http://www.mail-archive.com/ntg-context%40ntg.nl/msg79347.html): The \starthangaround environment reserves space for the image etc. onlyfor the first paragraph while \placefigure includes more paragraphs if necessary. --=20 Rik --------------040508080203000406000007 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On 2015-08-13 11:19, Fabrice Couvreur wrote:
= Hi,
Sorry to reviv= e this discussion (which I initiated), but the text in the following code does not wrapped around the figure.
Why ?
Fabrice


\setupcolors
=C2=A0 [state=3Dstart]

\definecolor[MyColorB][c=3D0.00, m=3D0.62, y=3D1.00, k=3D0.= 00]
\definecolor[MyColorA][.75(MyColorB,white)]=C2=A0

\defineframedtext
=C2=A0 [MyText]
=C2=A0 [frame=3Doff,
=C2=A0=C2=A0 background=3DMyFrame,
=C2=A0=C2=A0 width=3D\textwidth,
=C2=A0=C2=A0 height=3Dfit,
=C2=A0=C2=A0 location=3Dleft,
=C2=A0=C2=A0 style=3Ditalic]

\defineoverlay
=C2=A0 [MyFrame]
=C2=A0 [\useMPgraphic{MyFrame}]

\definelabel
=C2=A0 [D=C3=A9finition]
=C2=A0 [headstyle=3D\bf\smallcaps]

\startuseMPgraphic{MyFrame}
=C2=A0=C2=A0=C2=A0 path b ;
=C2=A0=C2=A0=C2=A0 picture p ;
=C2=A0=C2=A0=C2=A0 p :=3D textext.rt("\white\D=C3=A9finitio= n") ;
=C2=A0=C2=A0=C2=A0 p :=3D p shifted (2BodyFontSize,OverlayH= eight-ypart center p+.25ExHeight) ;
=C2=A0=C2=A0=C2=A0 b :=3D boundingbox p leftenlarged .5EmWi= dth rightenlarged .5EmWidth ;
=C2=A0=C2=A0=C2=A0 fill OverlayBox withcolor \MPcolor{MyCol= orA} ;
=C2=A0=C2=A0=C2=A0 fill b withcolor \MPcolor{MyColorB} ; =C2=A0=C2=A0=C2=A0 draw p ;
\stopuseMPgraphic

\starttext

\startMyText

\starthanging[location=3Dright]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {\startMPcode =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 path= p ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 p :=3D= fullcircle xscaled 4cm yscaled 2cm ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fill= p withcolor=C2=A0 cmyk(0,0.62,1,0) ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 path= q ; q :=3D fullcircle scaled 1cm shifted (1cm, ypart center p) ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fill= q withcolor blue ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pict= ure r ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r :=3D= textext("\white E")shifted (-0.75cm,ypart center p) ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pict= ure s ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 s :=3D= textext("\white A")shifted (1cm, ypart center p) ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 draw= r ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 draw= s ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 draw= p ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 draw= q ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \stopMPcod= e}
Soit A une partie d'un ensemble E.

Si $n_E$ et $n_A$ sont respectivement les nombres d'=C3=A9l=C3=A9ments de E et de A, la {\bi proportion} des = =C3=A9l=C3=A9ments de A dans E est le quotient $p=3D\frac{n_A}{n_E}$.
\stophanging

\stopMyText

=

Wolfgang wrote on the list a few days ago (http://www.mail-archive.com/ntg-co= ntext%40ntg.nl/msg79347.html):

The \starthangaround environment reserves space for the image etc. only=C2=A0for the first paragraph
while \placefigure includes more paragraphs if nece=
ssary.
--
Rik
--------------040508080203000406000007-- --===============0427823177== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0427823177==--