From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92356 Path: news.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Text around a figure in a framedtext Date: Fri, 14 Aug 2015 09:49:04 +0200 Message-ID: References: <310F8718-4C0E-4485-A8C1-CA7A33A6AF29@me.com> <55CD467F.6070200@rik.users.panix.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1293061705==" X-Trace: ger.gmane.org 1439538604 25898 80.91.229.3 (14 Aug 2015 07:50:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Aug 2015 07:50:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 14 09:49:51 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 1ZQ9kL-0005CF-MY for gctc-ntg-context-518@m.gmane.org; Fri, 14 Aug 2015 09:49:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C90441022B for ; Fri, 14 Aug 2015 09:49:48 +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 jv8L-FD21Zb6 for ; Fri, 14 Aug 2015 09:49:47 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 33CE310234 for ; Fri, 14 Aug 2015 09:49:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D197F101FB for ; Fri, 14 Aug 2015 09:49:13 +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 OhNYwQt4zIZz for ; Fri, 14 Aug 2015 09:49:12 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 799CB101E6 for ; Fri, 14 Aug 2015 09:49:07 +0200 (CEST) Original-Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) by filter4-til.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t7E7n5BO023440 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 14 Aug 2015 09:49:06 +0200 Original-Received: by iodv127 with SMTP id v127so61191443iod.3 for ; Fri, 14 Aug 2015 00:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=v9hYKb4Z+MxrImlydcOTGHn6RtkS7VbYe4K6fzz+WF4=; b=RP0/G0nvE7vreGU84eZmI+W2UIjbzKyB0SPaCmapfuK6jOtCi+YalAwPpB3DlHHrrH U+c/M0GF2bEr3Uz4AjYZfRmF3j5XDTT8StUg9U6WVo0tgAWvX4BBcB2+UAmecNRSiP1b 72KVxrH+kocw4svVOlomrJNTjdVPZcXSemPhYwRZ5UQpB2lak4Kmvht7mDFnNwYJDdcf MRrBBZqaoG+Eecely8JWUYlOt+UAjEJB1GfkGKJjHBV5jOckbe5osPvC6u192p9Blvot IA7w730csdfdQSZ+Spwg+EtricQktqdq76ZJgjILsGqHV6WEVCDmSlGiMcU+ywzMnj+M 3/sQ== X-Received: by 10.107.6.230 with SMTP id f99mr2018260ioi.61.1439538544616; Fri, 14 Aug 2015 00:49:04 -0700 (PDT) Original-Received: by 10.64.236.2 with HTTP; Fri, 14 Aug 2015 00:49:04 -0700 (PDT) In-Reply-To: <55CD467F.6070200@rik.users.panix.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c06::22b; country=US; region=Iowa; city=Council Bluffs; latitude=41.2619; longitude=-95.8608; http://maps.google.com/maps?q=41.2619,-95.8608&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VP4vN6nV - 1e5f387aa836 - 20150814 (trained as not-spam) Received-SPF: pass (filter4-til.mf.surf.net: domain of fabrice1.couvreur@gmail.com designates 2607:f8b0:4001:c06::22b as permitted sender) receiver=filter4-til.mf.surf.net; client-ip=2607:f8b0:4001:c06::22b; envelope-from=; helo=mail-io0-x22b.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) 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:92356 Archived-At: --===============1293061705== Content-Type: multipart/alternative; boundary=001a113ed85297cf77051d40afb9 --001a113ed85297cf77051d40afb9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Rik, I actually read that Wolfgang had written, but there is some confusion for me. Indeed, my environment uses a frame and Wolfgang said to be used \ starthanging ... \stophanging rather than \placefigure. But my text contain= s a blank line which is to create a new paragraph and so I should use \ placefigure !!! 2015-08-14 3:38 GMT+02:00 Rik Kabel : > On 2015-08-13 11:19, Fabrice Couvreur wrote: > > Hi, > Sorry to revive this discussion (which I initiated), but the text in 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 > 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 cente= r > 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 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-context%40ntg.nl/msg79347.html): > > The \starthangaround environment reserves space for the image etc. only f= or > the first paragraph > > while \placefigure includes more paragraphs if necessary. > > -- > Rik > > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ > --001a113ed85297cf77051d40afb9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Rik,
I actually read that Wolfgang had written, but there is some conf= usion for me. Indeed<= /span>, my environment uses a frame and Wolfgang said to be used \starthanging ... \stophanging ra= ther than \placefigur= e. But my text contains a blank line whic= h is to create a new = paragraph and so I should use \placefigure !!!

2015-08-14 3:38 GMT+02:00 Rik Kabel <cont= ext@rik.users.panix.com>:
=20 =20 =20
On 2015-08-13 11:19, Fabrice Couvreur wrote:
Hi,
Sorry to revive 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=A9fini= tion") ;
=C2=A0=C2=A0=C2=A0 p :=3D p shifted (2BodyFontSize,OverlayHei= ght-ypart center p+.25ExHeight) ;
=C2=A0=C2=A0=C2=A0 b :=3D boundingbox p leftenlarged .5EmWidt= h rightenlarged .5EmWidth ;
=C2=A0=C2=A0=C2=A0 fill OverlayBox withcolor \MPcolor{MyColor= A} ;
=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 pictur= e 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 pictur= e 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 \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 de A, la {\bi proportion} de= s =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-context%40ntg.nl/msg79347.html<= /a>):

The \starthangaround environment reserves space for the image etc. only=C2=A0for the first paragraph
whi=
le \placefigure includes more paragraphs if necessary.
--
Rik

_______________________________________________________________________= ____________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist :
ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________

--001a113ed85297cf77051d40afb9-- --===============1293061705== 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= --===============1293061705==--