%META:TOPICINFO{author="IanBygrave" date="1220215933" format="1.1" version="1.15"}%
---+!! <nop>%TOPIC%

Footnotes are notes placed at the end of a topic.

%TOC%

---++ Syntax Rules

Write ={<nop>{= _note text_ =}<nop>}= anywhere in a TWiki topic.
This will be replaced with a link to the note at the end of the topic.
The footnote has a link back to the text where it was inserted.

Write ={<nop>{f:= _note text_ =}<nop>}= to use label format =f= instead
of the default numerical footnote labeling.
Available formats are:
   * =1= : Arabic numerals
   * =A= , =a= : Upper- or Lower-case letters
   * =I= , =i= : Upper- or Lower-case roman numerals
   * =X= , =x= : Upper- or Lower-case hexadecimal numbers.

Write ={<nop>{l::= _note text_ =}<nop>}= to use the label =l=
instead of automatic numbering.
Valid labels may be any length and contain alphanumeric characters,
but must not include spaces.

=%<nop>FOOTNOTELIST%= will be replaced by the notes so far on the page.

=%<nop>FOOTNOTE{LIST="Web.Topic"}%= will be replaced by the notes from an =%<nop>INCLUDE%= ed page.

=%<nop>STARTFOOTNOTE{LABEL="l" LABELFORMAT="f"}%= _note text_ =%<nop>ENDFOOTNOTE%= may also be used instead of ={<nop>{= _note text_ =}<nop>}=

Do not embed footnotes in headings. That will break the heading in the =%<nop>TOC%=.

---++ Examples

   * You type:
      * ==Tim Berners-Lee{<nop>{Tim Berners-Lee is now director of the World Wide Web Consortium, and Professor of Computer Science at Southampton ECS.}} invented the World Wide Web.==
   * If the plugin is installed you get:
      * Tim Berners-Lee<sup>[[#EndNote1a][(1)]]</sup> invented the World Wide Web.
   * And this at the end of the page:
      * <a name="#FootNote1a"></a> *1:* Tim Berners-Lee is now director of the World Wide Web Consortium, and Professor of Computer Science at Southampton ECS.
   * Actual example, it renders properly if the Plugin is installed and enabled:
      * Tim Berners-Lee{{Tim Berners-Lee is now director of the World Wide Web Consortium, and Professor of Computer Science at Southampton ECS.}} invented the World Wide Web.

---++ Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, i.e. ==%<nop>NEWPLUGIN_SHORTDESCRIPTION%==

   * One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic:
      * Set SHORTDESCRIPTION = Footnotes are notes placed at the end of a topic.

   * Default label numbering format - sitewide (here), per web (in WebPreferences) or per topic.
      * Set FOOTNOTELABELFORMAT = 1

   * Debug plugin: (See output in =data/debug.txt=)
      * Set DEBUG = 0

   * Heading 
      * Set HEADER = Notes
      * Set FOOTER = ---

   * Full URL of the CSS to use to format footnotes.
      * Set CSS = %PUBURL%/%TWIKIWEB%/FootNotePlugin/styles.css

---++ Plugin Installation Instructions

__Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server. 

   * Download the ZIP file from the Plugin web (see below)
   * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
     | *File:* | *Description:* |
     | ==data/TWiki/%TOPIC%.txt== | Plugin topic |
     | ==data/TWiki/%TOPIC%.txt,v== | Plugin topic repository |
     | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
     | ==lib/TWiki/Plugins/%TOPIC%/Note.pm== |^|
     | ==lib/TWiki/Plugins/%TOPIC%/LabelFormat.pm== |^|
     | ==pub/TWiki/%TOPIC%/styles.css== | CSS |
   * Configure the Plugin:
      * TWiki 4.0 and up: Run the [[%SCRIPTURL%/configure%SCRIPTSUFFIX%][configure]] script to enable the Plugin
      * Change the Plugin settings as needed
   * Test if the installation was successful:
      * See example above.

---++ Plugin Info

|  Plugin Author: | TWiki:Main.IanBygrave |
|  Copyright: | &copy; 2006, TWiki:Main.IanBygrave |
|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
|  Plugin Version: | 31 Aug 2008 (V2.008) |
|  Change History: | <!-- versions below in reverse order -->&nbsp; |
|  31 Aug 2008: | Label formats are a single character, so don't interpret footnotes like ={<nop>{http://www.perlmonks.org/}<nop>}= as asking for the non-existant label format *http*. %BR% Implement hex label formats. |
|  24 Aug 2008: | Configurable label numbering formats. |
|   4 May 2008: | CSS |
|  29 Apr 2008: | Fix quoting of text in title attributes of footnote links. Fixes a bug found by TWiki:Main.MaxPar. |
|  27 Apr 2008: | Fix conflict with TWiki:Plugins.LatexModePlugin reported by TWiki:Main.TonyLiu. |
|  25 Apr 2008: | Put footnote link in parens. |
|  25 Apr 2008: | Show footnotes in tooltips. |
|   6 Feb 2008: | Render notes in page order on pages using lots of =%<nop>INCLUDE%= |
|  24 May 2007: | Replace compatibility with pre-dakar. %BR% Seperately number identical footnotes. %BR% Sort footnotes. |
|  30 Apr 2007: | Better way of getting footnotes at the end of the page. |
|  10 Jan 2007: | Repair old =%<nop>FOOTNOTE{...}%= markup. |
|  05 Jan 2007: | Reset notes at plugin initialisation. Fixes a bug found by TWiki:Main.StefanieWrobel. |
|  05 Dec 2006: | Allow line breaks in footnotes. New =%<nop>STARTFOOTNOTE{}% %<nop>ENDFOOTNOTE%= markup. |
|  05 Dec 2006: | Renamed to FootNotePlugin |
|  05 Jun 2006: | Initial version was called <nop>EndNotePlugin |
|  TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 |
|  CPAN Dependencies: | Roman _optional_ |
|  Other Dependencies: | none |
|  Perl Version: | 5.005 |
|  [[TWiki:Plugins/Benchmark][Benchmarks]]: | %TWIKIWEB%.GoodStyle 99%, %TWIKIWEB%.FormattedSearch 99%, %TOPIC% 98% |
|  Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% |
|  Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev |
|  Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal |

__Related Topics:__ %TWIKIWEB%.TWikiPlugins, %TWIKIWEB%.DeveloperDocumentationCategory, %TWIKIWEB%.AdminDocumentationCategory, %TWIKIWEB%.TWikiPreferences

-- Main.IanBygrave - 05 Dec 2006

%META:FILEATTACHMENT{name="styles.css" attr="" autoattached="1" comment="" date="1219573714" path="styles.css" size="150" user="Main.IanBygrave" version="2"}%
%META:FILEATTACHMENT{name="FootNotePlugin.zip" attr="" autoattached="1" comment="" date="1219560896" path="FootNotePlugin.zip" size="12998" user="Main.IanBygrave" version="7"}%
