Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Provide support for footnotes and intra-page cross-references.


Attach:footnotes.php - PHP code - PHP code fixed for PmWiki 0.6.9

Adds the following markup to PmWiki/PmWiki:

  [^this is the text of a footnote^] gets replaced by a numeric superscript

  [^#^] inserts the footnote texts, numbered sequentially

  [^#anchor^] looks for [[#anchor]] on the current page and copies the text
  from there to the end of the paragraph into the [^...^] position


Add the line include_once("local/footnotes.php"); in the local.php file.

For example[^here is a footnote^].

The intra-page cross-reference variant is useful on FAQ pages. Use it as follows:

  • write Q:[[#q1]]text of question 1, and so on
  • write [[ThisPage#q1]] [^#q1^] at the top of the page
    • this will display as [1] text of question 1
  • if the questions contain no wiki markup, write
    # [[#q1 [^#q1^]]]
    • this will display text of question 1 as a link

To see an example of intra-page links, visit It uses an experimental version of the footnotes script to generate a page table of contents.

There are no footnotes in this example


It does not work if you use base <href='[(approve links) edit diff]'> in the HEAD section of the page. The Links are all broken.

I had to change the line

  $HTMLHeaderFmt .= "<style type = 'text/css'>


  $HTMLHeaderFmt[] = "<style type = 'text/css'>

to get it to work with PmWiki 0.6.9 (and sanitised all the double backslashes) - Phil Randal, March 17, 2004

Revision History

  • Released 19 August 2003
  • Fixed for PmWiki 0.6.9 17 March 2004

See Also

  • IncludePara


  • John Rankin
  • Phil Randal

[^#^] here becomes:

  1. here is a footnote

pmwiki-2.2.113 -- Last modified by {{jr}}

from IP: ip should be disabled by default for security reasons