doctools2toc_introduction(n)

✨ doctools2toc_introduction ✨

okay so bestie, this page lives in the Documentation tools manual and its whole name is doctools2toc_introduction β€” but the actual title of the thing is doctools2toc_introduction and the short version is doctools2toc_introduction - DocTools - Tables of Contents. Yes it says its own name twice, it's giving main character energy, let it cook πŸ’…


πŸ’– NAME πŸ’–

doctools2toc_introduction β€” DocTools - Tables of Contents πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so doctoc (which is short for documentation tables of contents, ikyk) is not one single thing, it's a whole lil friend group of related-but-different entities that all work together so you can create and transform tables and contents for documentation. they're a unit fr fr.

these are the three besties:

  1. [1] β€” A tcl based language for the semantic markup of a table of contents. the markup is represented by Tcl commands. beginners should start with the doctoc language introduction. the formal spec is split over two documents β€” one dealing with the doctoc language syntax, the other a doctoc language command reference.
  2. [2] β€” A set of packages for the programmatic manipulation of tables of contents in memory, and their conversion between various formats, reading and writing. the markup language we just talked about is one of the formats which can be both read from and written to. iconic tbh.
  3. [3] β€” The system for the conversion of tables of contents is based on a plugin mechanism, and for this we have two APIs describing the interface between the packages above and the import/export plugins.

which of the more detailed documents are relevant to you depends on your role in the documentation process, so let's vibe-check by role πŸ‘‘

  1. [1] β€” A writer of documentation has to understand the markup language itself. if you're a beginner to doctoc you should read the more informally written doctoc language introduction first. once you've digested that, the formal doctoc language syntax specification should become understandable. a writer who's already experienced with doctoc may only need the doctoc language command reference from time to time, just to refresh her memory.

while a document is written, the dtp application can be used to validate it, and after completion it also performs the conversion into the chosen system of visual markup β€” be it *roff, HTML, plain text, wiki, etc. the simpler dtplite application makes internal use of doctoc when handling directories of documentation, automatically generating a proper table of contents for them. no cap, it just does it for you.

  1. [2] β€” A processor of documentation written in the doctoc markup language has to know which tools are available for use.

the main tool is the aforementioned dtp application provided by Tcllib. the simpler dtplite does not expose doctoc to the user. at the bottom level, common to both applications, however, we find the three packages providing the basic facilities to handle tables of contents β€” i.e. import from textual formats, programmatic manipulation in memory, and export to textual formats. these are:

doctoools::toc : Programmatic manipulation of tables of contents in memory.

doctoools::toc::import : Import of tables of contents from various textual formats. The set of supported formats is extensible through plugin packages.

doctoools::toc::export : Export of tables of contents to various textual formats. The set of supported formats is extensible through plugin packages.

see also the Package Overview section for an overview of the dependencies between these and other, supporting packages. it's got a whole diagram and everything πŸ”₯
  1. [3] β€” At last, but not least, plugin writers have to understand the interaction between the import and export packages and their plugins. these APIs are described in the documentation for the two relevant packages, i.e.
    • doctoools::toc::import
    • doctoools::toc::export

the doctoc format does not stand alone β€” it has two companion formats. they're called docidx and doctools, and they're intended for the markup of keyword indices, and of general documentation, respectively. each one has its own set of documents, starting at the DocTools - Keyword Indices and the DocTools - General, respectively. squad goals 🫢


πŸ‘‘ PACKAGE OVERVIEW πŸ‘‘

here's the diagram, bestie, and yes it's a lot. look at it. respect it. it's giving dependency chart realness:

                                                  ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                                 ~~                   |               ~~
                              doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                                      |                               |                       |
                      +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
                      |               |                         |     |    |                  |               |                       |               |
              struct:map              =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                                      |                         |     |    |                  |
                              doctools::toc::export::<*>        |     |    |          doctools::toc::import::<*>
                                      doctoc                    |     |    |                  doctoc, json
                                      json                      |     |    |                  |           \
                                      html                      |     |    |          doctools::toc::parse \
                                      nroff                     |     |    |                  |             \
                                      wiki                      |     |    |  +---------------+              json
                                      text                      |     |    |  |               |
                                                              doctools::toc::structure        |
                                                                                              |
                                                                                      +-------+---------------+
                                                                                      |                       |
                        doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat
                              |                                                                               |
                        doctools::text  doctools::nroff::man_macros                                           =
                                                                                                              |
                                                                                                      doctools::msgcat::toc::<*>
                                                                                                              c, en, de, fr
                                                                                                              (fr == en for now)
                      ~~      Interoperable objects, without actual package dependencies
                      --      Package dependency, higher requires lower package
                      =       Dynamic dependency through plugin system
                      <*>     Multiple packages following the given form of naming.

😭 BUGS, IDEAS, FEEDBACK 😭

this document, and the package it describes, will undoubtedly contain bugs and other problems. (not me being self-aware, but okay, honesty is hot πŸ’€) please report such in the category doctools of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist](http://core.tcl.tk/tcllib/reportlist). please also report any ideas for enhancements you may have for either the package and/or the documentation.

when proposing code changes, please provide unified diffs, i.e the output of diff -u.

note further that attachments are strongly preferred over inlined patches. attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.


πŸ’œ SEE ALSO πŸ’œ

  • doctoc_intro
  • doctools
  • doctools2doc_introduction
  • doctools2idx_introduction
  • doctools_lang_cmdref
  • doctools_lang_faq
  • doctools_lang_intro
  • doctools_lang_syntax
  • doctools_plugin_apiref

πŸ“ KEYWORDS πŸ“

contents, conversion, formatting, markup, parsing, plugin, semantic markup, table of contents ✨


🧚 CATEGORY 🧚

Documentation tools


Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>


and that's the whole page bestie, you ate it 🫢 this came to you from tcllib, version 2.0 β€” mwah, go build something cute with it πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from