[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Chunked HTML and Footnote Numbering
On Sun, Mar 22, 2009 at 8:03 AM, DavePawson <davep@dpawson.co.uk> wrote: > Chris Yocum wrote: >> >> Hi Everyone, >> I have written up a customization layer for Chunked HTML and MHRA >> footnote/bibliography style. Works very well actually. However, I >> noticed that the footnote numbers are not restarted for each chapter >> (or in the case that I noticed, the chapter which is in <d:chapter> >> tags and the introduction which is in <d:preface> tags). It's not a >> huge problem but I just wanted to know if there was some parameter >> that I was missing in my customization layer or if this was actually >> an issue. > > > Not that I could find Chris. > > It's the 'from ' attribute of xsl:number > Instead of 'book' it needs to be set to chapter. > > > I'd suggest looking at footnote.xsl... although that isn't > very straightforward. > > <xsl:template match="d:footnote" mode="footnote.number"> > looks to be a good place to start though > > <xsl:otherwise> > <xsl:variable name="pfoot" > select="preceding::d:footnote[not(@label)]"/> > <xsl:variable name="ptfoot" select="preceding::d:tgroup//d:footnote"/> > <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) + 1"/> > > <xsl:choose> > <xsl:when test="string-length($footnote.number.symbols) >= $fnum"> > <xsl:value-of select="substring($footnote.number.symbols, $fnum, > 1)"/> > </xsl:when> > <xsl:otherwise> > <xsl:number value="$fnum" format="{$footnote.number.format}"/> > </xsl:otherwise> > </xsl:choose> > </xsl:otherwise> > > Assuming you're not using @label... No, numbers will do fine. > > Its the variable pfoot that contains the number (easy to test). > > As is done here, you'd need to exclude the table based ones. > (untested) > > <xsl:variable name="pfoot" > select="ancestor::d:chapter//d:footnote[not(@label)]"/> > > Ditto with ptfoot. I might be a bit thick this afternoon but do I need to essentially rewrite this whole thing for this to work or just drop in the xsl:variable that you listed above? If I have to rewrite this whole thing, I think it might be easier if I make a request for the footnote numbers to be change from book to chapter for the html and xhtml chunk styles. This will make it much easier for books with many footnotes/citations (like Humanities texts) to use Docbook html output. Thanks for your help! Chris
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]