[rfc-i] HTML headers/footers
julian.reschke at greenbytes.de (Julian Reschke) Tue, 23 February 2016 17:29 UTC
From: julian.reschke at greenbytes.de (Julian Reschke)
Date: Tue, 23 Feb 2016 18:29:19 +0100
Subject: [rfc-i] HTML headers/footers
In-Reply-To: <1F66009A-2624-4E49-A569-F7017BA9861E@cisco.com>
References: <1F66009A-2624-4E49-A569-F7017BA9861E@cisco.com>
Message-ID: <56CC96EF.7030109@greenbytes.de>
On 2016-02-23 18:12, Joe Hildebrand (jhildebr) wrote:
> On 2/23/16, 10:04 AM, "Julian Reschke" julian.reschke at gmx.de> wrote:
>
>
>
>> - running headers and footers should be in the HTML as well (via CSS
>> paged media), if they aren't they should be added in the HTML draft
>
> (moved to RFCI. I hope you don't mind, Julian)
Sure...
> I agree that the HTML needs headers and footers in paged media. Do you have an example of this I can crib from?
From <https://github.com/reschke/xml2rfc/blob/master/rfc2629.xslt#L5314>:
> @media print {
> .<xsl:value-of select="$css-noprint"/> {
> display: none;
> }
>
> a {
> color: black;
> text-decoration: none;
> }
>
> table.<xsl:value-of select="$css-header"/> {
> width: 90%;
> }
>
> td.<xsl:value-of select="$css-header"/> {
> width: 50%;
> color: black;
> background-color: white;
> vertical-align: top;
> font-size: 110%;
> }
>
> ul.toc a:last-child::after {
> content: leader('.') target-counter(attr(href), page);
> }
>
> ul.ind li li a {<!-- links in the leaf nodes of the index should go to page numbers -->
> content: target-counter(attr(href), page);
> }
>
> pre {
> font-size: 10pt;
> }
>
> .print2col {
> column-count: 2;
> -moz-column-count: 2;<!-- for Firefox -->
> column-fill: auto;<!-- for PrinceXML -->
> }
> <xsl:if test="$xml2rfc-ext-justification='print'">
> dd, li, p {
> text-align: justify;
> }
> </xsl:if>}
> <xsl:choose><xsl:when test="$xml2rfc-ext-duplex='yes'">
> @page:right {
> @top-left {
> content: "<xsl:call-template name="get-header-left"/>";
> }
> @top-right {
> content: "<xsl:call-template name="get-header-right"/>";
> }
> @top-center {
> content: "<xsl:call-template name="get-header-center"/>";
> }
> @bottom-left {
> content: "<xsl:call-template name="get-author-summary"/>";
> }
> @bottom-center {
> content: "<xsl:call-template name="get-bottom-center"/>";
> }
> @bottom-right {
> content: "[Page " counter(page) "]";
> }
> }
> @page:left {
> @top-left {
> content: "<xsl:call-template name="get-header-right"/>";
> }
> @top-right {
> content: "<xsl:call-template name="get-header-left"/>";
> }
> @top-center {
> content: "<xsl:call-template name="get-header-center"/>";
> }
> @bottom-left {
> content: "[Page " counter(page) "]";
> }
> @bottom-center {
> content: "<xsl:call-template name="get-bottom-center"/>";
> }
> @bottom-right {
> content: "<xsl:call-template name="get-author-summary"/>";
> }
> }
> </xsl:when><xsl:otherwise>
> @page {
> @top-left {
> content: "<xsl:call-template name="get-header-left"/>";
> }
> @top-right {
> content: "<xsl:call-template name="get-header-right"/>";
> }
> @top-center {
> content: "<xsl:call-template name="get-header-center"/>";
> }
> @bottom-left {
> content: "<xsl:call-template name="get-author-summary"/>";
> }
> @bottom-center {
> content: "<xsl:call-template name="get-bottom-center"/>";
> }
> @bottom-right {
> content: "[Page " counter(page) "]";
> }
> }
> </xsl:otherwise></xsl:choose>
> @page:first {
> @top-left {
> content: normal;
> }
> @top-right {
> content: normal;
> }
> @top-center {
> content: normal;
> }
> }
Example output for draft-iab-html-rfc-02:
> @page {
> @top-left {
> content: "Internet-Draft";
> }
> @top-right {
> content: "February 2016";
> }
> @top-center {
> content: "HTML RFC";
> }
> @bottom-left {
> content: "Hildebrand & Hoffman";
> }
> @bottom-center {
> content: "Expires August 5, 2016";
> }
> @bottom-right {
> content: "[Page " counter(page) "]";
> }
> }
>
> @page:first {
> @top-left {
> content: normal;
> }
> @top-right {
> content: normal;
> }
> @top-center {
> content: normal;
> }
> }
Best regards, Julian
- [rfc-i] HTML headers/footers Joe Hildebrand jhildebr
- [rfc-i] HTML headers/footers Julian Reschke