Eclipse Plugin: Footnote in PDF body not superscript

Having trouble installing Oxygen? Got a bug to report? Post it all here.
kirby
Posts: 2
Joined: Fri Aug 13, 2004 9:29 am

Eclipse Plugin: Footnote in PDF body not superscript

Post by kirby »

I just installed the plugin for Eclipse and generated a PDF from a DocBook source file.

All is well so far except the style for footnotes in the body of the text is hardly different than the rest of the text (unlike in XHTML, where the numbers are both surrounded by square brackets and superscripted).

Looking at footnote.xsl, it appears like I'm getting the font reduction to 90%, but that neither superscripting option is having much effect.

Code: Select all


<xsl:template name="format.footnote.mark">
<xsl:param name="mark" select="'?'"/>
<fo:inline font-size="90%">
<xsl:choose>
<xsl:when test="$fop.extensions != 0">
<xsl:attribute name="vertical-align">super</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="baseline-shift">super</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:copy-of select="$mark"/>
</fo:inline>
</xsl:template>
Is there some other way to improve the appearance of footnotes in PDFs? (hand modify the XSLT? -- not my forte).

Thanks for any clues.

Kirby
kirby
Posts: 2
Joined: Fri Aug 13, 2004 9:29 am

Post by kirby »

PS: on rereading the footnote.xls file, I'm doubtful that the section I quoted is relevant to my problem (I can barely read the stuff). Be that as it may, I'm still interested in changing the appearance of footnote numbers in the body of my PDF is the bestest most easiest way.

Kirby
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

You have to write a customization layer to enable FOP extensions and to customize the template format.footnote.mark to reduce the font size (to 60% for example):

Code: Select all


<xsl:param name="fop.extensions" select="1"/>

<xsl:template name="format.footnote.mark">
<xsl:param name="mark" select="'?'"/>
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
<fo:inline vertical-align="super" font-size="60%">
<xsl:copy-of select="$mark"/>
</fo:inline>
</xsl:template>
You can change the format of the footnote superscript (1, 2, 3 etc. or i, ii, iii, iv, etc. or a, b, c, etc.) from the parameter "footnote.number.format". For example if you want letter superscripts (a, b, c, etc.) you must add to your customization layer:

Code: Select all


<xsl:param name="footnote.number.format" select="'a'"/>
See http://www.sagehill.net/docbookxsl/Cust ... ationLayer for more information.

Regards,
Sorin
Post Reply