[xep-support] Footnotes

From: Parr, Christopher (christopher.parr@thomson.com)
Date: Thu Sep 02 2004 - 06:23:53 PDT

  • Next message: David Tolpin: "Re: [xep-support] Footnotes"

    Hi All,

    I'm looking to solve a problem and I was wondering if anyone can suggest a
    solution (I'm starting to think perhaps there isn't one).

    Sorry if this gets long winded.

    I produce documents and have no problem with footnotes. Our XML is set up so
    that where a footnote needs to appear, there is a <footnote-text> tag inline
    with the rest of the text. As there is no footnote numbering within the XML
    I have to handle this myself.

    The way it is done is by passing over the XML once and using java to find
    the instances of the footnotes, building up a list of objects containing the
    footnote number (generated using a counter) and the ID of the element. On
    the second pass using the stylesheets, whenever I come across a need for a
    footnote, I find the element ID in the data structure, and retrieve the
    correct footnote number. I then do the same thing in the footer and output
    the footnote text. This gives continuous footnote numbering from start to
    finish of the document as opposed to the numbering starting at 1 on each
    page.

    What I now want to do is streamline the document: There can be many
    identical footnotes within the document both on the same page and over many
    pages. I need to merge these footnotes into a single footnote number so if
    there are 20 identical footnote references in one page, I can have one
    footnote number 20 times through out the text and one footnote at the bottom
    (as opposed to footnote numbers 1 to 20 within the text on the same page,
    and 20 identical footnotes in the footer).

    I can build up a data structure within the java so that all footnote-text
    elements containing the same text can be grouped (I now have an array of
    objects each containing it's own array of element ID's), so I know they are
    identical. What I'm stuck on is a way to identify when I have created a new
    page and therefore need to increment the number by one. I have the following
    problem scenario:

    Footnote text 'amended by X' appears as the first 20 footnotes, but only the
    first 18 appear on the first page. What I really need to do is output 18
    footnote number 1's within the text of page one and have a footnote
    reference to number 1 in the footer of page one. Then what I need is the
    remaining footnote references as number 2 on the second page with footnote 2
    in the footer of page 2. As I don't know when the text for page one has
    ended I have no way of knowing that I need to increment the footnote number
    and output the footnote text again (this time referring to footnote 2 in the
    footer of page 2).

    I'm starting to think this can't be done, but it must be a common publishing
    issue.

    If one exists can anyone point me to a solution?

    Thanks in advance

    Chris

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Thu Sep 02 2004 - 06:40:49 PDT