xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eike Stepper <step...@sympedia.com>
Subject Re: Another Footnote Problem
Date Wed, 06 Apr 2005 08:39:56 GMT
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


Mime
View raw message