Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

FootnotesExtended

Summary: A footnote recipe with extended referencing possibilities
Version: 2007-09-24
Prerequisites:
Status: stable, maintained
Maintainer: ThomasP
Categories: Markup

Motivation

This recipe extends the functionality of the Footnotes recipe. It is here possible to have the footnote text separated from the reference, which allows larger footnote texts and easy multiple referencing of the same footnote text.

Usage

Copy footnotes_extended.phpΔ to your cookbook directory and have the usual

  include_once("cookbook/footnotes_extended.php");

in your local config.php. The following markup will be enabled:

  • [^#anchorname^]
    Place a reference to the footnote named with the given anchor name. (Can be placed multiple times.)
  • [^#anchorname My footnote text.^]
    Definition of the footnote text belonging to the given anchor name. (Usually succeeding the reference(s).) If however this markup precedes any references with the specified anchor, it is understood as a reference with an inline definition of the footnote text.
  • [^My footnote text belonging to an unnamed footnote.^]
    Present footnote markup style works as before.
  • [^#^]
    Print a list of all footnote texts.

Example

In my small[^This is relative of course.^] text, I explain how to use the new markups[^#xxx^]
coming with this recipe[^#xxx^].

[^#xxx These objects are the most emphasized words in this sentence.^]

[^#^]

This will produce something like:

In my small1 text, I explain how to use the new markups2 coming with this recipe2.

1 This is relative of course.
2 These objects are the most emphasized words in this sentence.

Release Notes

  • 1.0 (2007-09-23): initial release
  • 1.1 (2007-09-24): escaped double quotes issue corrected

See Also

Contributors

Comments

Just an observation that embedding a link inside the Footnote text works normally in the Simple Footnote, but is not processed by the Extended Footnote and simply appears in full as text, complete with its double square brackets. Des October 07, 2007, at 05:28 PM

I had tried the recipe earlier, but found that placing a reference to a separated footnote named with an anchor name produced an 'anchor not found' message in the rendered text, rather than a superscripted reference. A quick fix was found by adding an additional # to the anchor in the body text, using [^##anchor^] instead of [^#anchor^] Des November 24, 2007, at 12:24 AM

Edit - History - Print - Recent Changes - Search
Page last modified on September 06, 2008, at 03:24 PM