[NTG-context] Text around a figure in a framedtext

Fabrice Couvreur fabrice1.couvreur at gmail.com
Fri Aug 14 09:49:04 CEST 2015


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 contains
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 <context at rik.users.panix.com>:

> 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=start]
>
> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> \definecolor[MyColorA][.75(MyColorB,white)]
>
> \defineframedtext
>   [MyText]
>   [frame=off,
>    background=MyFrame,
>    width=\textwidth,
>    height=fit,
>    location=left,
>    style=italic]
>
> \defineoverlay
>   [MyFrame]
>   [\useMPgraphic{MyFrame}]
>
> \definelabel
>   [Définition]
>   [headstyle=\bf\smallcaps]
>
> \startuseMPgraphic{MyFrame}
>     path b ;
>     picture p ;
>     p := textext.rt("\white\Définition") ;
>     p := p shifted (2BodyFontSize,OverlayHeight-ypart center
> p+.25ExHeight) ;
>     b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
>     fill OverlayBox withcolor \MPcolor{MyColorA} ;
>     fill b withcolor \MPcolor{MyColorB} ;
>     draw p ;
> \stopuseMPgraphic
>
> \starttext
>
> \startMyText
>
> \starthanging[location=right]
>         {\startMPcode
>           path p ;
>           p := fullcircle xscaled 4cm yscaled 2cm ;
>           fill p withcolor  cmyk(0,0.62,1,0) ;
>           path q ; q := fullcircle scaled 1cm shifted (1cm, ypart center
> p) ;
>           fill q withcolor blue ;
>           picture r ;
>           r := textext("\white E")shifted (-0.75cm,ypart center p) ;
>           picture s ;
>           s := 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'éléments de E et de A,
> la {\bi proportion} des éléments de A dans E est le quotient
> $p=\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>
> http://www.mail-archive.com/ntg-context%40ntg.nl/msg79347.html):
>
> The \starthangaround environment reserves space for the image etc. only for
> 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 at 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 part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150814/80af1e7f/attachment.html>


More information about the ntg-context mailing list