[Openstack-docs] Extend the table of contents of the glossary

Anne Gentle anne at openstack.org
Mon Jun 9 19:36:09 UTC 2014


Hi Christian,
I like this idea very much.

I'll ping David Cramer tomorrow to see if he can help. In the meantime,
I've dug up this info:

http://docbook.sourceforge.net/release/xsl/1.76.1/doc/html/generate.toc.html
and
http://www.sagehill.net/docbookxsl/TOCcontrol.html

Also, our pom.xml file can control the output of TOC entries.

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:

 WordGenerates tocTable of contentstitleA title for the specified list,
such as “Table of Contents”. figureList of figureestable List of tables
exampleList of examplesequation List of equationsnopNo 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.


On Tue, Jun 3, 2014 at 6:38 AM, Christian Berendt <berendt at b1-systems.de>
wrote:

> I tried extending the table of contents of the glossary to have an entry
> for each letter in the TOC. I think that's helpful.
>
> I think I have to increment the maximum depth of the generated TOC. But
> because I'm not familiar with XSL, can somebody give me a hint what I
> have to change?
>
> Christian.
>
> --
> Christian Berendt
> Cloud Computing Solution Architect
> Mail: berendt at b1-systems.de
>
> B1 Systems GmbH
> Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
> GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
>
> _______________________________________________
> Openstack-docs mailing list
> Openstack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20140609/fe9a27b8/attachment-0001.html>


More information about the Openstack-docs mailing list