Up Next
Go up to 9 Designing it yourself
Go forward to 9.2 Rulers and images

9.1 Making menus

The \htmlmenu command generates a menu for the subsections of the current section. It takes a single argument, 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.


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}

Otfried Schwarzkopf, September 2, 1997

Up Next