[rfc-i] v3imp #B Fix @page margin left header footer rules in xml2rfc

Sean Leonard dev+ietf at seantek.com
Fri Jan 23 01:11:17 PST 2015


Tool Request
#B Fix @page margin left header footer rules in xml2rfc

In the current xml2rfc (v2) tool, the following @page rules are *always* 
output:
       @page {
       @top-left {
            content: "Internet-Draft";
       }
       @top-right {
            content: "December 2010";
       }
       @top-center {
            content: "Abbreviated Title";
       }
       @bottom-left {
            content: "Doe";
       }
       @bottom-center {
            content: "Expires June 2011";
       }
       @bottom-right {
            content: "[Page " counter(page) "]";
       }
       }

       @page:first {
         @top-left {
           content: normal;
         }
         @top-right {
           content: normal;
         }
         @top-center {
           content: normal;
         }
       }

That's not really nice.

In draft-josefsson-pkix-textual-10.html (which is not published, but is 
used as the basis for the PDF version), I tweaked the output manually to:
       @page {
       @top-left {
            content: "Internet-Draft";
       }
       @top-right {
            content: "December 2014";
       }
       @top-center {
            content: "pkix-textual";
       }
       @bottom-left {
            content: "Josefsson & Leonard";
       }
       @bottom-center {
            content: "Expires July 2015";
       }
       @bottom-right {
            content: "[Page " counter(page) "]";
       }
       }

       @page:first {
         @top-left {
           content: normal;
         }
         @top-right {
           content: normal;
         }
         @top-center {
           content: normal;
         }
       }

A competent HTML to PDF converter (e.g., Prince XML) will use these CSS 
rules in the output.

I tried to make some trivial changes to xml2rfc to put in the right 
values. Unfortunately, the changes cannot be trivial because some of the 
variables are not exposed to the HTML template; thus some new code needs 
to be developed to reproduce the same content in the HTML/CSS output.

The broader rfc-interest point is that even though pagination artifacts 
like headers and footers are not part of the canonical XML (v3) format, 
the underlying variables need to be present and accessible to xml2rfc -> 
HTML/PDF/other conversion tools, so that reasonable and consistent 
pagination artifacts can be generated.

Sean


More information about the rfc-interest mailing list