wiki:FootNoteMacro

Add footnotes to wiki page

Description

The FootNoteMacro automatically collates1 and generates footnotes from a Trac wiki page and displays them at the bottom of the page.

To use it, simply call the FootNoteMacro with the footnote content2 as the only argument to the macro:

[[FootNote(This is a footnote)]]

Footnotes are numbered by the order in which they appear.

To create a reference to an existing footnote, pass the footnote number as the only argument to the macro:

[[FootNote(1)]]

In addition, identical footnotes are coalesced into one entry. The following will generate one footnote entry with two references:

Some text[[FootNote(A footnote)]] and some more text [[FootNote(A footnote)]].

[[FootNote]]

And finally, to display a list of foot-notes call the macro with no arguments:

[[FootNote]]

Once a set of footnotes has been displayed by the use of [[FootNote]] macro, a complete new set of footnotes can be created. This allows multiple sets of footnotes per page.

See below for more examples.

Note: There is an open ticket for integrating this feature to the Trac core, t:#9037.

Bugs/Feature Requests

Existing bugs and feature requests for FootNoteMacro are here.

If you have any issues, create a new ticket.

defect

11 / 13

enhancement

2 / 5

task

3 / 3

Download

Download the zipped source from here.

Source

You can check out FootNoteMacro from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page. Here are some specifics and highlights:

  1. Install globally with:
    $ [sudo] pip install svn+https://trac-hacks.org/svn/footnotemacro/
    
  2. Enable this plugin by updating TracIni file (../conf/trac.ini) as follows:
    [components]
    footnotemacro.macro.* = enabled
    
  3. Restart web server on command line:
    $ [sudo] /etc/init.d/apache2 restart
    
  4. Test if is it working properly and on all your environments.

Example

Here are the footnotes assembled from this page by using [[FootNote]]:


  1. 1. Arranges in numerical order
  2. 2. Any WikiFormatting can be used as content


Here is some wiki markup that will exercise all the functionality of the macro.

Testing out the !FootNoteMacro[[FootNote(Here is the first footnote)]].
This will be a good test to exercise all of its
functionality[[FootNote(Here is the second footnote)]].
And now I'll add an identical footnote and refer to the first footnote
again[[FootNote(Here is the second footnote)]][[FootNote(1)]].

[[FootNote]]

Now that I've called the !FootNoteMacro to print all the footnotes
[[FootNote(I did that in the paragraph above)]], I should be able to
generate more
footnotes[[FootNote(It would be really cool if this feature was integrated into the Trac core)]]
and print just the one that have been generated since the start of the second paragraph.
Just for good measure I'll try referring to some footnotes in the first paragraph
again[[FootNote(1)]][[FootNote(Here is the second footnote)]].

[[FootNote]]

Testing out the FootNoteMacro3. This will be a good test to exercise all of its functionality4. And now I'll add an identical footnote and refer to the first footnote again41.


  1. 3. Here is the first footnote
  2. 4. Here is the second footnote

Now that I've called the FootNoteMacro to print all the footnotes 5, I should be able to generate more footnotes6 and print just the one that have been generated since the start of the second paragraph. Just for good measure I'll try referring to some footnotes in the first paragraph again14.


  1. 5. I did that in the paragraph above
  2. 6. It would be really cool if this feature was integrated into the Trac core

Recent Changes

18152 by Cinc-th on 2021-04-04 18:59:18
FootNoteMacro: minor Python 3 fix. Bumped version to 1.6.1. Added more classifiers to setup.py.

Testing indicates that the plugin works with Trac 1.5/Trac 1.6.

16604 by rjollos on 2017-05-22 04:08:35
TracFootNoteMacro 1.6: Change package name
16395 by rjollos on 2017-03-25 09:25:02
Remove obsolete "0.8" directories
(more)

Author/Contributors

Authors: athomas, coderanger
Maintainer: Ryan J Ollos
Contributors: JoshuaH

Last modified 5 years ago Last modified on Sep 23, 2019, 4:51:17 PM