Table of contents, and lists of figures, tables, examples, and equations

The generateToc tag in a configuration section contains a series of white-space separated word pairs, which define the generation or suppression of the table of contents and lists of figures, tables, examples, and equations.

The first word in each pair is the element name, such as appendix, article, book, chapter, section, and so on.

The second word is a comma-separated list that specifies which lists the element should display. Most elements just use toc, which generates a list of section titles.

But the entry for the book element also generates tables of figures, tables, examples, and equations.

The title tag generates a title for the list, such as Table of Contents.

Use a value of nop to turn off the table of contents and all lists for an element. You can also turn off a table of contents by removing the element from the parameter.

The following table describes the words that you use to generate or suppress the table of contents and lists:

Word Generates
toc Table of contents
title A title for the specified list, such as Table of Contents.
figure List of figurees
table List of tables
example List of examples
equation List of equations
nop No operation. Disables the table of contents and all lists for an element. You can also disable the table of contents or a list by removing the element from the parameter.

For example, you might add the following markup to your pom.xml file:

<generateToc> 
appendix toc,title 
article/appendix nop 
article toc,title 
book title,figure,table,example,equation 
chapter toc,title 
part toc,title 
preface nop 
qandadiv toc 
qandaset toc 
reference toc,title 
section toc 
set toc,title 
</generateToc>

This markup generates the following items:

  • Appendix. Table of contents with a title.

  • Appendix in an article. No table of contents or lists.

  • Article. Table of contents with a title.

  • Book. List of figures, tables, examples, and equations with titles.

  • Chapter. Table of contents with a title.

  • Part. Table of contents with a title.

  • Preface. No table of contents or lists.

  • And so on.

Additional resources:

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page