From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113648 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thangalin via ntg-context Newsgroups: gmane.comp.tex.context Subject: Blank lines discarded when \typing Date: Fri, 3 Dec 2021 12:47:48 -0800 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000c1a4f705d244050b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11762"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Thangalin To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 03 21:48:57 2021 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 1mtFUG-0002r2-2K for gctc-ntg-context-518@m.gmane-mx.org; Fri, 03 Dec 2021 21:48:56 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 053892A1C5C; Fri, 3 Dec 2021 21:48:04 +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 8z7DGw6jSdgz; Fri, 3 Dec 2021 21:48:03 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E16302A1CED; Fri, 3 Dec 2021 21:48:02 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EE38B2A1CEB for ; Fri, 3 Dec 2021 21:48:01 +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 1uFymgdzl7Bc for ; Fri, 3 Dec 2021 21:48:01 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.177; helo=mail-lj1-f177.google.com; envelope-from=thangalin@gmail.com; receiver= Original-Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id CFC212A1C5C for ; Fri, 3 Dec 2021 21:48:00 +0100 (CET) Original-Received: by mail-lj1-f177.google.com with SMTP id l7so8504747lja.2 for ; Fri, 03 Dec 2021 12:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=ncSRfL/50L7QOCcKgfqJ938oO+PcuR3XuIcWtHo2ty8=; b=fbWu5luK7dmTnNtMKepmzKDp7FdgS3mR8dcVD2ujmufgn6EixXtqUvMwuFcCbU2GF3 l67RfJuR0J91ks7v5kcqd90HqaDAPobsrEzX6a5MuiGxPoRvaAsyXPsnkyScASqhGNLE 8umcOLn9r4g7cfZLPmFJ0fq94gmepMbNlqOApG1WdaGGwnIVOusuBmmA+E4PFJr5OzTI 3TkX2nZpbBhbg1m7oTXmQrpZ/FGFqfEUa+XLvVwjiMtNPr+uonetNhs6t6tfsgL94Sx+ AMqttQ74e3YUpzlGVpw4dXSwGYhnfsrX4o0zgmeW8A3LgdEpU7x7x+CF56pqgPGNCN5t X7xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ncSRfL/50L7QOCcKgfqJ938oO+PcuR3XuIcWtHo2ty8=; b=51JfbSRQy3M/uUyGPQktcFYrCPT5zy6rwHbVbG5CrzzxQfwnbVNQcKQEdlrmI+6BEG 3TdLteQGtnN23BRfXauaPAhsrUnzM000v6Lu91c/Nrimc2gKnY61oaGb4R6huyM7ehxX FEk0/7KjbCC/kyb7aVXf8Ba8BfgilhmBJnEP6oSCE1Qb5bqWlm2pdVrGIMFSXbe0Qvm7 VBGaXQ6OnE8x3HwsveXL7n+CN81jfSvxpsg/r/OJH/PAMmCaqSNzTeqv/ioAq+7P3O15 Pv0RSxEChbvgL6nAtzv97fZr8DqVb+a5Cj6j4efRRFJ81rmezf+9UqqulZyGg7wtJozd eulw== X-Gm-Message-State: AOAM531reaV4G8jLc6rzYiqDRLtngHgggUgJ8dgXdanlPjJeZ3XerQVy JN90nBCqqW6MidEo8XqQbSPykB+hLRv6SyE7bIxRNUlTNE8= X-Google-Smtp-Source: ABdhPJyKG+zwMtgL7LpjFdWKQAzVpoK2sgjVgPRirg6Ulp6iHXA4ro+dCl5i+Dj3qG8a8N8nP2rGclxhfJFfDcsOviQ= X-Received: by 2002:a2e:86da:: with SMTP id n26mr19784290ljj.522.1638564479732; Fri, 03 Dec 2021 12:47:59 -0800 (PST) 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:113648 Archived-At: --000000000000c1a4f705d244050b Content-Type: multipart/alternative; boundary="000000000000c1a4f605d2440509" --000000000000c1a4f605d2440509 Content-Type: text/plain; charset="UTF-8" Note the presence of double-spaced blank lines in the following document and in the attached source file: \setuptyping[numbering=line] \starttext \startbuffer[javacode] try { final var num = stack.pop(); if( num != null ) { stack.push( blah ); } return true; } \stopbuffer \type{\typebuffer}: \typebuffer[javacode] \type{\typing}: \starttyping try { final var num = stack.pop(); if( num != null ) { stack.push( blah ); } return true; } \stoptyping \type{\typefile}: \typefile{t.java} \stoptext There appear to be two issues. First, \typefile produces what I'd consider the "correct" result, where the double-spaced lines appear on the page as a double-space. Both the \typebuffer and \typing commands ignore double-spacing. The double-spacing is also ignored by \xmldisplayverbatim. How would you configure to give \typebuffer, \typing, and \xmldisplayverbatim to honour double-spaces the same way as \typefile? Second, of lesser importance, is that the blank lines aren't numbered. This makes the line numbers inconsistent with respect to IDEs. How would you label all blank lines as well? Out of curiosity, does the second issue relate to the first? Thank you! --000000000000c1a4f605d2440509 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Note the presence of double-spaced blank lines in the= following document and in the attached source file:

\setuptyping[numbering=3Dline]=
\starttext

\startbuffer[javacode]
try {
=C2=A0 final var n= um =3D stack.pop();

=C2=A0 if( num !=3D null ) {
=C2=A0 =C2=A0 st= ack.push( blah );
=C2=A0 }


=C2=A0 return true;
}
\stopb= uffer

\type{\typebuffer}:
\typebuffer[javacode]

\type{\typ= ing}:
\starttyping
try {
=C2=A0 final var num =3D stack.pop();
=
=C2=A0 if( num !=3D null ) {
=C2=A0 =C2=A0 stack.push( blah );
= =C2=A0 }


=C2=A0 return true;
}
\stoptyping

\type{\t= ypefile}:
\typefile{t.java}

\stoptext

=
There appear to be two issues.

First, \typefi= le produces what I'd consider the "correct" result, where the= double-spaced lines appear on the page as a double-space. Both the \typebu= ffer and \typing commands ignore double-spacing. The double-spacing is also= ignored by \xmldisplayverbatim. How would you configure to give \typebuffe= r, \typing, and \xmldisplayverbatim to honour double-spaces the same way as= \typefile?

Second, of lesser importance, is t= hat the blank lines aren't numbered. This makes the line numbers incons= istent with respect to IDEs. How would you label all blank lines as well?

Out of curiosity, does the second issue relate to t= he first?

Thank you!
--000000000000c1a4f605d2440509-- --000000000000c1a4f705d244050b Content-Type: text/x-java; charset="US-ASCII"; name="t.java" Content-Disposition: attachment; filename="t.java" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kwqupkr60 dHJ5IHsKICBmaW5hbCB2YXIgbnVtID0gc3RhY2sucG9wKCk7CiAgCiAgaWYoIG51bSAhPSBudWxs ICkgewogICAgc3RhY2sucHVzaCggYmxhaCApOwogIH0KICAKICAKICByZXR1cm4gdHJ1ZTsKfQo= --000000000000c1a4f705d244050b 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== --000000000000c1a4f705d244050b--