Internet-Draft svg-limits February 2025
Rathnayake Expires 1 September 2025 [Page]
Workgroup:
Network Working Group
Published:
Intended Status:
Experimental
Expires:
Author:
K. Nanayakkara Rathnayake
IETF Administration LLC

xml2rfc svg limitations

Abstract

This is a draft explores limits of SVG artwork in xml2rfc.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 1 September 2025.

Table of Contents

1. Introduction

This draft explores limits of SVG artwork in [xml2rfc]. Text output of Internet-Drafts (I-Ds) and RFCs doesn't embed SVG artwork. Only HTML and PDF formats embed SVG artwork. Between those two formats, PDF is the deciding factor. This is because of the limitations of the PDF rendering capabilities of [xml2rfc] tool.

Note that PDF output will contain lot of empty spaces, this is on purpose to maximize the use of A4 size PDF page.

PDF of rendering of this draft is available here.

2. SVG without figure caption

This is an example of <artwork> without a <figure> element to add a caption.

The example is generated with following XML.

<artwork type="svg" name="max box">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 1200">
    <rect x="0" y="0" width="900" height="1200" stroke="black"
      stroke-width="10" fill="none" />
  </svg>
</artwork>
Table 1
Width Height viewBox Value
900 px 1200 px "0 0 900 1200"

3. SVG with figure caption

This is an example of <artwork> with a <figure> element to add a caption.

Note that the caption of the figure fits in to a single line in PDF format. If the caption runs longer than a one line, adjust the height of SVG artwork accordingly.

The example is generated with following XML.

<figure>
  <name>SVG artwork with the caption</name>
  <artwork type="svg" name="max box">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 1140">
      <rect x="0" y="0" width="900" height="1140" stroke="black"
        stroke-width="10" fill="none" />
    </svg>
  </artwork>
</figure>
Table 2
Width Height viewBox Value
900 px 1140 px "0 0 900 1140"
Figure 1: SVG artwork with the caption

4. Testing PDF output

The PDF files available in datatracker are different from PDF files published by RFC editor for published RFCs. The correct PDF output for RFC must be produced with [xml2rfc].

The PDF output of the I-Ds can be tested using [xml2rfc] with --pdf switch.

Other option is to use [author-tools]. Use of of Author Tools for this is recommended because Author Tools contains the latest versions of all the tools and libraries and the required fonts

5. Informative References

[xml2rfc]
IETF, "xml2rfc", , <https://github.com/ietf-tools/xml2rfc/>.
[author-tools]
IETF, "Author Tools", , <https://author-tools.ietf.org>.

Author's Address

Kesara Nanayakkara Rathnayake
IETF Administration LLC
New Zealand
Additional contact information:
කෙසර නානායක්කාර රත්නායක
IETF Administration LLC
New Zealand