Strange page based footnote request: Multiple foot macros referencing the same footnote block.

A page with multiple paragraphs contains three text references to footnote 1. These references appear in the first paragraph on the page as well as in the last two paragraphs. Thus far, only the last footnote reference had the foot anchor and the earlier references were just super scripted. During a recent editing cycle, the last paragraph slipped to the next page, taking the footnote block with it (as it should).

My question is:
Can the same footnote block text be referenced by multiple foot macros and automatically duplicated should one of those foot macros slip to a second page?

In this case, the desired result is

  • If a reference moved to a second page, a footnote block would appear on the second page containing same text as the one on the first.
  • If all references are on the same page, only one footnote block would be present (and reside on the first page).

This is on a "classic" XPP 9.1.1. system.

  • Thomas,

    Out of the box the xpp system can not do this (I wish it could...). But...
    The following is untried, but an rough idea I just had.
    So it probably will need a lot of refinement and testing and perhaps will lead to failure.

    On import you enter each footnote multiple times, so that you have duplicates of each footnote waiting for you during compose.
    For example footnote with id 1 you let it enter the system as 1.1, 1.2, 1.3,...
    (as many time you expect a footnote to be used or if you want to make a little more sophisticated you could count how many times a given footnote is referenced and then store it that many times)

    For each footnote call in the main text, you call a perl routine that decides whether this is a footnote that is new on the page or one that has already been placed.
    If it is new, the result is a regular footnote call.
    If it is already on the page the result is a footnote ref call.

    How to decide if a footnote is already placed on this page?
    You keep a hash in which you store for each footnote id the last page on which it has been called and the last name that you used to call the footnote.
    You use the original footnote id as the key to that hash.
    If the key does not exist, you simply call the first footnote (so for footnote with id 1 this would be footnote 1.1)
    If the key does exist, you check the page number and compare it to the current %p4.
    If it is the same you emit a footnote ref macro to the last stored name in order to retrieve its number.
    If it is not the same, you emit a regular footnote call but increment the number after the dot, so call footnote 1.2
    And then you refresh the info in the hash, so you are ready for the next footnote call.

    I think something along these lines could work.
    One problem I do see though is that XPP always precomposes the next couple of lines at the end of a page in order to see where to actually break the page. This could disturb the accurate defining of the 'current' page number. But a few tests will quickly learn you if that is indeed a problem.

    Another obvious solution is to convince your customer that it is way better to use end notes :-)

    I wish you a happy implementation.
    Let us know how far you got with this idea...(should you decide that it makes sense)

    BTW: this reminds me of a wish the late Roger Jackson had: being able to create a pickup or footnote on the fly!
    Like that you would not have to decide upfront how many times you want to store a given footnote.
    Big item for the wishlist this year: finally give us the ability to create footnotes and pickups on the fly while executing the compose!
  • Hello Bart,

    Thanks for the response, I had a feeling that this wasn't part of the standard text-based footnote functionality.

    Similar functionality to what I'm looking for is in the XPP table notes macros - unfortunately the logic used to determine how to handle (and when to display) duplicates doesn't appear to be end-user readable.

    My first attempt may be a modification of the <foot> macro to include an ID that I can check for matches subsequent <foot> macros on the page and skip the rest of the normal extension if one is found on the page (same thought as the Perl version you mentioned above).

    I'll post back here if I get something working... or a follow up "How do I recover from [x, y, z]..." =)

    Kind regards
    Thomas