Re: [Rfc-markdown] new kramdown-rfc2629 feature in 1.5.13

Carsten Bormann <cabo@tzi.org> Sat, 30 October 2021 07:25 UTC

Return-Path: <cabo@tzi.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 445793A1BED for <rfc-markdown@ietfa.amsl.com>; Sat, 30 Oct 2021 00:25:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 YBF8B_anVsTN for <rfc-markdown@ietfa.amsl.com>; Sat, 30 Oct 2021 00:25:47 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [134.102.50.15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A4C2F3A1BF3 for <rfc-markdown@ietf.org>; Sat, 30 Oct 2021 00:25:46 -0700 (PDT)
Received: from smtpclient.apple (p5089a10c.dip0.t-ipconnect.de [80.137.161.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4Hh9nN2VlKz30TK; Sat, 30 Oct 2021 09:25:44 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <22597.1635514020@localhost>
Date: Sat, 30 Oct 2021 09:25:43 +0200
Cc: rfc-markdown@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <A4D113A2-6388-446C-9D03-E95ECA29A0DD@tzi.org>
References: <a1849958-8325-4474-9578-ce1f093cc49c@www.fastmail.com> <22597.1635514020@localhost>
To: Michael Richardson <mcr+ietf@sandelman.ca>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/PklAZRoS2NchUzKSOLupZ9IJwWg>
Subject: Re: [Rfc-markdown] new kramdown-rfc2629 feature in 1.5.13
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: Sat, 30 Oct 2021 07:25:56 -0000

On 29. Oct 2021, at 15:27, Michael Richardson <mcr+ietf@sandelman.ca> wrote:
> 
> Are there some other good examples in documents where this is useful and *appropriate*?

The original functionality, as provided by the upstream kramdown project, is to spot abbreviations in the source and to add titles (tooltips) that expand the abbreviation in every instance.

When I misappropriated that feature for kramdown-rfc, I used it for automatic indexing of terms.
Of course, you still want to add index entries manually as well.

(There is also the {::boilerplate bcp14-tagged} hack that uses the abbrev mechanism.)

Martin’s contribution is that, besides an index, you can now also use the abbrev feature to provide automatic glossary links.
Whether a glossary makes sense in a draft depends a lot on how many terms the reader has to juggle in their minds.
Instead of a glossary, you can also simply point back to the sections (or the ABNF/CDDL) defining the term.

BTW, in 1.5.15, I have introduced the pseudo attribute “noabbrev” that you can set to true to suppress abbrev processing for a paragraph or a span.
There is also an ALD “noabbrev” so you can leave out the »=“true”«:

Setup:

  *[florb]: #
  *[florbs]: #florb

Definition:

  A *florb*{:noabbrev} is the length of three corns of barley.
  {: #florb}

Application:

  Shoe sizes are measured in thirds of a florb.

(RFCXMLv3 does not seem to have neutral spans, so you can put the pseudo attribute on a paragraph or an em/strong span, but not create a plain one.  Duuh.
Also, you can provide an anchor for a paragraph, but not a span, hence the second IAL in the definition — could put the noabbrev there as well in this case, but in general definitions tend reference other definitions.)

Yes, this is a bit tedious to set up, but it then makes sure you have these glossary/definition links wherever you need them.
Also, keeps the application site clean (no [florb](#florb) xrefs all over the place.)

Grüße, Carsten