1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="generator" content="hevea 2.36">
<meta name="Author" content="Luc Maranget">
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script><link rel="stylesheet" type="text/css" href="manual.css">
<title>Sectioning</title>
</head>
<body>
<a href="manual025.html"><img src="previous_motif.svg" alt="Previous"></a>
<a href="manual022.html"><img src="contents_motif.svg" alt="Up"></a>
<a href="manual027.html"><img src="next_motif.svg" alt="Next"></a>
<hr>
<h2 class="section" id="sec114">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#sec117">Table of Contents</a>
</li><li><a href="sectioning.html#sec118">Use H<span class="c020"><sup>A</sup></span>C<span class="c020"><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 class="verb">\part</code> down to
<code class="verb">\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 class="verb">\part</code> down to
<code class="verb">\subsubsection</code> show section numbers in sectional unit headings,
provided their <span class="c023">level</span> is greater than or equal to the current
value of the <code class="verb">secnumdepth</code> counter.
Sectional unit levels and the default value of the <code class="verb">secnumdepth</code> counter
are the same as in L<sup>A</sup>T<sub>E</sub>X.
Furthermore, given a sectional unit <span class="c023">secname</span>, the
counter <span class="c023">secname</span> exists and the appearance of sectional units
numbers can be changed by redefining <code class="verb">\the</code><span class="c023">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_default159"></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 class="verb">\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="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A and H<span class="c020"><sup>A</sup></span>C<span class="c020"><sup>H</sup></span>A will use the label name
(<code class="verb">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="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A used the label name given in source as
an anchor.
Notice that this behaviour applies to the <code class="verb">\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 class="verb">\appendix</code> command exists and should work as in L<sup>A</sup>T<sub>E</sub>X.</p>
<h3 class="subsection" id="sec117">B.4.3 Table of Contents</h3>
<p>
<a id="hevea_default160"></a><a id="hevea_default161"></a>H<span class="c020"><sup>E</sup></span>V<span class="c020"><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="c017">.htoc</span> file is involved).
One inserts this table of contents in the main document by issuing
the command <code class="verb">\tableofcontents</code>.
Table of contents is controlled by the counter <code class="verb">tocdepth</code>.
By default, the table of contents shows sectioning units down to the
subsubsection level in <span class="c023">article</span> style and down to the subsection level
in <span class="c023">book</span> (or <span class="c023">report</span>) style. To include more or less
sectioning units in the
table of contents, one should increase or decrease the <code class="verb">tocdepth</code>
counter.
It is important to notice that H<span class="c020"><sup>E</sup></span>V<span class="c020"><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="c020"><sup>E</sup></span>V<span class="c020"><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="c017">.aux</span> files.
Instead, it should read its own <span class="c017">.haux</span> files.
This will naturally occur if no <span class="c017">.aux</span> files are present,
otherwise these <span class="c017">.aux</span> files should be deleted, or H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A
should be instructed not to read them with the command-line option
<a id="hevea_default162"></a><span class="c017">-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 class="verb">\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 class="verb">\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="sec118"><a id="no:number">Use H<span class="c020"><sup>A</sup></span>C<span class="c020"><sup>H</sup></span>A</a></h3>
<p>
However, H<span class="c020"><sup>E</sup></span>V<span class="c020"><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="c020"><sup>A</sup></span>C<span class="c020"><sup>H</sup></span>A on H<span class="c020"><sup>E</sup></span>V<span class="c020"><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="c020"><sup>A</sup></span>C<span class="c020"><sup>H</sup></span>A.</p>
<hr>
<a href="manual025.html"><img src="previous_motif.svg" alt="Previous"></a>
<a href="manual022.html"><img src="contents_motif.svg" alt="Up"></a>
<a href="manual027.html"><img src="next_motif.svg" alt="Next"></a>
</body>
</html>
|