<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="generator" content="hevea 2.09"> <meta name="Author" content="Luc Maranget"><link rel="stylesheet" type="text/css" href="manual.css"> <title>Sectioning</title> </head> <body> <a href="manual025.html"><img src="previous_motif.gif" alt="Previous"></a> <a href="manual022.html"><img src="contents_motif.gif" alt="Up"></a> <a href="manual027.html"><img src="next_motif.gif" alt="Next"></a> <hr> <h2 class="section" id="sec113">B.4  Sectioning</h2> <ul> <li><a href="sectioning.html#section%3Asection">Sectioning Commands</a> </li><li><a href="sectioning.html#appendix">The Appendix</a> </li><li><a href="sectioning.html#sec116">Table of Contents</a> </li><li><a href="sectioning.html#sec117">Use H<span class="c015"><sup>A</sup></span>C<span class="c015"><sup>H</sup></span>A</a> </li></ul> <h3 class="subsection" id="section:section">B.4.1  Sectioning Commands</h3> <p> Sectioning commands from <code>\part</code> down to <code>\subparagraph</code> are defined in base style files. They accept an optional argument and have starred versions.</p><p>The non-starred sectioning commands from <code>\part</code> down to <code>\subsubsection</code> show section numbers in sectional unit headings, provided their <span class="c018">level</span> is greater than or equal to the current value of the <code>secnumdepth</code> counter. Sectional unit levels and the default value of the <code>secnumdepth</code> counter are the same as in L<sup>A</sup>T<sub>E</sub>X. Furthermore, given a sectional unit <span class="c018">secname</span>, the counter <span class="c018">secname</span> exists and the appearance of sectional units numbers can be changed by redefining <code>\the</code><span class="c018">secname</span>. For instance, the following redefinition turn the numbering of chapters into alphabetic (uppercase) style: </p><pre class="verbatim">\renewcommand{\thechapter}{\Alph{chapter}} </pre><p><a id="hevea_default153"></a>When jumping to anchors, browsers put the targeted line on top of display. As a consequence, in the following code: </p><pre class="verbatim">\section{A section} \label{section:section} ... See Section~\ref{section:section} </pre><p>Clicking on the link produced by <code>\ref{section:section}</code> will result in <em>not</em> displaying the targeted section title. A fix is writing: </p><pre class="verbatim">\section{\label{section:section}A section} ... See Section~\ref{section:section} </pre><p>Starting with version 2.04, H<span class="c015"><sup>E</sup></span>V<span class="c015"><sup>E</sup></span>A and H<span class="c015"><sup>A</sup></span>C<span class="c015"><sup>H</sup></span>A will use the label name (<code>section:section</code> above) for the table of contents they generate. For instance, the source code for the next sectioning command just below is: </p><pre class="verbatim">\subsection{The \label{appendix}Appendix} </pre><p>As a consequence, the link to the next section on top of this page should read as: </p><pre class="verbatim"><a href="sectioning.html#appendix">The Appendix</a> </pre><p>That is, H<span class="c015"><sup>E</sup></span>V<span class="c015"><sup>E</sup></span>A used the label name given in source as an anchor. Notice that this behaviour applies to the <code>\label</code> command that occurs first in the sectioning command argument.</p> <h3 class="subsection" id="appendix">B.4.2  The Appendix</h3> <p> The <code>\appendix</code> command exists and should work as in L<sup>A</sup>T<sub>E</sub>X.</p> <h3 class="subsection" id="sec116">B.4.3  Table of Contents</h3> <p> <a id="hevea_default154"></a><a id="hevea_default155"></a>H<span class="c015"><sup>E</sup></span>V<span class="c015"><sup>E</sup></span>A now generates a table of contents, using a procedure similar to the one of L<sup>A</sup>T<sub>E</sub>X(a <span class="c013">.htoc</span> file is involved). One inserts this table of contents in the main document by issuing the command <code>\tableofcontents</code>. Table of contents is controlled by the counter <code>tocdepth</code>. By default, the table of contents shows sectioning units down to the subsubsection level in <span class="c018">article</span> style and down to the subsection level in <span class="c018">book</span> (or <span class="c018">report</span>) style. To include more or less sectioning units in the table of contents, one should increase or decrease the <code>tocdepth</code> counter. It is important to notice that H<span class="c015"><sup>E</sup></span>V<span class="c015"><sup>E</sup></span>A produces such a table of contents, only when it has total control over cross-references. More precisely, H<span class="c015"><sup>E</sup></span>V<span class="c015"><sup>E</sup></span>A cannot produce the table of contents when it reads L<sup>A</sup>T<sub>E</sub>X-produced <span class="c013">.aux</span> files. Instead, it should read its own <span class="c013">.haux</span> files. This will naturally occur if no <span class="c013">.aux</span> files are present, otherwise these <span class="c013">.aux</span> files should be deleted, or H<span class="c015"><sup>E</sup></span>V<span class="c015"><sup>E</sup></span>A should be instructed not to read them with the command-line option <a id="hevea_default156"></a><span class="c013">-fix</span> (see Sections <a href="manual033.html#files">B.11.1</a> and  <a href="manual041.html#heveaoptions">C.1.1.4</a>).</p><p>One can also add extra entries in the table of contents by using the command <code>\addcontentslines</code>, in a way similar to L<sup>A</sup>T<sub>E</sub>X homonymous command. However, hyperlinks need to be introduced explicitly, as in the following example, where an anchor is defined in the section title and referred to in the argument to <code>\addcontentsline</code>: </p><pre class="verbatim">\subsection*{\aname{no:number}{Use \hacha{}}} \addcontentsline{toc}{subsection}{\ahrefloc{no:number}{Use \hacha{}}} </pre><p>(See Section <a href="manual018.html#hyperlink">8.1.1</a> for details on commands related to hyperlinks.)</p><p>There is no list of figures nor list of tables.</p><h3 class="subsection" id="sec117"><a id="no:number">Use H<span class="c015"><sup>A</sup></span>C<span class="c015"><sup>H</sup></span>A</a></h3> <p> However, H<span class="c015"><sup>E</sup></span>V<span class="c015"><sup>E</sup></span>A has a more sophisticated way of producing a kind of map w.r.t. the sectioning of the document. A later run of H<span class="c015"><sup>A</sup></span>C<span class="c015"><sup>H</sup></span>A on H<span class="c015"><sup>E</sup></span>V<span class="c015"><sup>E</sup></span>A output file splits it in smaller files organized in a tree whose nodes are tables of links. By contrast with L<sup>A</sup>T<sub>E</sub>X, starred sectioning commands generate entries in these tables of contents. Table of contents entries hold the optional argument to sectioning commands or their argument when there is no optional argument. Section <a href="cutname.html#hacha">7</a> explains how to control H<span class="c015"><sup>A</sup></span>C<span class="c015"><sup>H</sup></span>A.</p> <hr> <a href="manual025.html"><img src="previous_motif.gif" alt="Previous"></a> <a href="manual022.html"><img src="contents_motif.gif" alt="Up"></a> <a href="manual027.html"><img src="next_motif.gif" alt="Next"></a> </body> </html>