[Rfc-markdown] 1.3.7: supporting ditaa, mscgen in -3 mode

Carsten Bormann <cabo@tzi.org> Sat, 30 May 2020 16: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 A66913A0BFE; Sat, 30 May 2020 09:23:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 MkGNU6ZdMhRA; Sat, 30 May 2020 09:23:16 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D7AEC3A0B83; Sat, 30 May 2020 09:23:15 -0700 (PDT)
Received: from [172.16.42.112] (p5089ae91.dip0.t-ipconnect.de [80.137.174.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 49Z6DZ21lPzywH; Sat, 30 May 2020 18:23:10 +0200 (CEST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <3E78C586-228A-457E-BADD-D66117FFD1C0@tzi.org>
Date: Sat, 30 May 2020 18:23:04 +0200
Cc: xml2rfc@ietf.org, xml2rfc-dev@ietf.org
X-Mao-Original-Outgoing-Id: 612548584.348489-409d5241980178212151b0d797ef191e
Content-Transfer-Encoding: quoted-printable
Message-Id: <D00FAAF2-E308-462C-9E35-825DB8DC2710@tzi.org>
References: <E1jduEw-0007if-7I@durif.tools.ietf.org> <93E5295E-CE96-4121-B3F5-C04540D542FD@tzi.org> <D6806E5D-2B6E-4464-9126-44F3F5C808F7@tzi.org> <1a5cfced-2718-0a4a-41ef-b366543ec5a2@gmail.com> <3E78C586-228A-457E-BADD-D66117FFD1C0@tzi.org>
To: rfc-markdown@ietf.org
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/meUO_DWdsJJm36FwTVYcto00tRo>
Subject: [Rfc-markdown] 1.3.7: supporting ditaa, mscgen in -3 mode
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 May 2020 16:23:21 -0000

On 2020-05-30, at 08:42, Carsten Bormann <cabo@tzi.org> wrote:
> 
> Of course, I could easily integrate my own additions of svgcheck-like processing into kramdown-rfc.
> Unfortunately, adding serious XML processing adds some deployment considerations (one would normally use a gem that causes some installation difficulties on older platforms as it requires compiling native code).

Well, I chose an older gem that doesn’t have this problem (but is quite slow and less tested); I can now do svgcheck workarounds and am doing those for the breakage I have seen for ditaa and mscgen.

So kramdown-rfc2629 version 1.3.7 now supports ditaa and mscgen (in addition to goat, which was added in 1.3.2) for automatic artset generation.  

So, for instance, you can now write

~~~ mscgen
msc {
  a,b,c;

  a->b  [label="ab()"] ;
  b->c  [label="bc(TRUE)"];
  c=>c  [label="process(1)"];
  c=>c  [label="process(2)"];
  ...;
  c=>c  [label="process(n)"];
  c=>c  [label="process(END)"];
  a<<=c [label="callback()"];
  ---   [label="If more to run", ID="*"];
  a->a  [label="next()"];
  a->c  [label="ac()"];
  b<-c  [label="cb(TRUE)"];
  b->b  [label="stalled(...)"];
  a<-b  [label="ab() = FALSE"];
}
~~~

and get what you can see at http://www.tzi.de/~cabo/1-3-7-mscgen.png .

As usual, update with

	gem update kramdown-rfc2629

The tool that you want to use (goat, mscgen, or ditaa) needs to be installed and on the path of the process that runs kramdown-rfc.

If there is any other tool like that that you’d like to see supported, and it produces SVG that can be made palatable to xml2rfc without superhuman effort, please tell me.

There is no doubt that you can write ditaa that will break svgcheck’s (and my workarounds’) little mind; e.g., preferably, try to stay black-and-white.

Note that for mscgen, the mscgen source may not exactly be what you want in a plaintext-based RFC (but the SVG output is probably what you do want in your HTML renderings); I’d appreciate any proposals on how to turn mscgen into ASCII art…

Grüße, Carsten