ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Space between both environments
Date: Mon, 7 Sep 2015 20:43:49 +0200	[thread overview]
Message-ID: <58C3BCBD-B9BE-4F67-AB9D-169DFAFB8F4D@gmail.com> (raw)
In-Reply-To: <CACyK-er3VYqWqFRD2uWwkRBzepjTE=pFwfeDcBKLKKFWH3yGgw@mail.gmail.com>


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

Hi Fabrice,

You can use
	after={\strut\blank}

in your definition of MyDefinition, as in:

\defineframedtext
  [MyDefinition]
  [before={\blank},
   after={\strut\blank},
   frame=off,
   background=MyFrame,
   width=\textwidth,
   height=fit,
   location=left,
   style=italic]

Best regards: OK

> On 07 Sep 2015, at 19:35, Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote:
> 
> Hi,
> I can not insert a space between my two environments.
> 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 ;
> \stopuseMPgraphic
> 
> 
> \definemixedcolumns
>   [myColumn]
>   [n=2, 
>    separator=rule,
>    rulecolor=MyColorC,
>    rulethickness=1pt,
>    balance=yes]
> 
> \setupalign[verytolerant,stretch,hanging]
> 
> 
> \defineoverlay
>   [Funny]
>   [\useMPgraphic{Funny}]
> 
> \definelabel
>   [MÉTHODE]
>   [headstyle=\bf\smallcaps]
> 
> \startuseMPgraphic{Funny}
>     interim linejoin := mitered ;
>     interim linecap := squared ;
>     path b ;
>     picture p ;
>     p := textext.rt("\white\MÉTHODE") ; 
>     p := p shifted (0,OverlayHeight) ;
>     b := boundingbox p ;
>     drawoptions (withpen pencircle scaled 3mm withcolor \MPcolor{MyColorC}) ;
>     draw leftboundary OverlayBox ;
>     fill b withcolor \MPcolor{MyColorD} ;
>     draw p ;
>     setbounds currentpicture to OverlayBox ;
> \stopuseMPgraphic
> 
> \defineframedtext
>   [Methode]
>   [before={\blank},
>    after={\blank},
>    frame=off,
>    background=Funny,
>    width=\textwidth,
>    height=fit,
>    ]
> 
> 
> 
> \starttext
> 
> \startMyDefinition
> \input knuth
> \stopMyDefinition
> 
> \startMethode
> 
> \startmyColumn
> 
> \input ward
> 
> \column
> \input knuth
> \stopmyColumn
> 
> 
> \stopMethode
> \stopsection
> \stopchapter
> \stoppart
> \stoptext


[-- Attachment #1.2: Type: text/html, Size: 6799 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
___________________________________________________________________________________

  reply	other threads:[~2015-09-07 18:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 17:35 Fabrice Couvreur
2015-09-07 18:43 ` Otared Kavian [this message]
2015-09-07 19:02 ` Wolfgang Schuster
2015-09-08 16:29   ` Fabrice Couvreur
2015-09-08 18:24     ` Wolfgang Schuster
2015-09-12  7:47       ` 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=58C3BCBD-B9BE-4F67-AB9D-169DFAFB8F4D@gmail.com \
    --to=otared@gmail.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).