Re: [Rfc-markdown] document internal refrences in markdown

Carsten Bormann <cabo@tzi.org> Fri, 18 February 2022 17:30 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 7C8643A1219 for <rfc-markdown@ietfa.amsl.com>; Fri, 18 Feb 2022 09:30:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.899
X-Spam-Level:
X-Spam-Status: No, score=-6.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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 drCvmtJBgLos for <rfc-markdown@ietfa.amsl.com>; Fri, 18 Feb 2022 09:30:13 -0800 (PST)
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 AF0E03A1217 for <rfc-markdown@ietf.org>; Fri, 18 Feb 2022 09:30:13 -0800 (PST)
Received: from client-0015.vpn.uni-bremen.de (client-0015.vpn.uni-bremen.de [134.102.107.15]) (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 4K0dxb2qhHzDCbd; Fri, 18 Feb 2022 18:30:11 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <ef8ed7d8-73e3-eef5-d133-9c5a9f7b1933@pi.nu>
Date: Fri, 18 Feb 2022 18:30:11 +0100
Cc: rfc-markdown@ietf.org
X-Mao-Original-Outgoing-Id: 666898211.119956-21ddae80a72c8dd851438697a8d52bc4
Content-Transfer-Encoding: quoted-printable
Message-Id: <4320E5F2-1B26-4486-819C-14763F53336C@tzi.org>
References: <ef8ed7d8-73e3-eef5-d133-9c5a9f7b1933@pi.nu>
To: Loa Andersson <loa@pi.nu>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/P29RVPaNC17_OuQscr3H9iSVdWo>
Subject: Re: [Rfc-markdown] document internal refrences in markdown
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: Fri, 18 Feb 2022 17:30:28 -0000

> On 2022-02-18, at 17:42, Loa Andersson <loa@pi.nu> wrote:
> 
> Folks,
> 
> I'm new to markdown. Find it quite easy to use, but have a question on internal references.
> 
> Let us assume that I have a section header:
> 
> 1.1 Requirement Language
> 
> I want a reference pointing so I add to the header in the markdown
> 
> ¤¤ Requirement Language {#REQ-lang}
> 
> and everywhere where I put {{REQ-lang}} this will be expanded to "Section 1.1"
> 
> Let us assume that I'd want it to be expanded to "Section 1.1 Requirement Language" instead. Is there a way of doing that?

Yes, but you need to repeat yourself a bit (*):

{{REQ-LANG}}{{<<REQ-LANG}}

➔ https://github.com/cabo/kramdown-rfc2629/wiki/Syntax#-syntax-links
(at the end)

Grüße, Carsten

(*) I think kramdown-rfc needs a macro processor — we aren’t fully Turing equivalent yet!…

(**) Do these ¤¤ actually work for you?