ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Text around a figure in a framedtext
@ 2015-08-07 22:49 Fabrice Couvreur
  2015-08-08  4:18 ` Otared Kavian
  2015-08-08  8:40 ` Wolfgang Schuster
  0 siblings, 2 replies; 10+ messages in thread
From: Fabrice Couvreur @ 2015-08-07 22:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1124 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1727 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
  2015-08-07 22:49 Text around a figure in a framedtext Fabrice Couvreur
@ 2015-08-08  4:18 ` Otared Kavian
  2015-08-08  7:41   ` Fabrice Couvreur
  2015-08-08  8:40 ` Wolfgang Schuster
  1 sibling, 1 reply; 10+ messages in thread
From: Otared Kavian @ 2015-08-08  4:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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@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@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@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
  2015-08-08  4:18 ` Otared Kavian
@ 2015-08-08  7:41   ` Fabrice Couvreur
  0 siblings, 0 replies; 10+ messages in thread
From: Fabrice Couvreur @ 2015-08-08  7:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3102 bytes --]

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@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@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@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@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
>
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 5349 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
  2015-08-07 22:49 Text around a figure in a framedtext Fabrice Couvreur
  2015-08-08  4:18 ` Otared Kavian
@ 2015-08-08  8:40 ` Wolfgang Schuster
  2015-08-09  9:21   ` Fabrice Couvreur
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2015-08-08  8:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 503 bytes --]

> Fabrice Couvreur <mailto:fabrice1.couvreur@gmail.com>
> 8. August 2015 00:49
> Hi,
> Why the text does not move in the first framedtext like the second 
> framedtext?
You have to use \starthanging instead of \placefgure when you’re in a frame.

\starttext

\startframedtext[width=max]
     \starthanging[location=right]
         {\startMPcode
          draw unitsquare scaled 2cm ;
          \stopMPcode}
     \input tufte
     \stophanging
\stopframedtext

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1886 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
  2015-08-08  8:40 ` Wolfgang Schuster
@ 2015-08-09  9:21   ` Fabrice Couvreur
  0 siblings, 0 replies; 10+ messages in thread
From: Fabrice Couvreur @ 2015-08-09  9:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1239 bytes --]

Hi Wolfgang,
Thank you for all these explanations that make me progress in the use of
Context.
Fabrice

2015-08-08 10:40 GMT+02:00 Wolfgang Schuster <schuster.wolfgang@gmail.com>:

> Fabrice Couvreur <fabrice1.couvreur@gmail.com>
> 8. August 2015 00:49
> Hi,
> Why the text does not move in the first framedtext like the second
> framedtext ?
>
> You have to use \starthanging instead of \placefgure when you’re in a
> frame.
>
> \starttext
>
> \startframedtext[width=max]
>     \starthanging[location=right]
>         {\startMPcode
>          draw unitsquare scaled 2cm ;
>          \stopMPcode}
>     \input tufte
>     \stophanging
> \stopframedtext
>
> \stoptext
>
> Wolfgang
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3529 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
  2015-08-14  1:38     ` Rik Kabel
@ 2015-08-14  7:49       ` Fabrice Couvreur
  0 siblings, 0 replies; 10+ messages in thread
From: Fabrice Couvreur @ 2015-08-14  7:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3257 bytes --]

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@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@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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 8182 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
  2015-08-13 15:19   ` Fabrice Couvreur
  2015-08-13 21:56     ` Fabrice Couvreur
@ 2015-08-14  1:38     ` Rik Kabel
  2015-08-14  7:49       ` Fabrice Couvreur
  1 sibling, 1 reply; 10+ messages in thread
From: Rik Kabel @ 2015-08-14  1:38 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2262 bytes --]

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):

    The \starthangaround environment reserves space for the image etc.
    onlyfor the first paragraph

    while \placefigure includes more paragraphs if necessary.

-- 
Rik

[-- Attachment #1.2: Type: text/html, Size: 6301 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
  2015-08-13 15:19   ` Fabrice Couvreur
@ 2015-08-13 21:56     ` Fabrice Couvreur
  2015-08-14  1:38     ` Rik Kabel
  1 sibling, 0 replies; 10+ messages in thread
From: Fabrice Couvreur @ 2015-08-13 21:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2851 bytes --]

Hi,
Well, I think I have solved the problem : it is because of the blank line.
Why ?
Fabrice

2015-08-13 17:19 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> 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
>
>
> 2015-08-10 1:11 GMT+02:00 Jeong Dal <haksan@me.com>:
>
>> Dear Otared and Wolfgang,
>>
>> It works fine after replacing the text itself.
>> Thank you for the info.
>>
>> Best regards,
>>
>> Dalyoung
>>
>>
>> ___________________________________________________________________________________
>> 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
>>
>> ___________________________________________________________________________________
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 5029 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
  2015-08-09 23:11 ` Jeong Dal
@ 2015-08-13 15:19   ` Fabrice Couvreur
  2015-08-13 21:56     ` Fabrice Couvreur
  2015-08-14  1:38     ` Rik Kabel
  0 siblings, 2 replies; 10+ messages in thread
From: Fabrice Couvreur @ 2015-08-13 15:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2511 bytes --]

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


2015-08-10 1:11 GMT+02:00 Jeong Dal <haksan@me.com>:

> Dear Otared and Wolfgang,
>
> It works fine after replacing the text itself.
> Thank you for the info.
>
> Best regards,
>
> Dalyoung
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 4070 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Text around a figure in a framedtext
       [not found] <mailman.967.1439046228.2446.ntg-context@ntg.nl>
@ 2015-08-09 23:11 ` Jeong Dal
  2015-08-13 15:19   ` Fabrice Couvreur
  0 siblings, 1 reply; 10+ messages in thread
From: Jeong Dal @ 2015-08-09 23:11 UTC (permalink / raw)
  To: ntg-context

Dear Otared and Wolfgang,

It works fine after replacing the text itself.
Thank you for the info.

Best regards,

Dalyoung

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-08-14  7:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 22:49 Text around a figure in a framedtext Fabrice Couvreur
2015-08-08  4:18 ` Otared Kavian
2015-08-08  7:41   ` Fabrice Couvreur
2015-08-08  8:40 ` Wolfgang Schuster
2015-08-09  9:21   ` Fabrice Couvreur
     [not found] <mailman.967.1439046228.2446.ntg-context@ntg.nl>
2015-08-09 23:11 ` Jeong Dal
2015-08-13 15:19   ` Fabrice Couvreur
2015-08-13 21:56     ` Fabrice Couvreur
2015-08-14  1:38     ` Rik Kabel
2015-08-14  7:49       ` Fabrice Couvreur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).