Footnotes with superscript references.

Having trouble installing Oxygen? Got a bug to report? Post it all here.
PeterRobertson
Posts: 47
Joined: Mon Apr 18, 2005 2:22 pm

Footnotes with superscript references.

Post by PeterRobertson »

I would have expected the <footnote> mechanism to give references that were in the common style of superscripts.

Instead they come out as something that is hardly distinguishable from
a simple number, like this1.

How do I get superscripts for footnote references?
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Footnotes with superscript references.

Post by sorin_ristache »

PeterRobertson wrote:How do I get superscripts for footnote references?
By overriding the template format.footnote.mark in a customization layer. The following is an example of such a layer that uses a font with a 60% size of the normal text font for the superscript references:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="../frameworks/docbook/xsl/fo/docbook.xsl"/>

<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>
</xsl:stylesheet>
You have to change the href attribute of the import element to point to the path on your machine. Also make sure you enclose the body of the footnote in an element like para, variablelist etc. and not place it directly as text inside the footnote tag. <oXygen/>'s content completion will help you when you type < inside the footnote tag.

Best Regards,
Sorin
PeterRobertson
Posts: 47
Joined: Mon Apr 18, 2005 2:22 pm

Post by PeterRobertson »

Thank you. That works well.
Post Reply