<< | Page list | >>
Using the LaTeX-package minitoc with LyX.
The first thing you have to do is to install the LaTeX-package minitoc, in case you haven't done this already. Have a look at the documentation of your LaTeX distribution how packages are installed. When you are using MiKTeX, open its program "Browse packages" that you find in the Windows programs start menu. There select minitoc and press the toolbar button that looks like a plus.
- Insert this line to your document's LaTeX preamble:
- As first commands of your document insert minitoc's \do*** commands as TeX code.
When you for example want to have minitocs for sections, insert the command \dosecttoc.
- Behind the section headings where you want to have minitocs add the corresponding minitoc command to create a minitoc as TeX code.
To create for example a minitoc of a section, insert the command \secttoc.
- You need to also include a standard table of contents for this to work.
- It is important to use only the minitoc commands according to the available sectioning header levels. When you use for example an article document class, the highest sectioning level is Section, so when you use in your document the command \dominitoc or \minitoc that are for Chapters, you will get LaTeX errors.
- Sometimes minitoc does not notice that a new chapter has been added, so that it writes the wrong minitoc's to the wrong chapters. For example, this is the case of \addcontentsline and \listoffigures. To avoid this, you can inform minitoc about the "new chapter" by adding the command \mtcaddchapter.
The files in the next section are example how to use minitoc with LyX.
Minitoc offers many commands to format minitocs. They are described in the fantastic documentation of minitoc.
To be able to compile the LyX documents, add them to LyX's "doc" folder that is a subfolder of your LyX installation folder, to the LyX manuals.