Table of contents
  1. 1. Template:Ref
  2. 2. Template:Note
  3. 3. Usage

To add footnotes to Deki pages, create two templates: Ref and Note.  The Ref template is used to add a reference to a footnote, while the Note template is used for the footnote itself.

Template:Ref

The HTML-source of this page contains the following code (example):

<small><sup class="plainlinksneverexpand" id="{{'ref_' .. $0}}">{{web.link('#endnote_' .. $0)}}</sup></small>

Template:Note

The HTML-source of this page contains the following code (example):

<cite id="{{'endnote_' .. $0}}">{{web.link("#ref_" .. $0,"^")}}</cite>

In stead of the symbol ^ (between quotation marks), indicating a hyperlink back to the text, one can use other characters, for instance .

Example 2 generates a footnote number, a dot and the arrow up:

<cite id="{{'endnote_' .. $0}}"></cite>{{web.link("#ref_" .. $0, $0 .. ". ↑")}}

Usage

Invocation of the templates looks as follows:

This is a text with a footnote marker{{template.Ref("1")}}.
{{template.Note("1")}} This is the description for the footnote.
You must login to post a comment.