diff --git a/docs/html.rst b/docs/html.rst index bccc2a783e9b4eae8e87231640f6d85385603a6b..7339765e71a8904dec633c983d6c9781372406e9 100644 --- a/docs/html.rst +++ b/docs/html.rst @@ -139,6 +139,40 @@ Custom stylesheets will generally be able to resolve ``textgrid:`` URIs using fu - *ID* might be an ``xml:id``. If this is passed, your stylesheet should *only* render the XML fragment with the given ID. +Generating a Table of Contents +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can also only generate a table of contents instead of a full HTML document. + ++--------------------------+--------------------------+---------------------------+ +| parameter | value | description | ++==========================+==========================+===========================+ +| **toc** | string | If given, generate a table| +| | | of contents instead of a | +| | | full HTML document | ++--------------------------+--------------------------+---------------------------+ + +Currently, the value of the ``toc`` argument is ignored. If it is present with any value, an XHTML *fragment* will be generated that contains a table of contents for the current document as a list of local links. Example:: + + <?xml version="1.0" encoding="UTF-8"?> + <ul xmlns="http://www.w3.org/1999/xhtml" class="toc"> + <li> + <a href="#tg4.jmzc.0">Auf das schöne Geschlecht</a> + <ul/> + </li> + <li> + <a href="#tg5.jmxf.0">Auf Amorn</a> + <ul/> + </li> + <!-- You see the point ... --> + <li> + <a href="#tg19.jmxp.0">[Venus, die die Göttinnen beherrschet]</a> + <ul/> + </li> + </ul> + +There will probably more options, and the HTML will probably be a little tidied up (empty ``<ul/>`` removed etc.). + Other options ^^^^^^^^^^^^^