[NTG-context] Vertical space when surrounding with textbackground

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Thu Nov 26 21:52:04 CET 2020

Johann Birnick schrieb am 26.11.2020 um 21:40:
> I have updated and now it works. Thank you very much for all your 
> efforts. 

The problem was fixed at the end of march.

> Now let's come to my second problem: the sidebar. Proudly, I present to you my
> first MWE:
> \definetyping[CPP]
>     [before=\startsidebar,
>       after=\stopsidebar]
> \starttext
> \samplefile{ward}
> \startCPP
> #include <stdio.h>
> int main(void)
> {
>       printf("hello, world\n");
> }
> \stopCPP
> \samplefile{weisman}
> \stoptext
> Can you see that there is an additional line before and after the code?
> How can I get rid of these?

You have to use the textbackground environment with a custom background
to draw the line, the sidebar environment doesn't work because the code
blocks forces a line break at the begin and end.

You can look at Adityas blog for a example to create such a background:


More information about the ntg-context mailing list