Commits

Geoffrey Sneddon  committed 58b1dce

Define outline/section/section heading.

  • Participants
  • Parent commits 98d1c30

Comments (0)

Files changed (2)

 
 <h3 id=table-of-contents/section-numbering><span class=secno>4.2 </span>Table of contents/section numbering</h3>
 
-<p>To create a table of contents, and to number the <span title=section>sections</span> of the document, an <span>outline</span> is
-created. This means not only are the <code>h1</code>–<code>h6</code> elements
-supported, but also elements such as <code title="">section</code> are used to
-create the <span>outline</span>. After creating the <span>outline</span>, every
-<span>section</span> with a depth between those provided by
-<dfn id=min-depth><code>--min-depth</code></dfn> and <dfn id=max-depth><code>--max-depth</code></dfn>
-(defaulting to two and six respectively), and which has a <span title="section
-heading">heading</span>, is numbered if it does not have <code>no-num</code> as
-a class, and is added to the table of contents if it does not have
-<code>no-toc</code> as a class. <span title=section>Sections</span> without a
-<span title="section heading">heading</span> are treated as if they didn't
-exist, unless they have children, in which they will appear to exist while not
-existing all at once (e.g., they increment the <span>section</span> numbering,
-though that is not output anywhere; and they get a list item in the table of
-contents, with only the children within it, and no link to the
-<span>section</span> itself).</p>
+<p>To create a table of contents, and to number the <a href=#section title=section>sections</a> of the document, an <dfn id=outline>outline</dfn> is
+created (this is a list of <a href=#section title=section>sections</a>, which can each
+contain more <a href=#section title=section>sections</a>, where a <dfn id=section>section</dfn>
+represents a part of the document, and often has a <dfn id=section-heading title="section
+heading">heading</dfn> associated with it — for more detailed definitions see
+<a>HTML 5</a>). This means not only are the <code>h1</code>–<code>h6</code>
+elements supported, but also elements such as <code title="">section</code> are
+used to create the <a href=#outline>outline</a>. After creating the
+<a href=#outline>outline</a>, every <a href=#section>section</a> with a depth between those
+provided by <dfn id=min-depth><code>--min-depth</code></dfn> and
+<dfn id=max-depth><code>--max-depth</code></dfn> (defaulting to two and six respectively),
+and which has a <a href=#section-heading title="section heading">heading</a>, is numbered if it
+does not have <code>no-num</code> as a class, and is added to the table of
+contents if it does not have <code>no-toc</code> as a class. <a href=#section title=section>Sections</a> without a <a href=#section-heading title="section
+heading">heading</a> are treated as if they didn't exist, unless they have
+children, in which they will appear to exist while not existing all at once
+(e.g., they increment the <a href=#section>section</a> numbering, though that is not
+output anywhere; and they get a list item in the table of contents, with only
+the children within it, and no link to the <a href=#section>section</a> itself).</p>
 
-<p>The format of <span>section</span> numbers should comply with <a>ISO
+<p>The format of <a href=#section>section</a> numbers should comply with <a>ISO
 2145:1978</a>, Numbering of divisions and subdivisions in written documents.
-This means that each <span>section</span> number is given by Arabic numerals,
+This means that each <a href=#section>section</a> number is given by Arabic numerals,
 seperated by a single U+002E FULL STOP character, and there is no trailing
 U+002E FULL STOP character.</p>
 
-<p>The <span>section</span> number is inserted as the first child node of the
-<span>section heading</span> as a <code>span</code> element with the
+<p>The <a href=#section>section</a> number is inserted as the first child node of the
+<a href=#section-heading>section heading</a> as a <code>span</code> element with the
 <code>class</code> attribute set to <code>secno</code>: this is copied into the
 table of contents.</p>
 
 <p>Pre-existing <code>span</code> elements with a class of <code>secno</code>
-are removed from all <span title="section heading">section headings</span>,
+are removed from all <a href=#section-heading title="section heading">section headings</a>,
 regardless of whether their depth falls within the range given by
 <a href=#min-depth><code>--min-depth</code></a> and <a href=#max-depth><code>--max-depth</code></a>.</p>
 
 <p>The table of contents is built up as an ordered list (an <code>ol</code>
-element), with each <span>section</span> marked up as a <code>li</code> element,
-and child <span title=section>sections</span> are marked up with an
+element), with each <a href=#section>section</a> marked up as a <code>li</code> element,
+and child <a href=#section title=section>sections</a> are marked up with an
 <code>ol</code> within that <code>li</code> (and this continues recursively, ad
 infinitum). By default, the root element of the table of contents (an
 <code>ol</code> element) is given a <code>class</code> attribute set to
 <code>toc</code>; however, with the
 <dfn id=w3c-compat-class-toc><code>--w3c-compat-class-toc</code></dfn> option this is placed on every
-<code>ol</code> within the table of contents. The entire <span>section
-heading</span> is copied to be the content of the list item, with all
+<code>ol</code> within the table of contents. The entire <a href=#section-heading>section
+heading</a> is copied to be the content of the list item, with all
 <code>a</code>, and <code>dfn</code> elements and <code>id</code> attributes
 removed.</p>
 

File README.src.html

 <h3>Table of contents/section numbering</h3>
 
 <p>To create a table of contents, and to number the <span
-title="section">sections</span> of the document, an <span>outline</span> is
-created. This means not only are the <code>h1</code>–<code>h6</code> elements
-supported, but also elements such as <code title="">section</code> are used to
-create the <span>outline</span>. After creating the <span>outline</span>, every
-<span>section</span> with a depth between those provided by
-<dfn><code>--min-depth</code></dfn> and <dfn><code>--max-depth</code></dfn>
-(defaulting to two and six respectively), and which has a <span title="section
-heading">heading</span>, is numbered if it does not have <code>no-num</code> as
-a class, and is added to the table of contents if it does not have
-<code>no-toc</code> as a class. <span title="section">Sections</span> without a
-<span title="section heading">heading</span> are treated as if they didn't
-exist, unless they have children, in which they will appear to exist while not
-existing all at once (e.g., they increment the <span>section</span> numbering,
-though that is not output anywhere; and they get a list item in the table of
-contents, with only the children within it, and no link to the
-<span>section</span> itself).</p>
+title="section">sections</span> of the document, an <dfn>outline</dfn> is
+created (this is a list of <span title="section">sections</span>, which can each
+contain more <span title="section">sections</span>, where a <dfn>section</dfn>
+represents a part of the document, and often has a <dfn title="section
+heading">heading</dfn> associated with it — for more detailed definitions see
+<a>HTML 5</a>). This means not only are the <code>h1</code>–<code>h6</code>
+elements supported, but also elements such as <code title="">section</code> are
+used to create the <span>outline</span>. After creating the
+<span>outline</span>, every <span>section</span> with a depth between those
+provided by <dfn><code>--min-depth</code></dfn> and
+<dfn><code>--max-depth</code></dfn> (defaulting to two and six respectively),
+and which has a <span title="section heading">heading</span>, is numbered if it
+does not have <code>no-num</code> as a class, and is added to the table of
+contents if it does not have <code>no-toc</code> as a class. <span
+title="section">Sections</span> without a <span title="section
+heading">heading</span> are treated as if they didn't exist, unless they have
+children, in which they will appear to exist while not existing all at once
+(e.g., they increment the <span>section</span> numbering, though that is not
+output anywhere; and they get a list item in the table of contents, with only
+the children within it, and no link to the <span>section</span> itself).</p>
 
 <p>The format of <span>section</span> numbers should comply with <a>ISO
 2145:1978</a>, Numbering of divisions and subdivisions in written documents.