Here are the functions of the module, which can be associated to levels (see ):

This functions initialize section counters.

This function applies the following rules:

Not documented yet.

]]>

is reduced to the current value of the counter associated to the given name.

This function uses the sectionning tags to rewrite the corresponding nodes.

... ... ...
]]>

This is used to insert sections and subsections, with a given title. The id, if given, will be associated to the section title node.

Default sectionning tags are, in this order, section, subsection, subsubsection, paragraph. You can specify other nodes:

  • for one document, using the "sectionning" attribute in the document, for example: ... will define "section", "subsection" and "paragraph" as sectionning nodes.
  • for all the site documents, using the "stog:sectionning" attribute in the main document (see ): ...

When a sectionning node is reduced, a node is created, so that refering to the section (or subsection, or ...), will use the title of the section (or subsection, or ...) for the produced link default text.

To prevent a sectionning node having a counter associated, you can use section-counter="false" in the document attribute, or stog:section-counter="false" in the main document. "section" can be replaced by "subsection" or any other node to prevent this node having a counter.

The function also applies the and rules.

This function collects all ids (the values attached to id="..." attributes) in all documents, so they can be referenced to in upper levels.

Having twice the same id in a document results in a warning.

This function applies the following rules: <doc>, <post>, <page> and <block>.

text]]>

This will return a link to the document specified by its path and optional fragment id. The path of a document is its absolute name from the root directoty of your project. You are not forced to give the full path, but can also give only one or more of the last parts of the path, as long as it uniquely identifies an existing document.

For example, suppose you want to refer to the document defined in file <root dir>/foo/bar/hello.html. The path of this document is "/foo/bar/hello.html". You can refer to it in various ways:

  • with its absolute path, providing the heading '/': /foo/bar/hello.html,
  • with only the last part of its path: hello.html,
  • with an ending subpart of its path: bar/hello.html.

In the last two cases, an error will be raised if more than one documents match the incomplete path. You can provide an additional attribute type to prevent ambiguities, for example:

]]>

The extension of the path can be omitted if there is no ambiguity with another document having the same path modulo its extension.

Refering to an unknown document will raise an error. If no path is given, <doc-path/> is used instead, i.e. the string associated to doc-path in the environment, to retrieve the current document path.

A node id can also be specified, like thisblock in href="blabla#thisblock". Refering to an unknown block id will raise an error.

If no text is given for the link, the title of the document will be used instead (or, if a node id is given, the title associated to the node id, if any). Specifying in attributes quotes="true" indicates to add quotes around the document title.

<page ...> and <post ... > are equivalent respectively to <doc type="page" ...> and <doc type="post" ...>.

The <block> rule in this function is not the same as base rule. In this function,

text

is used to refer to a block using the given href attribute. Here the href only contains an id, it is not of the form "path[#id]". This will be reduced to a link to the corresponding document, using the given text.

If the node matching the href was defined with the base rule (i.e. without href attribute), then the title associated to this node is used as text for the produced link, if no text was given ().

So,

is equivalent to

or

]]>

But the purpose of <block> rule is not to be used directly, but rather by defining other rules reducing to <block>, like environments in latex for figures, proofs, propositions, ...

Here is an example of definition of a function in a document definition:

</div> <div class="contents"><contents/></div> </div></block></theorem> <contents>...</contents> </article>]]></hcode> <p>This defines a new rule <ixml><theorem></ixml> used this way to define a new theorem:</p> <hxml><theorem id="thmain" title="Main result">...</theorem></hxml> <p>Elsewhere, this theorem can be referred to using</p> <hxml><theorem href="thmain"/></hxml> <p>which will be reduced to a link with "Theorem 1" as text, if this theorem was the first defined in the article. </p> <also-base-rules/> </section> </prepare-toc> </module>