Re: [Rfc-markdown] Trying to mitigate "Re: The <tt> train wreck"

Jay Daley <exec-director@ietf.org> Mon, 25 April 2022 10:35 UTC

Return-Path: <exec-director@ietf.org>
X-Original-To: rfc-markdown@ietfa.amsl.com
Delivered-To: rfc-markdown@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 297303A1700 for <rfc-markdown@ietfa.amsl.com>; Mon, 25 Apr 2022 03:35:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.116
X-Spam-Level:
X-Spam-Status: No, score=-6.116 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ssMApHkjigdG for <rfc-markdown@ietfa.amsl.com>; Mon, 25 Apr 2022 03:35:39 -0700 (PDT)
Received: from ietfx.amsl.com (unknown [50.223.129.196]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 691F23A16F8 for <rfc-markdown@ietf.org>; Mon, 25 Apr 2022 03:35:39 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by ietfx.amsl.com (Postfix) with ESMTP id 3ADC34095304; Mon, 25 Apr 2022 03:35:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
Received: from ietfx.amsl.com ([50.223.129.196]) by localhost (ietfx.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3dwRBScl_tXH; Mon, 25 Apr 2022 03:35:39 -0700 (PDT)
Received: from smtpclient.apple (unknown [109.249.185.122]) by ietfx.amsl.com (Postfix) with ESMTPSA id A0A324092781; Mon, 25 Apr 2022 03:35:38 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\))
From: Jay Daley <exec-director@ietf.org>
In-Reply-To: <F4C29CED-87A8-40B8-BE28-4EF54CEA3A8B@tzi.org>
Date: Mon, 25 Apr 2022 11:35:35 +0100
Cc: rfc-markdown@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <834B1392-281F-4F60-A05B-AC49D8FF208F@ietf.org>
References: <04BFB6A7-7601-409D-8101-237242F6F38A@tzi.org> <F4C29CED-87A8-40B8-BE28-4EF54CEA3A8B@tzi.org>
To: Carsten Bormann <cabo@tzi.org>
X-Mailer: Apple Mail (2.3696.80.82.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/lOGVHUgfVFvyrNm826RKuTeBoTU>
Subject: Re: [Rfc-markdown] Trying to mitigate "Re: The <tt> train wreck"
X-BeenThere: rfc-markdown@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "rfc-markdown is a discussion list for people writing I-Ds and RFCs in Markdown and the authors of the tools used for that." <rfc-markdown.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rfc-markdown>, <mailto:rfc-markdown-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rfc-markdown/>
List-Post: <mailto:rfc-markdown@ietf.org>
List-Help: <mailto:rfc-markdown-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rfc-markdown>, <mailto:rfc-markdown-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Apr 2022 10:35:44 -0000


> On 25 Apr 2022, at 10:16, Carsten Bormann <cabo@tzi.org> wrote:
> 
>> On 2021-08-14, at 01:13, Carsten Bormann <cabo@tzi.org> wrote:
>> 
>> The original RFCXML RFC 2629 did not have any elements to indicate emphasis (often rendered as italic/oblique and/or bold type).  More normatively in practice, XML2RFCv1 had »<spanx style=«, which provided text spans with the following properties:
>> 
>> | style   | nobreak | decorator | type      | tt |
>> |---------|---------|-----------|-----------|----|
>> | emph    |         | _         | em        | -  |
>> | strong  |         | *         | strong    | -  |
>> | nobreak | x       | none      | -         | -  |
>> | vbare   | x       | none      | -         | x  |
>> | verb    | x       | "         | -         | x  |
>> | vemph   | x       | _         | em        | x  |
>> | vstrong | x       | *         | strong    | x  |
>> | vdeluxe | x       | *_ and _* | em strong | x  |
> […]
>> For TXT, the “decorator" column indicates what character is used _around_ the span in plaintext rendering.  Note that only “nobreak" and “vbare” had no decorator.  Using »"« as a decorator for “verb” certainly was an unloved compromise that did, however, work well enough.
> 
> … which was then broken in xml2rfc 3.11.0, 2021-10-29.
> 
> Clearly, there are cases that benefit from this change (where <tt was decorative only and no information was needed in the plaintext version).  Where <tt was semantic (not to be lost in plaintext), the workaround for this change is now to manually insert double quotes, which will unfortunately mar the HTML/PDF rendering even if that is not needed.
> 
> I also wrote:
> 
>> PS.: I have CCed this to rfc-markdown because there also is no good way in markdown to keyboard the distinction between a decorative <tt that can be ignored in plaintext and one that *needs* a representation (“decorators”):  Like this part of XML2RFCv3, markdown also was not designed to format into plaintext.  It would be nice if there were a way to create a workaround from kramdown-rfc, but the problem is that the single piece of XML that kramdown-rfc puts out needs to generate both the TXT and the HTML/PDF version, and there is no way in RFCXMLv3 to indicate the variant processing needed for TXT.
> 
> As I implied, this is unfixable in an author tool with the current version of RFCXMLv3.
> However, a future version of RFCXML might have an indication for semantic <tt usage, which would cause the quotes to appear in the plain text but not the typographic (HTML/PDF) renderings.
> 
> We can prepare for that by already keyboarding documents as if we had semantic <tt.  This will translate into quotes for all renderings in today’s RFCXMLv3, so the only improvement will be to make this easier to type.  But as soon as RFCXMLv3 gains semantic <tt, kramdown-rfc can be changed to emit this for the code-spans marked semantic in the source.
> 
> I propose to use
> 
> ```d'oh```

In many flavours of markdown, including GitHub, triple backtick is used to indicate multi-line code blocks (code fences) and single backticks for code spans.  You appear to be switching the two.

Also, how do you see this intersecting with this discussion that we had: https://github.com/ietf-tools/xml2rfc/discussions/753 about a possible <term which lends itself much better to semantic markup.

Jay

> 
> for semantic codespans.
> 
> (1) this looks vaguely like "`d'oh`", so it should be mnemonic to those using the workaround, while much easier to type (and easier to not get wrong as `”d’oh”` which makes the quotes part of the monospaced string).
> (2) upstream kramdown already allows this syntax (*) as an alternative codespan syntax, so we don’t have to hack that in.
> 
> Again, this will not enable better rendering today than the manual workaround, but as soon as RFCXML updates, the documents will look better in the typographic renderings (HTML/PDF) without losing the semantic information in TXT.
> 
> Comments welcome before I sit down and code that.
> (Plan is to have that ready for the 6 month anniversary of xml2rfc 3.11.0, 2022-04-29.)
> 
> Grüße, Carsten
> 
> 
> (*) Markdown arcana:
> Kramdown allows multiple backquotes [1] so one can write about constructs like ```d’oh```:
> 
> ```` ```d’oh``` ````
> 
> So I plan to actually trigger semantic <tt by an odd number (≥ 3) of backquotes; the even numbers stay available to keyboard decorative <tt with embedded backquotes.
> 
> [1]: https://kramdown.gettalong.org/syntax.html#code-spans
> 
> _______________________________________________
> Rfc-markdown mailing list
> Rfc-markdown@ietf.org
> https://www.ietf.org/mailman/listinfo/rfc-markdown

-- 
Jay Daley
IETF Executive Director
exec-director@ietf.org