You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Eike Stepper <st...@sympedia.com> on 2005/04/05 12:36:32 UTC
Another Footnote Problem
Hi,
although I've read several threads concerning footnotes,
my issue was not covered:
The normal (body) text always flows "over" the footnote
region. This happens with each footnote on each page.
The fop source file is generated with the DocBook 4.3
and contains some footnotes:
<fo:footnote>
<fo:inline>
<fo:inline font-size="75%" font-weight="normal" font-style="normal"
vertical-align="super">1</fo:inline>
</fo:inline>
<fo:footnote-body font-family="serif,Symbol,ZapfDingbats"
font-size="9.600000000000001pt" font-weight="normal"
font-style="normal" text-align="justify" start-indent="0pt">
<fo:block><fo:inline font-size="75%" font-weight="normal"
font-style="normal"
vertical-align="super">1</fo:inline>XYZ</fo:block>
</fo:footnote-body>
</fo:footnote>
Somewhere above that position I found another occurrence of "footnote":
<fo:static-content flow-name="xsl-footnote-separator">
<fo:block>
<fo:leader color="black" leader-pattern="rule" leader-length="1in"/>
</fo:block>
</fo:static-content>
Please help!
/Eike
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Another Footnote Problem
Posted by Eike Stepper <st...@sympedia.com>.
J.Pietschmann schrieb:
> Eike Stepper wrote:
>
>> The normal (body) text always flows "over" the footnote
>> region. This happens with each footnote on each page.
>
>
> This is unusual. Which FOP version are you using?
I'm using fop-0.20.5
> Note that footnote space calculation is still buggy in 0.20.5,
> although it should reserve more space than necessary, rather
> then too little space.
I've attached a screenshot of the wrong pdf part (unfortunately
the whole text is confidential). Maybe you get an impression then.
> It may be worth to get rid off the non-integer font size too,
> although all related bug are claimed to be fixed in 0.20.5.
Which one do you mean? "75%" ?!
Cheers
/Eike
>
> J.Pietschmann
Re: Another Footnote Problem
Posted by Eike Stepper <st...@sympedia.com>.
I just managed to get rid of the problem for *some*
of the footnote areas (especially the one in the jpg
that I posted earlier) by reducing the outer page
margin from 3.0cm to 2.5cm. But that did not do the
job for *all* of the footnotes.
Since this is really awful, I decided to temporarily
turn the footnotes into chapter endnotes with the
following:
<!-- COPIED from param.xsl -->
<xsl:attribute-set name="footnote.properties">
<xsl:attribute name="font-family"><xsl:value-of select="$body.fontset"></xsl:value-of></xsl:attribute>
<xsl:attribute name="font-size"><xsl:value-of select="$footnote.font.size"></xsl:value-of></xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
<xsl:attribute name="font-style">normal</xsl:attribute>
<xsl:attribute name="text-align">left</xsl:attribute>
<xsl:attribute name="start-indent">0pt</xsl:attribute>
</xsl:attribute-set>
<!-- COPIED from footnote.xsl -->
<xsl:template match="footnote">
<fo:inline>
<xsl:call-template name="format.footnote.mark">
<xsl:with-param name="mark">
<xsl:apply-templates select="." mode="footnote.number"/>
</xsl:with-param>
</xsl:call-template>
</fo:inline>
</xsl:template>
<!-- COPIED from footnote.xsl -->
<xsl:template match="footnote" mode="endnote">
<fo:block xsl:use-attribute-sets="footnote.properties">
<xsl:apply-templates/>
<fo:block space-before.optimum="0.7em"
space-before.minimum="0.5em"
space-before.maximum="0.9em"/>
</fo:block>
</xsl:template>
<!-- COPIED from footnote.xsl -->
<xsl:template name="make.endnotes.list">
<xsl:apply-templates mode="endnote"
select="ancestor-or-self::chapter//footnote | ancestor-or-self::appendix//footnote"/>
</xsl:template>
<!-- COPIED from http://www.gungfu.de/facts/archives/2004/06/16/funoten-mit-fop -->
<xsl:template name="format.footnote.mark">
<xsl:param name="mark" select="'?'"/>
<fo:inline baseline-shift="super" font-size="{$body.font.master * 0.6}pt"
vertical-align="super">
<xsl:copy-of select="$mark"/>
</fo:inline>
</xsl:template>-->
<!-- COPIED from component.xsl -->
<xsl:template match="chapter">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="master-reference">
<xsl:call-template name="select.pagemaster"/>
</xsl:variable>
<fo:page-sequence hyphenate="{$hyphenate}"
master-reference="{$master-reference}">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
<xsl:attribute name="format">
<xsl:call-template name="page.number.format">
<xsl:with-param name="master-reference"
select="$master-reference"/>
</xsl:call-template>
</xsl:attribute>
<xsl:attribute name="initial-page-number">
<xsl:call-template name="initial.page.number">
<xsl:with-param name="master-reference"
select="$master-reference"/>
</xsl:call-template>
</xsl:attribute>
<xsl:attribute name="force-page-count">
<xsl:call-template name="force.page.count">
<xsl:with-param name="master-reference"
select="$master-reference"/>
</xsl:call-template>
</xsl:attribute>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:with-param name="key"
select="'hyphenation-character'"/>
</xsl:call-template>
</xsl:attribute>
<xsl:attribute name="hyphenation-push-character-count">
<xsl:call-template name="gentext">
<xsl:with-param name="key"
select="'hyphenation-push-character-count'"/>
</xsl:call-template>
</xsl:attribute>
<xsl:attribute name="hyphenation-remain-character-count">
<xsl:call-template name="gentext">
<xsl:with-param name="key"
select="'hyphenation-remain-character-count'"/>
</xsl:call-template>
</xsl:attribute>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:with-param name="master-reference"
select="$master-reference"/>
</xsl:apply-templates>
<xsl:apply-templates select="." mode="running.foot.mode">
<xsl:with-param name="master-reference"
select="$master-reference"/>
</xsl:apply-templates>
<fo:flow flow-name="xsl-region-body">
<xsl:call-template name="set.flow.properties">
<xsl:with-param name="element" select="local-name(.)"/>
<xsl:with-param name="master-reference"
select="$master-reference"/>
</xsl:call-template>
<fo:block id="{$id}">
<xsl:call-template name="chapter.titlepage"/>
</fo:block>
<xsl:variable name="toc.params">
<xsl:call-template name="find.path.params">
<xsl:with-param name="table"
select="normalize-space($generate.toc)"/>
</xsl:call-template>
</xsl:variable>
<xsl:if test="contains($toc.params, 'toc')">
<xsl:call-template name="component.toc"/>
<xsl:call-template name="component.toc.separator"/>
</xsl:if>
<xsl:apply-templates/>
<!-- ADDED -->
<xsl:if test="descendant::footnote">
<fo:block space-before="44pt" space-after="6pt" font-weight="bold"
font-size="14pt" font-family="{$title.fontset}">
<xsl:text>Endnoten</xsl:text>
</fo:block>
<fo:block >
<xsl:call-template name="make.endnotes.list"/>
</fo:block>
</xsl:if>
<!-- /ADDED -->
</fo:flow>
</fo:page-sequence>
</xsl:template>
It would be much nicer to have "real" footnotes at the end of each page...
Cheers
/Eike
J.Pietschmann schrieb:
> Eike Stepper wrote:
>
>> The normal (body) text always flows "over" the footnote
>> region. This happens with each footnote on each page.
>
>
> This is unusual. Which FOP version are you using?
> Note that footnote space calculation is still buggy in 0.20.5,
> although it should reserve more space than necessary, rather
> then too little space.
> It may be worth to get rid off the non-integer font size too,
> although all related bug are claimed to be fixed in 0.20.5.
>
> J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Another Footnote Problem
Posted by Eike Stepper <st...@sympedia.com>.
J.Pietschmann schrieb:
> Eike Stepper wrote:
>
>> The normal (body) text always flows "over" the footnote
>> region. This happens with each footnote on each page.
>
>
> This is unusual. Which FOP version are you using?
> Note that footnote space calculation is still buggy in 0.20.5,
> although it should reserve more space than necessary, rather
> then too little space.
> It may be worth to get rid off the non-integer font size too,
> although all related bug are claimed to be fixed in 0.20.5.
>
> J.Pietschmann
Maybe my DocBook customization layer is helpful:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="../xsl/fo/docbook.xsl"/>
<xsl:param name="l10n.gentext.language" select="'de'"/>
<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="section.label.includes.component.label" select="1"/>
<xsl:param name="fop.extensions" select="1"/>
<xsl:param name="draft.mode" select="'no'"/>
<xsl:param name="draft.watermark.image" select="''"/>
<xsl:param name="paper.type" select="'A4'"/>
<xsl:param name="page.margin.top" select="'2cm'"/>
<xsl:param name="page.margin.bottom" select="'1cm'"/>
<xsl:param name="page.margin.inner" select="'4cm'"/>
<xsl:param name="page.margin.outer" select="'3cm'"/>
<!--<xsl:param name="body.font.family" select="'Garamond'"/>-->
<xsl:param name="body.font.master" select="12"/>
<xsl:param name="body.start.indent" select="0"/>
<xsl:param name="body.end.indent" select="0"/>
<xsl:attribute-set name="normal.para.spacing">
<xsl:attribute name="space-before.optimum">0.7em</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
<xsl:attribute name="space-before.maximum">0.9em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="list.block.spacing">
<xsl:attribute name="space-before.optimum">0.0em</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.0em</xsl:attribute>
<xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
<xsl:attribute name="space-after.optimum">0.0em</xsl:attribute>
<xsl:attribute name="space-after.minimum">0.0em</xsl:attribute>
<xsl:attribute name="space-after.maximum">0.2em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="list.item.spacing">
<xsl:attribute name="space-before.optimum">0.7em</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
<xsl:attribute name="space-before.maximum">0.9em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section.title.properties">
<xsl:attribute name="font-family">
<xsl:value-of select="$title.font.family"/>
</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<!-- font size is calculated dynamically by section.heading template -->
<xsl:attribute name="keep-with-next.within-column">
always</xsl:attribute>
<xsl:attribute name="text-align">left</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
<xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
<xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="component.title.properties">
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.5"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section.title.level1.properties">
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.2"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section.title.level2.properties">
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.2"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section.title.level3.properties">
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.2"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section.title.level4.properties">
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.2"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section.title.level5.properties">
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.2"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
<!-- http://www.gungfu.de/facts/archives/2004/06/16/funoten-mit-fop/
<xsl:template name="format.footnote.mark">
<xsl:param name="mark" select="'?'"/>
<fo:inline baseline-shift="super" font-size="{$body.font.master*0.8}pt"
vertical-align="super">
<xsl:copy-of select="$mark"/>
</fo:inline>
</xsl:template>-->
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Another Footnote Problem
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Eike Stepper wrote:
> The normal (body) text always flows "over" the footnote
> region. This happens with each footnote on each page.
This is unusual. Which FOP version are you using?
Note that footnote space calculation is still buggy in 0.20.5,
although it should reserve more space than necessary, rather
then too little space.
It may be worth to get rid off the non-integer font size too,
although all related bug are claimed to be fixed in 0.20.5.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org