All Downloads are FREE. Search and download functionalities are using the official Maven repository.

css.generate-toc.params Maven / Gradle / Ivy

There is a newer version: 8.0.1
Show newest version



    
        
            

Table of contents: Table of contents depth

The depth of the table of contents hierarchy to include. '0' means no table of contents. A table of contents will be generated from the heading elements present in the document: from `h1` elements if the specified value for "depth" is 1, from `h1` and `h2` elements if the specified value is 2, etc. The resulting table of contents has the following nested structure: ~~~xml <ol id="generated-document-toc"> <li> <a href="#ch_1">Chapter 1</a> <list> <li> <a href="#ch_1_1">1.1</a> ... </li> <li> <a href="#ch_1_2">1.2</a> ... </li> ... </list> </li> ... </ol> ~~~ Another one of these is generated but with ID `generated-volume-toc`. `ch_1`, `ch_1_2` etc. are the IDs of the heading elements from which the list was constructed, and the content of the links are exact copies of the content of the heading elements. By default the list is not rendered. The list should be styled and positioned with CSS. The following rules are included by default: ~~~css #generated-document-toc { flow: document-toc; display: -obfl-toc; -obfl-toc-range: document; } #generated-volume-toc { flow: volume-toc; display: -obfl-toc; -obfl-toc-range: volume; } ~~~ This means that a document range table of contents is added to the named flow called "document-toc", and a volume range table of contents is added to the named flow called "volume-toc". In order to consume these named flows use the function `flow()`. For example, to position the document range table of contents at the beginning of the first volume, and to repeat the volume range table of content at the beginning of every other volume, include the following additional rules: ~~~css @volume { @begin { content: flow(volume-toc); } } @volume:first { @begin { content: flow(document-toc); } } ~~~ See the CSS specification for more info: - the [`display: obfl-toc`](http://braillespecs.github.io/braille-css/obfl#extending-the-display-property-with--obfl-toc) value - the [`flow`](http://braillespecs.github.io/braille-css/#the-flow-property) property - the [`flow()`](http://braillespecs.github.io/braille-css/#h4_the-flow-function) function - the [`@volume`](http://braillespecs.github.io/braille-css/#h3_the-volume-rule) rule - the [`@begin`](http://braillespecs.github.io/braille-css/#h3_the-begin-and-end-rules) rule





© 2015 - 2025 Weber Informatics LLC | Privacy Policy