<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <META name="GENERATOR" content="hevea 1.10"> <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"><A NAME="htoc69">B.4</A>  Sectioning</H2><UL> <LI><A HREF="manual026.html#toc53">Sectioning Commands</A> </LI><LI><A HREF="manual026.html#toc54">The Appendix</A> </LI><LI><A HREF="manual026.html#toc55">Table of Contents</A> </LI><LI><A HREF="manual026.html#toc56">Use H<FONT SIZE=2><sup>A</sup></FONT>C<FONT SIZE=2><sup>H</sup></FONT>A</A> </LI></UL> <H3 CLASS="subsection"><A NAME="toc53"></A><A NAME="htoc70">B.4.1</A>  <A NAME="section:section"></A>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 <I>level</I> 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 <I>secname</I>, the counter <I>secname</I> exists and the appearance of sectional units numbers can be changed by redefining <CODE>\the</CODE><I>secname</I>. For instance, the following redefinition turn the numbering of chapters into alphabetic (uppercase) style: </P><PRE CLASS="verbatim">\renewcommand{\thechapter}{\Alph{chapter}} </PRE><P>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>Note that <CODE>\label</CODE> should not be be placed last in section title (and I do not know the reason why). Have a try for this section <A HREF="#section:section">B.4.1</A>!</P><H3 CLASS="subsection"><A NAME="toc54"></A><A NAME="htoc71">B.4.2</A>  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"><A NAME="toc55"></A><A NAME="htoc72">B.4.3</A>  Table of Contents</H3><P> <A NAME="@default154"></A><A NAME="@default155"></A>H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>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 <TT>.htoc</TT> 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 <I>article</I> style and down to the subsection level in <I>book</I> (or <I>report</I>) 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<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A produces such a table of contents, only when it has total control over cross-references. More precisely, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A cannot produce the table of contents when it reads L<sup>A</sup>T<sub>E</sub>X-produced <TT>.aux</TT> files. Instead, it should read its own <TT>.haux</TT> files. This will naturally occur if no <TT>.aux</TT> files are present, otherwise these <TT>.aux</TT> files should be deleted, or H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A should be instructed not to read them with the command-line option <A NAME="@default156"></A><TT>-fix</TT> (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"><A NAME="toc56"></A><A NAME="no:number">Use H<FONT SIZE=2><sup>A</sup></FONT>C<FONT SIZE=2><sup>H</sup></FONT>A</A></H3><P> However, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>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<FONT SIZE=2><sup>A</sup></FONT>C<FONT SIZE=2><sup>H</sup></FONT>A on H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>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<FONT SIZE=2><sup>A</sup></FONT>C<FONT SIZE=2><sup>H</sup></FONT>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>