From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: Vertical space when surrounding with textbackground
Date: Thu, 26 Nov 2020 21:52:04 +0100 [thread overview]
Message-ID: <e167ccfb-a0de-4f38-d813-c73bfd1bd4b0@gmail.com> (raw)
In-Reply-To: <DB8PR03MB623630122A872CFFBE31C97EFBF90@DB8PR03MB6236.eurprd03.prod.outlook.com>
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:
https://adityam.github.io/context-blog/post/frame-with-solid-left-line-redux/
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2020-11-26 20:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 10:31 Johann Birnick
2020-11-26 14:38 ` Aditya Mahajan
2020-11-26 16:00 ` Johann Birnick
2020-11-26 16:28 ` Aditya Mahajan
2020-11-26 16:31 ` Wolfgang Schuster
2020-11-26 18:10 ` Johann Birnick
2020-11-26 18:17 ` Wolfgang Schuster
2020-11-26 18:26 ` Johann Birnick
2020-11-26 18:33 ` Aditya Mahajan
2020-11-26 18:35 ` Wolfgang Schuster
2020-11-26 18:39 ` Johann Birnick
[not found] ` <7bda422abac0022383c3406b7f0d7e2464e4042f.camel@hotmail.de>
2020-11-26 18:42 ` Johann Birnick
2020-11-26 19:11 ` Wolfgang Schuster
2020-11-26 20:01 ` Johann Birnick
2020-11-26 20:40 ` Johann Birnick
2020-11-26 20:52 ` Wolfgang Schuster [this message]
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=e167ccfb-a0de-4f38-d813-c73bfd1bd4b0@gmail.com \
--to=wolfgang.schuster.lists@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).