[NTG-context] Space between both environments

Fabrice Couvreur fabrice1.couvreur at gmail.com
Tue Sep 8 18:29:35 CEST 2015


Hi,
@Otared I accept your answer until I can not fix my code, thank you.

@Woffgang  I have to change the code (how ?) because I realize that the text of
the second environment exceeds the frame (if you draw it).

2015-09-07 21:02 GMT+02:00 Wolfgang Schuster <schuster.wolfgang at gmail.com>:

> Fabrice Couvreur <fabrice1.couvreur at gmail.com>
> 7. September 2015 19:35
> Hi,
> I can not insert a space between my two environments.
>
> There is a space but you can’t see it because the colored background of
> your frames is placed too low (you can see it when you use "frame=on").
>
> Thank you.
> Fabrice
>
> % macros=mkvi
>
> \setupcolors[state=start]
>
>
> \definecolor[MyColorA][c=0.00, m=0.10, y=0.20, k=0.00]
>
> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
>
> \definecolor[MyColorC][c=0.3, m=0.00, y=0.00, k=0.05]
>
> \definecolor[MyColorD][c=0.6, m=0.00, y=0.00, k=0.10]
>
>
> \defineframedtext
>   [MyDefinition]
>   [before={\blank},
>    after={\blank},
>    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 ;
>
>     setbounds currentpicture to OverlayBox ;
>
> \stopuseMPgraphic
>
> Wolfgang
>
>
> ___________________________________________________________________________________
> 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/20150908/bfdd369a/attachment.html>


More information about the ntg-context mailing list