diff --git a/xdoc/src/plugin-resources/site.jsl b/xdoc/src/plugin-resources/site.jsl index ffa28c46..4adfed34 100644 --- a/xdoc/src/plugin-resources/site.jsl +++ b/xdoc/src/plugin-resources/site.jsl @@ -453,7 +453,8 @@
- + + @@ -473,11 +474,18 @@ - - - -

${_sectionName}

+ + + + + + + + +
+
+

${_sectionName}

@@ -485,7 +493,8 @@
- + + @@ -504,12 +513,19 @@ - - - - -

${_sectionName}

+ + + + + + + + + +
+ +

${_sectionName}

diff --git a/xdoc/xdocs/changes.xml b/xdoc/xdocs/changes.xml index 9919e619..68d3c5b8 100644 --- a/xdoc/xdocs/changes.xml +++ b/xdoc/xdocs/changes.xml @@ -27,6 +27,7 @@ + Add an optional id tag to sub/sections, so they can be referenced. Add a property to override navigation.xml. Show organization in header even if logo not set. Ampersands in navigation.xml being escaped twice. diff --git a/xdoc/xdocs/index.xml b/xdoc/xdocs/index.xml index 7a681447..f1aae2b4 100644 --- a/xdoc/xdocs/index.xml +++ b/xdoc/xdocs/index.xml @@ -74,6 +74,47 @@

XDoc automatically adds the "External Link" icon and tooltip to links referring to external sites (actually, any absolute url).

+ +

+ From version 1.10 on, the xdoc plugin + allows for an optional id tag in the section + and subsection elements: +

+ + + +]]> +

+ An anchor is constructed from each id tag, + so you can reference sections and subsections from other source + documents. Note that each id tag has to be unique + within one source document. +

+

+ In previous versions of the plugin, an id tag + was constructed from section/subsection names, replacing special + characters by underscores. For backwards compatibility reasons, + we keep this behaviour, i.e., if no id tag + is present, an anchor is constructed from the name tag. + Note that this presents two shortcomings: +

+
    +
  • + If two sections or subsections have identical names + (within one source document), you will get an ambiguity when + referencing them. Also the resulting html document will not be + valid XHTML. +
  • +
  • + For long section titles, this leads to rather + cumbersome anchor names. +
  • +
+

+ We recommend that you provide an id tag if you + want to reference a section or subsection. +

+