From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109673 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Vertical space when surrounding with textbackground Date: Thu, 26 Nov 2020 13:33:37 -0500 (EST) Message-ID: References: <57d4a640-4250-1bd4-6aae-4de006f062db@gmail.com> <6ef0a265-06bb-b015-88ef-89b1e43dbca2@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-562069538-1606415617=:1168" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9098"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.23 (LNX 453 2020-06-18) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 26 19:34:09 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiM5p-0002DL-7U for gctc-ntg-context-518@m.gmane-mx.org; Thu, 26 Nov 2020 19:34:09 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 228561AA6E5; Thu, 26 Nov 2020 19:33:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LpDQIq9XvCwf; Thu, 26 Nov 2020 19:33:42 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 338111AA6DC; Thu, 26 Nov 2020 19:33:42 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5F4FF1AA6D9 for ; Thu, 26 Nov 2020 19:33:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p8IDid0KHFDY for ; Thu, 26 Nov 2020 19:33:39 +0100 (CET) Received-SPF: Softfail (mailfrom) identity=mailfrom; client-ip=132.206.73.2; helo=orford.cim.mcgill.ca; envelope-from=adityam@umich.edu; receiver= Original-Received: from orford.cim.mcgill.ca (smtp.cim.mcgill.ca [132.206.73.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 9900F1AA6B6 for ; Thu, 26 Nov 2020 19:33:38 +0100 (CET) Original-Received: from adi-thinkpad (198-48-192-62.cpe.teksavvy.com [198.48.192.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adityam) by orford.cim.mcgill.ca (Postfix) with ESMTPSA id 17502F44E6 for ; Thu, 26 Nov 2020 13:33:39 -0500 (EST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:109673 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-562069538-1606415617=:1168 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 26 Nov 2020, Johann Birnick wrote: > On Thu, 2020-11-26 at 19:17 +0100, Wolfgang Schuster wrote: > > Johann Birnick schrieb am 26.11.2020 um 19:10: > > > On Thu, 2020-11-26 at 17:31 +0100, Wolfgang Schuster wrote: > > > > Johann Birnick schrieb am 26.11.2020 um 17:00: > > > > > On Thu, 2020-11-26 at 09:38 -0500, Aditya Mahajan wrote: > > > > > > On Thu, 26 Nov 2020, Johann Birnick wrote: > > > > > >=20 > > > > > > > How to surround such things properly? I just want a backgroun= d to > > > > > > > these > > > > > > > and > > > > > > > a > > > > > > > sidebar. No addition spacing / empty lines. > > > > > > A MWE will help... > > > > > >=20 > > > > > > Aditya > > > > > For example, take: > > > > >=20 > > > > > \definetextbackground[code][background=3Dcolor, backgroundcolor= =3Dlightgray, > > > > > frame=3Doff, location=3Dparagraph] > > > > >=20 > > > > > \starttextbackground[code] > > > > > \starttyping > > > > > This is some code > > > > > a second line > > > > > \stoptyping > > > > > \stoptextbackground > > > > You missed the W (working) in MWE. > > > >=20 > > > > \definetextbackground > > > > =C2=A0=C2=A0=C2=A0 [Code] > > > > =C2=A0=C2=A0=C2=A0 [=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 frame=3Doff, > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 background= =3Dcolor, > > > > =C2=A0=C2=A0=C2=A0=C2=A0 backgroundcolor=3Dlightgray, > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = location=3Dparagraph] > > > >=20 > > > > \setuptyping > > > > =C2=A0=C2=A0=C2=A0 [before=3D{\blank\starttextbackground[Code]}, > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 after=3D{\stoptextbackground\blank}] > > > >=20 > > > > \starttext > > > >=20 > > > > \starttyping > > > > This is some code > > > > a second line > > > > \stoptyping > > > >=20 > > > > \stoptext > > > >=20 > > > > Wolfgang > > > Okay so first sorry that the example missed the \starttext ... \stopt= ext. > > > Won't > > > =09 >=20 > I didn't want to copy paste it :D Just add [option=3DXML] to \starttext l= ike this: \starttext does not take an `option=3DXML` argument. > \definetextbackground[code][background=3Dcolor, backgroundcolor=3Dlightgr= ay, > frame=3Doff, location=3Dparagraph] >=20 > \setuptyping[before=3D{\startbackground[code]}, after=3D{\stopbackground}= ] >=20 > \starttext[option=3DXML] > \starttyping > This is some code > a second line > \stoptyping > \stoptext >=20 > When I use \definetyping[Mytyping][option=3DXML] and then use \startMytyp= ing ... > \stopMytyping nothing changes. Again, a MWE help to understand what is going wrong. \definetextbackground[code][background=3Dcolor, backgroundcolor=3Dlightgray= , frame=3Doff, location=3Dparagraph] \setuptyping[before=3D{\startbackground[code]}, after=3D{\stopbackground}] \definetyping[XMLtyping] [ option=3DXML, before=3D{\startbackground[code]}, after=3D{\stopbackground}, ] \starttext \startXMLtyping This is some code a second line \stopXMLtyping \stoptext Aditya --8323329-562069538-1606415617=:1168 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --8323329-562069538-1606415617=:1168--