HypertWiki:W3tpl/lib/doc
From HypertWiki
To make use of functions in this library (in another page), you must first load it:
<load page="HypertWiki:W3tpl/lib/doc" local />
AName(anchor)
- Function: AName
- Purpose: emits an anchor tag -- <a name="..."></a> -- which can be used for footnotes but probably has other uses as well.
- Parameters:
- anchor = name of anchor
- How to call: <call AName anchor=name />
<func AName anchor>
<let name=tag-open chr=60 /> <let name=tag-open append>a name="</let>
<let name=tag-shut>" /</let> <let name=tag-shut append chr=62 /> <let name=tag-shut append chr=60 /> <let name=tag-shut append>/a</let> <let name=tag-shut append chr=62 /> <echo><get name=tag-open raw /><get name=anchor /><get name=tag-shut raw /></echo>
</func>
NoteFoot(key)
- Function: NoteFoot
- Purpose: Emits a nicely-formatted footnote with an anchor tag so document text can link to it
- Parameters:
- key = key to the anchor; this value is displayed as is and prefixed with "note-" for the actual tag, thus:
- <a name="note-key"></a>
- key = key to the anchor; this value is displayed as is and prefixed with "note-" for the actual tag, thus:
<func NoteFoot key>
<let name=anchor>note-</let> <let name=anchor append copy=key /> <echo>: <get name=key />.<call AName anchor=$anchor /> </echo>
</func>