[[PageOutline(2-5,Contents,pullout)]] = Add footnotes to wiki = == Description == The FootNoteMacro automatically collates[[FootNote(Arranges in numerical order)]] and generates footnotes. Note:: There is an open ticket for integrating this feature to the Trac core, t:#9037. == Usage == To use it, simply call the FootNoteMacro with the footnote content[[FootNote(Any WikiFormatting can be used as content)]] 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. == Install/Configuration == The plugin follows the standard installation procedures described in t:TracPlugins. Here are some specifics and highlights. 1. **Install** globally with: {{{#!sh $ [sudo] easy_install http://trac-hacks.org/svn/footnotemacro/ }}} 1. **Enable** by updating TracIni file (..../trac.ini) as follows: {{{#!ini [components] footnotemacro.macro.* = enabled }}} 1. **Restart** web server on command line: {{{#!sh $ [sudo] /etc/init.d/apache2 restart }}} 1. **Test** if is it working properly (all your environments). == Bugs/Feature Requests == Existing bugs and feature requests for FootNoteMacro are [report:9?COMPONENT=FootNoteMacro here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=FootNoteMacro&owner=rjollos new ticket]. == Source & Download == You can check out !FootNoteMacro from [http://trac-hacks.org/svn/footnotemacro here] using Subversion, or [source:footnotemacro browse the source] with Trac. Download the zipped source from [download:footnotemacro here]. == Example == Here are the footnotes assembled from this page by using `[[FootNote]]`: [[FootNote]] ---- 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 !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]] == Recent Changes == [[ChangeLog(footnotemacro, 3)]] == Author/Contributors == '''Authors:''' [wiki:athomas athomas], [wiki:coderanger coderanger] [[BR]] '''Maintainer:''' [wiki:rjollos rjollos] [[BR]] '''Contributors:''' [wiki:JoshuaH JoshuaH]