[NTG-context] Vertical space when surrounding with textbackground

Johann Birnick johann.birnick at hotmail.de
Thu Nov 26 19:39:56 CET 2020


On Thu, 2020-11-26 at 19:35 +0100, Wolfgang Schuster wrote:
> Johann Birnick schrieb am 26.11.2020 um 19:26:
> > I didn't want to copy paste it :D Just add [option=XML] to \starttext like
> > this:
> 
> Why do pass a option for the typing environment to \starttext?
> 
> > \definetextbackground[code][background=color, backgroundcolor=lightgray,
> > frame=off, location=paragraph]
> > 
> > \setuptyping[before={\startbackground[code]}, after={\stopbackground}]
> > 
> > \starttext[option=XML]
> > \starttyping
> > This is some code
> > a second line
> > \stoptyping
> > \stoptext
> > 
> > When I use \definetyping[Mytyping][option=XML] and then use \startMytyping
> > ...
> > \stopMytyping nothing changes.
> ???
> 
> \definetextbackground
>    [Code]
>    [          frame=off,
>          background=color,
>     backgroundcolor=lightgray,
>            location=paragraph]
> 
> \definetyping
>    [Mytyping]
>    [option=XML]
> 
> \setuptyping
>   %[Mytyping]
>    [before={\blank\starttextbackground[Code]},
>      after={\stoptextbackground\blank}]
> 
> \starttext
> 
> \startMytyping
> <empty/>
> \stopMytyping
> 
> \starttyping[option=XML]
> <empty/>
> \stoptyping
> 
> \stoptext
> 
> Wolfgang
> 

Sorry for confusing \starttext with \starttyping.

@Wolfgang this is exactly what I mean. It doesn't work. There is an extra line
at the end. If you remove [option=XML] it works. So what is going wrong?

Thank you,
Johann



More information about the ntg-context mailing list