3.4 Skribilo User Manual — Table of contents
↑ Standard Markups

The production of table of contains.

prototype
(toc [:subsubsection] [:subsection] [:section #t] [:chapter #t] [:class "toc"] [:ident] handle)
optionenginesdescription
:identhtml lout latex context info xml The node identifier.
:classhtml lout latex context info xml The node class.
:chapterhtml lout A boolean. The value #t forces the inclusion of chapters in the table of contents.
:sectionhtml lout A boolean controlling sections.
:subsectionhtml lout A boolean controlling subsections.
:subsubsectionhtml A boolean controlling subsubsections.
argumentdescription
handleAn optional handle pointing to the node from which the table of contents if computed.
See also
document chapter section [?mark resolve: skribilo/documentation/api.scm:673:] [?mark handle: skribilo/documentation/api.scm:673:]
(toc :chapter #t :section #f :subsection #f)
Ex. 7: The toc markup

... produces:

Introduction
1Getting Started
2Syntax
3Standard Markups
4References and Hyperlinks
5Indexes
6Bibliographies
7Computer Programs
8Equation Formatting
9Pie Charts
10Slide Package
11Standard Packages
12Standard Library
13Engines
14Skribilo Compiler
15Getting Configuration Information
16Editing Skribilo Programs
17List of examples
Index

The second example only displays the table of contents of the current chapter.

(resolve (lambda (n e env)
             (toc :chapter #t :section #t :subsection #t 
                  (handle (ast-chapter n)))))
Ex. 8: A restricted table of contents

... produces:

Markup Index
3.1Building documents
3.1.1Document
3.1.2Author
3.2Spacing
3.3Sectioning
3.3.1Chapter
3.3.2Sections
3.3.3Paragraph
3.3.4Blockquote
3.4Table of contents
3.5Ornaments
3.6Line breaks
3.6.1Linebreak
3.6.2Horizontal rule
3.7Font
3.8Justification
3.9Enumeration
3.10Frames and Colors
3.10.1Frame
3.10.2Color
3.11Figures
3.11.1List of Figures
3.12Images
3.12.1Image formats
3.13Table
3.13.1Table Row
3.13.2Table Cell
3.13.3Example
3.14Footnote
3.15Characters, Strings and Symbols
3.15.1Characters
3.15.2Strings
3.15.3Symbols
(made with skribilo)