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

Fabrice Couvreur fabrice1.couvreur at gmail.com
Sat Aug 8 09:41:20 CEST 2015


Hi Otared,
A small mistake on your part : do not write \input knuth.tex but \input
knuth.
Then I want the text in the first framedtext wrapped around the figure as in
the second.
Fabrice

2015-08-08 6:18 GMT+02:00 Otared Kavian <otared at gmail.com>:

> Hi,
>
> You should use the same width if you want to obtain the same result (by
> the way, you have to say also \stopframedtext in your source file):
>
> \startframedtext[width=\textwidth]{
> \placefigure[right,none]{}{%
>  \startMPcode
>   draw unitsquare scaled 2cm ;
>   \stopMPcode}
> \input knuth.tex }
> \stopframedtext
>
> Best regards: OK
>
> > On 08 Aug 2015, at 00:49, Fabrice Couvreur <fabrice1.couvreur at gmail.com>
> wrote:
> >
> > Hi,
> > Why the text does not move in the first framedtext like the second
> framedtext ?
> > Thank you.
> > Fabrice
> >
> > \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,
> >    location=right]
> >
> > \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
> > \placefigure[right,none]{}{%
> >  \startMPcode
> >   draw unitsquare scaled 2cm ;
> >   \stopMPcode}
> > \input knuth
> > \stopMyText
> >
> > \startframedtext{
> > \placefigure[right,none]{}{%
> >  \startMPcode
> >   draw unitsquare scaled 2cm ;
> >   \stopMPcode}
> > \input knuth}
> >
> > \stoptext
> >
> ___________________________________________________________________________________
> > 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
> >
> ___________________________________________________________________________________
>
>
> ___________________________________________________________________________________
> 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/20150808/d6c61cd1/attachment-0001.html>


More information about the ntg-context mailing list