Re: [Rfc-markdown] how to reference a draft, and a section within an RFC?

Carsten Bormann <cabo@tzi.org> Wed, 25 January 2023 23:23 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 EF515C14F721 for <rfc-markdown@ietfa.amsl.com>; Wed, 25 Jan 2023 15:23:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.897
X-Spam-Level:
X-Spam-Status: No, score=-6.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZpdFqukoAq-y for <rfc-markdown@ietfa.amsl.com>; Wed, 25 Jan 2023 15:23:55 -0800 (PST)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [134.102.50.15]) (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) by ietfa.amsl.com (Postfix) with ESMTPS id EFD61C14E511 for <rfc-markdown@ietf.org>; Wed, 25 Jan 2023 15:23:53 -0800 (PST)
Received: from smtpclient.apple (p548dc9a4.dip0.t-ipconnect.de [84.141.201.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4P2KfG2j5kzDCbG; Thu, 26 Jan 2023 00:23:50 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <b0161e83-b2d7-9edc-50d8-ef19e5cc408e@nohats.ca>
Date: Thu, 26 Jan 2023 00:23:49 +0100
Cc: rfc-markdown@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <944065C8-2CBD-4C46-AADB-D566A50C2129@tzi.org>
References: <b0161e83-b2d7-9edc-50d8-ef19e5cc408e@nohats.ca>
To: Paul Wouters <paul@nohats.ca>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/EOOB5hdmqguH4oBabru7U5G58Xs>
Subject: Re: [Rfc-markdown] how to reference a draft, and a section within an RFC?
X-BeenThere: rfc-markdown@ietf.org
X-Mailman-Version: 2.1.39
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: Wed, 25 Jan 2023 23:23:59 -0000

Hi Paul,

On 25. Jan 2023, at 23:09, Paul Wouters <paul@nohats.ca> wrote:
> 
> 
> I've inherited a draft in this markdown format.

Welcome to the club.

> It seems to try to reference a section using:
> 
> 	({{rfcxxxx}}, Section x.y)

The usual syntax is {{Section 3.11 of RFC8949}}

If you haven’t included the RFC in the YAML header, you can do this right inline with

{{Section 3.11 of ?RFC8949}} — informative
{{Section 3.11 of !RFC8949}} — normative

Or you can do this in the YAML header:

normative:
  RFC8949:

(No further data are needed, as they are fetched from the bibxml server bib.ietf.org.)

> but that seems to not work? And this says you cannot do it:
> 
> 	https://github.com/cabo/kramdown-rfc/issues/21

This is a very old issue, discussing the introduction of <relref seven years ago (an xml2rfc innovation that already is deprecated).

> Also, I can't find how to add a draft as reference. One would expect
> that {{draft-ietf-foobar}} would work, but it doesn’t.

The standard bibxml is using I-D.ietf-foobar as the standard anchor; so far we haven’t tried to change this.

If you like this anchor format, you can define your own alias anchors in the YAML header:

normative:
  draft-ietf-foobar: I-D.ietf-foobar

> I checked the examples/ dir and couldn't find examples either.
> 
> If there is documentation anywhere about the format, I would be
> happy to read it.

The readme at https://rfc.space has some detailed documentation.

A more introductory approach is taken by various wiki articles at this space.

Section references are specifically discussed at:

https://github.com/cabo/kramdown-rfc/wiki/Syntax2#section-references

More overview material at:

https://github.com/cabo/kramdown-rfc/wiki/Syntax#references

Also, this mailing list has some discussion of various kramdown features.
And of course, you can ask here (as you did!).

Enjoy!

Grüße, Carsten