Difference between revisions of "HypertWiki:W3tpl/lib/doc"

From HypertWiki
Jump to navigation Jump to search
m (testing noinclude behavior with load tag)
(NoteFoot)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>Does this get included by the load tag?</noinclude>
<noinclude>
To make use of functions in this library (in another page), you must first load it:
&lt;load page="{{FULLPAGENAME}}" local /&gt;
==AName(anchor)==
* '''Function''': AName
* '''Purpose''': emits an anchor tag -- &lt;a name="..."&gt;&lt;/a&gt; -- which can be used for footnotes but probably has other uses as well.
* '''Parameters''':
** '''anchor''' = name of anchor
* '''How to call''': &lt;call AName anchor=<u>name</u> /&gt;
</noinclude>
<func AName anchor>
<func AName anchor>
   <let name=tag chr=60 />
   <let name=tag-open chr=60 />
   <let name=tag append>a name="</let>
   <let name=tag-open append>a name="</let>
  <let name=tag append copy=anchor />
 
   <let name=tag append>" /</let>
   <let name=tag-shut>" /</let>
   <let name=tag append chr=62 />
   <let name=tag-shut append chr=62 />
   <let name=tag append chr=60 />
   <let name=tag-shut append chr=60 />
   <let name=tag append>/a</let>
   <let name=tag-shut append>/a</let>
   <let name=tag append chr=62 />
   <let name=tag-shut append chr=62 />
   <echo><get name=tag raw /></echo>
   <echo><get name=tag-open raw /><get name=anchor /><get name=tag-shut raw /></echo>
</func>
<noinclude>
==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:
*** '''&lt;a name="note-<u>key</u>"&gt;&lt;/a&gt;'''
</noinclude>
<func NoteFoot key>
  <let name=anchor>note-</let>
  <let name=anchor append copy=key />
  <echo>: '''<get name=key />.'''<call AName anchor=$anchor /> </echo>
</func>
</func>

Latest revision as of 12:11, 1 December 2008

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 />


> function aname() <= ()

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>


> function notefoot() <= ()