ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Rik Kabel <context@rik.users.panix.com>
To: ntg-context@ntg.nl
Subject: Re: Text around a figure in a framedtext
Date: Thu, 13 Aug 2015 21:38:07 -0400	[thread overview]
Message-ID: <55CD467F.6070200@rik.users.panix.com> (raw)
In-Reply-To: <CACyK-epR1vFhawAcwOo0mK1=KAvLkVuSPBZhVOMfCj18YXaTWg@mail.gmail.com>


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

  parent reply	other threads:[~2015-08-14  1:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2015-08-14  7:49       ` Fabrice Couvreur
2015-08-07 22:49 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55CD467F.6070200@rik.users.panix.com \
    --to=context@rik.users.panix.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).