Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Footnotes in Harlowe?

Is it possible (and if so: how?) to have footnotes in Harlowe? I can't seem to find anything on that in the forum or on the internet at large. Any ideas on how to make that work are very welcome.

Comments

  • I believe the concept of Footnotes can be broken down into two parts, the storage of the different footnotes for each of the relevant passages, and the displaying of said footnotes. The following is a basic example of one possible method of storing and displaying footnotes.

    note: the following examples will consist of four passages: Startup, Show Footnote, Start, and Next Passage.

    A. Storage:
    You could store the footnotes within a (datamap:), using the Name of the Passage you want the footnotes to be display on as the name part of each name/value pair within the datamap. The datamap should be initialized with your stories startup tagged special passage, if you don't have one these special passages yet then simply create a new passage, name it whatever you wish (I generally name mine Startup), assign the new passage a tag of startup (all lowercase) and place the following in it.

    Startup passage:
    (set: $footnotes to (datamap: "Start", "Start's footnotes", "Next Passage", "NP's footnotes"))
    
    ... as you can see each name/value pair consists of the Name of the Passage I want to display a footnote for, and the footnotes I want displayed for that passage. The value of each footnote in my example is a simple string but that could be replaced with a more complex datatype like an (array:).

    B. Displaying a Passage's footnote(s):
    You can use a footer tagged special passage to display a Passage's footnotes at the bottom of the current page. To do this you would first need to determine what Passage is current being displayed using the (passage:) macro, then check if there are any footnotes for the current passage using the (datanames:) macro.

    1. Show Footnote passage
    Create a new passage named Show Footnote, assign it a footer tag (all lowercase), and add the following to it:
    (set: $current to (passage:)'s name)(if: (datanames: $footnotes) contains $current)[<hr>footnotes: (print: $footnotes's $current)]
    

    Because this is a simple example the marking of the related key word's position in the passage text will be done manually, as shown in the following two passages.

    2. Start passage:
    This page should be displaying footnotes**
    
    [[Next Passage]]
    

    3. Next Passage passage:
    This page should be displaying footnotes**, they should be different to the ones display for the previous passage.
    
  • Alternatively consider coding them into the passage directly using an abbr tag:
    <abbr title="footnote text goes here.">footnote</abbr>
    

    Misusing a tag that meant to expand abbreviations I know, but it could be quicker...
Sign In or Register to comment.