Page 1 of 1
Footnotes with superscript references.
Posted: Wed Apr 20, 2005 2:02 pm
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?
Re: Footnotes with superscript references.
Posted: Thu Apr 21, 2005 1:54 pm
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
Posted: Thu Apr 21, 2005 4:42 pm
by PeterRobertson
Thank you. That works well.