On Thu, 26 Nov 2020, Johann Birnick wrote:

> On Thu, 2020-11-26 at 09:38 -0500, Aditya Mahajan wrote:
> > On Thu, 26 Nov 2020, Johann Birnick wrote:
> > 
> > > How to surround such things properly? I just want a background to these 
> > > and
> > > a
> > > sidebar. No addition spacing / empty lines.
> > 
> > A MWE will help...
> > 
> > Aditya
> 
> For example, take:
> 
> \definetextbackground[code][background=color, backgroundcolor=lightgray,
> frame=off, location=paragraph]
> 
> \starttextbackground[code]
> \starttyping
> This is some code
> a second line
> \stoptyping
> \stoptextbackground


\definetextbackground[code][background=color, backgroundcolor=lightgray,
frame=off, location=paragraph]

\setuptyping[before={\startbackground[code]}, after={\stopbackground}]

\starttext
\starttyping
This is some code
a second line
\stoptyping
\stoptext

Aditya
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to