Making menus Contents Index

## Making menus

The \htmlmenu command generates a menu for the subsections of a section. Its argument is the depth of the desired menu. If you use \htmlmenu{2} in a subsection, say, you will get a menu of all subsubsections and paragraphs of this subsection.

If you use this command in a section, no automatic menu for this section is created.

A typical application of this command is to put a "master menu" (the analog of a table of contents) in the top node, containing all sections of all levels of the document. This can be achieved by putting \htmlmenu{6} in the text for the top node.

You can create a menu for a section other than the current one by passing the number of that section as the optional argument, as in \htmlmenu[0]{6}, which creates a full table of contents. (The optional argument uses Hyperlatex's internal numbering-not very useful except for the top node, which is always number 0.)

Some people like to close off a section after some subsections of that section, somewhat like this:

   \section{S1}
text at the beginning of section S1
\subsection{SS1}
\subsection{SS2}
closing off S1 text

\section{S2}


This is a bit of a problem for Hyperlatex, as it requires the text for any given node to be consecutive in the file. A workaround is the following:

   \section{S1}
text at the beginning of section S1
\htmlmenu{1}
\texonly{\def\savedtext}{closing off S1 text}
\subsection{SS1}
\subsection{SS2}
\texonly{\bigskip\savedtext}

\section{S2}


July 13, 2005

 Making menus Contents Index