Re: [rfc-i] Inserting SVG graphics into an IETF draft

Brian E Carpenter <brian.e.carpenter@gmail.com> Wed, 25 May 2022 03:44 UTC

Return-Path: <rfc-interest-bounces@rfc-editor.org>
X-Original-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Delivered-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 2A42BC3A916A for <ietfarch-rfc-interest-archive@ietfa.amsl.com>; Tue, 24 May 2022 20:44:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1653450260; bh=sNuZsCnAHYA3DKHCHx7vabw3DEUet31mr3LT4uAHDHo=; h=To:References:From:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=qeKNeyDaMmx8aIKvfQwri4c6Q1xpmD6wBx+tLIC7k6RX1GhGfeYgBWR882rp9Rj44 TQ0hkLcgba1iqZ+VzvhXk+LNDDPbyvDjyC7nrrXP9UZOqKRFhEGLhR8waY9z2Q55gq wkrceOX0W3sfFnLh4xrf7gyhfSxvHNDL+j40dqYA=
X-Mailbox-Line: From rfc-interest-bounces@rfc-editor.org Tue May 24 20:44:20 2022
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id ED1A6C3A6262; Tue, 24 May 2022 20:44:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1653450260; bh=sNuZsCnAHYA3DKHCHx7vabw3DEUet31mr3LT4uAHDHo=; h=To:References:From:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=qeKNeyDaMmx8aIKvfQwri4c6Q1xpmD6wBx+tLIC7k6RX1GhGfeYgBWR882rp9Rj44 TQ0hkLcgba1iqZ+VzvhXk+LNDDPbyvDjyC7nrrXP9UZOqKRFhEGLhR8waY9z2Q55gq wkrceOX0W3sfFnLh4xrf7gyhfSxvHNDL+j40dqYA=
X-Original-To: rfc-interest@ietfa.amsl.com
Delivered-To: rfc-interest@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7D406C3A626A for <rfc-interest@ietfa.amsl.com>; Tue, 24 May 2022 20:44:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.952
X-Spam-Level:
X-Spam-Status: No, score=-3.952 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-1.857, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 jrRztYyMTUma for <rfc-interest@ietfa.amsl.com>; Tue, 24 May 2022 20:44:13 -0700 (PDT)
Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 B5ACDC3A6262 for <rfc-interest@rfc-editor.org>; Tue, 24 May 2022 20:44:13 -0700 (PDT)
Received: by mail-pl1-x633.google.com with SMTP id a17so1439759plb.4 for <rfc-interest@rfc-editor.org>; Tue, 24 May 2022 20:44:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=IbnlzlRGZ2Ms8XQIDAL4X9Rw93U6m+KPqCXdMEg51mk=; b=gXMy6CzUrgxrThNdNmz/xT7/oBpwY7dVZ1JW+JfjPE4CtMiuJQU5WmvRm3FGoqtvy6 1oNLAHw3VjHkkcxHjc3Td16lXApDldRK7KLA2p7fW+Rfy23YjSp0YTLdoqI2HnE+vJqo blsdjPe0mQlIVR0TWhTk7L9/kmjRXShtElS/vKyccUDKVqk3vwx/Yh9ZwDsuIf9cwT9S 57OEJ/mgocJYPH9iXNAh4cXn6EdEXkUdP4kZo9rHFRCjLIWrBm5gVgO35rDoHzoyZaUh KtRs21CMSU2Re1aLPzskRrFsD3bIUoh1csHuoGrjWSoq8THA2C0w8pP8hHBcYY7a3NO+ mN+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IbnlzlRGZ2Ms8XQIDAL4X9Rw93U6m+KPqCXdMEg51mk=; b=RvO8J4x2qDbBddyCWTvrGo/GF/+KEKlO/kwuihheOJ2tIQei1OELA1HAD9Uvmn6QQm MkMAQgqO1V6kJz1OMKpE4djhyFBayjs/U2vyRNf7ULHQzhccpp0b0lYMO/Ic+Uck9r37 dpCBJtDDIzAB9eWgIqcbmtkVnNDfWsSlVnefuq/8LI2b1FcCbPy7XgmZTNLLs02JGKs0 4+DTS+j8hd8cpFzoKWy8cGkm6DECjWQpkAwpFwwhF7eyen23RN2tztIqqmdp4YTBt9UF H6oZqda7KcIWGNKZuLPQZHZTJD+gHCXFinsEFxnrLoDjShrcaIlPL4MAuco0H+9g7MDE 4ksQ==
X-Gm-Message-State: AOAM531+vpZHhjEgKpR3cUyOYpf6pbcwIj0S6tOpC0NfbaWIRAujMHGj Hu1ADa4DT4O7CLEbzqWRvZqvp8J2qSIO/Q==
X-Google-Smtp-Source: ABdhPJxmQohNjEmpr2OtFeaxeioTfn9GNf+5a2VEaqyW2WOslBPZv3yeyN1as4UbcMNYtHHH77m/Zw==
X-Received: by 2002:a17:903:1111:b0:15f:7f0:bbf3 with SMTP id n17-20020a170903111100b0015f07f0bbf3mr30493970plh.12.1653450252797; Tue, 24 May 2022 20:44:12 -0700 (PDT)
Received: from ?IPv6:2406:e003:1005:b501:80b2:5c79:2266:e431? ([2406:e003:1005:b501:80b2:5c79:2266:e431]) by smtp.gmail.com with ESMTPSA id s1-20020a170902ea0100b0015e8d4eb1c1sm7912420plg.11.2022.05.24.20.44.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 May 2022 20:44:11 -0700 (PDT)
To: Martin Thomson <mt@lowentropy.net>, rfc-interest@rfc-editor.org
References: <MN2PR11MB375770AEBE5A992CC01156ACB9D79@MN2PR11MB3757.namprd11.prod.outlook.com> <A2C534F3-3162-4779-A637-BA42C5C44215@ietf.org> <MN2PR11MB37570AF809E4FA14CB3DFE3AB9D79@MN2PR11MB3757.namprd11.prod.outlook.com> <6031EEDF-C648-4492-97CC-CB0EDAB475D7@amsl.com> <a8987247-ccd9-6dfb-d89c-95245366b9b1@gmail.com> <7089978b-71d2-481f-9043-a73db2bb7304@beta.fastmail.com>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Message-ID: <b3a19504-a33c-6b34-aecd-9bf168fb4c87@gmail.com>
Date: Wed, 25 May 2022 15:44:10 +1200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0
MIME-Version: 1.0
In-Reply-To: <7089978b-71d2-481f-9043-a73db2bb7304@beta.fastmail.com>
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-interest/Aj1S4uWH6saYiu3UmNcmuP8FFvw>
Subject: Re: [rfc-i] Inserting SVG graphics into an IETF draft
X-BeenThere: rfc-interest@rfc-editor.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: "A list for discussion of the RFC series and RFC Editor functions." <rfc-interest.rfc-editor.org>
List-Unsubscribe: <https://mailman.rfc-editor.org/mailman/options/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rfc-interest/>
List-Post: <mailto:rfc-interest@rfc-editor.org>
List-Help: <mailto:rfc-interest-request@rfc-editor.org?subject=help>
List-Subscribe: <https://mailman.rfc-editor.org/mailman/listinfo/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: rfc-interest-bounces@rfc-editor.org
Sender: rfc-interest <rfc-interest-bounces@rfc-editor.org>

On 25-May-22 12:16, Martin Thomson wrote:
> I still draw ASCII art.  It seems like you could do the same for this example.
> 
> aasvg [1] produces acceptable SVG from ASCII art that is guaranteed to be acceptable to svgcheck and RFC 7996 [2].  Example: https://httpwg.org/http2-spec/draft-ietf-httpbis-http2bis.html#figure-2
> 
> [1] https://github.com/martinthomson/aasvg
> [2] With default options and one caveat: it puts width and height attributes on the <svg> element, which xml2rfc doesn't like.  But xml2rfc is wrong to complain.

It's the width and height attributes that break automatic scaling, so I believe the complaint is justified. If a viewbox element is present, the width and height elements can simply be deleted. That's one of the things my fixup tool does.

    Brian

> 
> On Wed, May 25, 2022, at 09:11, Brian E Carpenter wrote:
>> In my experience, dia is just about the only tool that gets close to
>> meeting RFC7996 requirements. Whatever tool Paul used generates
>> constructs that RFC7996 disallows, and svgcheck therefore removes.
>>
>> Even Alice's version doesn't scale properly. My personal fixup tool
>> produced the attached from Alice's, which does allow scaling.
>>
>> Major surgery is needed rather than fixup tools.
>>
>> Regards
>>      Brian
>>
>> On 25-May-22 05:02, Alice Russo wrote:
>>> Hi Paul,
>>>
>>> I ran your file through svgcheck [1] w/ the -r repair option, edited the output in Dia bc it had removed all the text, ran svgcheck -r again to get a file for which it says 'File conforms to SVG requirements.' Here's the file in case it's useful:
>>> https://www.rfc-editor.org/v3test/AliceBobSample_alt.svg
>>>
>>> Alice
>>>
>>> [1] https://github.com/ietf-tools/RfcEditor/tree/master/svgcheck
>>>
>>>> On May 24, 2022, at 9:21 AM, Paul Duffy (paduffy) <paduffy=40cisco.com@dmarc.ietf.org> wrote:
>>>>
>>>> Thanks Jay, but I've already been there.
>>>>
>>>> The SVG generated by my production tool is not accepted by the IETF validators (despite the fact it is fine with any other SVG viewer I have tried).
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Jay Daley <exec-director@ietf.org>
>>>> Sent: Tuesday, May 24, 2022 12:14 PM
>>>> To: Paul Duffy (paduffy) <paduffy@cisco.com>
>>>> Cc: RFC Interest <rfc-interest@rfc-editor.org>
>>>> Subject: Re: [rfc-i] Inserting SVG graphics into an IETF draft
>>>>
>>>> Hi Paul
>>>>
>>>>> On 24 May 2022, at 17:01, Paul Duffy (paduffy) <paduffy=40cisco.com@dmarc.ietf.org> wrote:
>>>>>
>>>>> Greetings all
>>>>>
>>>>> After much material review and head scratching, I have an intentionally open-ended question to ask.
>>>>>
>>>>> Please find attached a sample Kramdown draft and related SVG graphic.  This SVG displays corrected on all of the 12 or so viewers I have tried.
>>>>>
>>>>> How do I incorporate this SVG into the RFC draft?
>>>>
>>>>
>>>> See the documentation at https://authors.ietf.org/en/diagrams
>>>>
>>>> kind regards
>>>> Jay
>>>>
>>>>
>>>>>
>>>>> Cheers
>>>>>
>>>>>
>>>>>
>>>>> <AliceBobSample.svg><AliceAndBob.md>_______________________________________________
>>>>> rfc-interest mailing list
>>>>> rfc-interest@rfc-editor.org
>>>>> https://mailman.rfc-editor.org/mailman/listinfo/rfc-interest
>>>>
>>>> -- 
>>>> Jay Daley
>>>> IETF Executive Director
>>>> exec-director@ietf.org
>>>>
>>>> _______________________________________________
>>>> rfc-interest mailing list
>>>> rfc-interest@rfc-editor.org
>>>> https://mailman.rfc-editor.org/mailman/listinfo/rfc-interest
>>>>
>>>
>>> _______________________________________________
>>> rfc-interest mailing list
>>> rfc-interest@rfc-editor.org
>>> https://mailman.rfc-editor.org/mailman/listinfo/rfc-interest
>>> .
>>>
>>
>> _______________________________________________
>> rfc-interest mailing list
>> rfc-interest@rfc-editor.org
>> https://mailman.rfc-editor.org/mailman/listinfo/rfc-interest
>>
>> Attachments:
>> * AB_alt_fixed.svg
> 
> _______________________________________________
> rfc-interest mailing list
> rfc-interest@rfc-editor.org
> https://mailman.rfc-editor.org/mailman/listinfo/rfc-interest
> 

_______________________________________________
rfc-interest mailing list
rfc-interest@rfc-editor.org
https://mailman.rfc-editor.org/mailman/listinfo/rfc-interest