Item14147: Modernize FootNotePlugin

pencil
Priority: Enhancement
Current State: Being Worked On
Released In: n/a
Target Release:
Applies To: Extension
Component: FootNotePlugin
Branches: master
Reported By: GeorgeClark
Waiting For: GeorgeClark
Last Change By: FlorianSchlichting
FootNotePlugin is in need of a facelift.

  • It should use a "Registered Tag" and not depend upon the commonTagsHandler
  • It uses global which are not recommended in persistent perl environments.
  • It should use a template to add the footnotes to the page, not append text in a handler.
  • The {{ }} syntax is non-standard and conflicts with extensions using JSON data.
  • Older syntax and tags will be deprecated, but can be enabled in the configuration.

-- GeorgeClark - 17 Aug 2016

Syntax Rules

%FOOTNOTE{"footnote text" page="2" labelformat="i"}%

Write %FOOTNOTE{" the not text"}% anywhere in the 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.

Parameter: Description: Default:
"The note text" Footnote text that will be expanded at the end of the topic (or where requested). Prefixes any included topic/section.  
  f:text or l:text can be used as a shorthand for the label or labelformat options.  
page="reference" Added as a ", $page" to the printed footnote. Used to generate Ibid. notes. (Duplicate notes with identical note text will be replaced with ="Ibid.".)  
include="Web.Topic" The footnote will be taken from the identified Web.Topic following standard %INCLUDE% rules.  
section="somename" Includes only the specified named section, as defined in the included topic by the STARTSECTION{"name" type="section"} and ENDSECTION{"name" type="section"} macros. section="" is equivalent to not specifying a section  
warn="on|off|warning text" Warning text displayed if an include topic is not found. on displays a generic warning, off suppresses any warning. Empty footnotes will be discarded. on
labelformat="1|A|a|I|i|X|x" See below. 1
label="arbitrary text" Labels the footnote with arbitrary text instead of automatically numbering them.  
format="note format" Format of generated footnote: Expands $label, $text, $page and other FormatTokens. [$label] $text$page.

Do not embed footnotes in headings. That will break the heading in the %TOC%.

Footnote numbering

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.

Each format will maintain it's own sequence.

%FOOTNOTELIST{}%

Expand the list of footnotes. By default, a note will only be printed once,

Parameter: Description: Default:
print="labelformat" Notes of the identified labelformats are printed. 1AaIiXx
topic="Web.Topic" Prints footnotes extracted from the identified Web.Topic  


 
Topic revision: r3 - 12 Dec 2016, FlorianSchlichting
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy