diff options
Diffstat (limited to 'tcllib/modules/doctools2idx/include/export')
12 files changed, 479 insertions, 0 deletions
diff --git a/tcllib/modules/doctools2idx/include/export/config/docidx.inc b/tcllib/modules/doctools2idx/include/export/config/docidx.inc new file mode 100644 index 0000000..c0b97c5 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/config/docidx.inc @@ -0,0 +1,71 @@ + +[include ../../format/docidx.inc] + +[section Configuration] + +The docidx export plugin recognizes the following configuration +variables and changes its behaviour as they specify. + +[list_begin arguments] + +[arg_def string user] +This standard configuration variable contains the name of the user +running the process which invoked the export plugin. + +The plugin puts this information into the provenance comment at the +beginning of the generated document. + +[arg_def string file] + +This standard configuration variable contains the name of the file the +index came from. This variable may not be set or contain the empty +string. + +The plugin puts this information, if defined, i.e. set and not the +empty string, into the provenance comment at the beginning of the +generated document. + + +[arg_def boolean newlines] + +If this flag is set the plugin will break the generated docidx code +across lines, with each markup command on a separate line. + +[para] + +If this flag is not set (the default), the whole document will be +written on a single line, with minimum spacing between all elements. + + +[arg_def boolean indented] + +If this flag is set the plugin will indent the markup commands +according to the structure of indices. To make this work this also +implies that [var newlines] is set. This effect is independent of the +value for [var aligned] however. + +[para] + +If this flag is not set (the default), the output is formatted as per +the values of [var newlines] and [var aligned], and no indenting is +done. + + +[arg_def boolean aligned] + +If this flag is set the generator ensures that the arguments for the +[cmd manpage] and [cmd url] commands in a keyword section are aligned +vertically for a nice table effect. To make this work this also +implies that [var newlines] is set. This effect is independent of the +value for [var indented] however. + +[para] + +If this flag is not set (the default), the output is formatted as per +the values of [var newlines] and [var indented], and no alignment is +done. + +[list_end] + +[emph Note] that this plugin ignores the standard configuration +variables [var format], and [var map], and their values. diff --git a/tcllib/modules/doctools2idx/include/export/config/html.inc b/tcllib/modules/doctools2idx/include/export/config/html.inc new file mode 100644 index 0000000..af00470 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/config/html.inc @@ -0,0 +1,203 @@ +[section Configuration] + +The html export plugin recognizes the following configuration +variables and changes its behaviour as they specify. + +[list_begin arguments] + +[arg_def string user] +This standard configuration variable contains the name of the user +running the process which invoked the export plugin. + +The plugin puts this information into the provenance comment at the +beginning of the generated document. + +[arg_def string file] + +This standard configuration variable contains the name of the file the +index came from. This variable may not be set or contain the empty +string. + +The plugin puts this information, if defined, i.e. set and not the +empty string, into the provenance comment at the beginning of the +generated document. + + +[arg_def dictionary map] + +This standard configuration variable contains a dictionary mapping +from the symbolic files names in manpage references to the actual +filenames and/or urls to be used in the output. + +[para] + +Url references and symbolic file names without a mapping are used +unchanged. + + +[arg_def boolean newlines] + +If this flag is set the plugin will break the generated html code +across lines, with each markup command on a separate line. + +[para] + +If this flag is not set (the default), the whole document will be +written on a single line, with minimum spacing between all elements. + + +[arg_def boolean indented] + +If this flag is set the plugin will indent the markup commands +according to the structure of indices. To make this work this also +implies that [var newlines] is set. + +[para] + +If this flag is not set (the default), the output is formatted as per +the value of [var newlines], and no indenting is done. + + +[arg_def string meta] + +This variable is meant to hold a fragment of HTML (default: empty). +The fragment it contains will be inserted into the generated output in +the <head> section of the document, just after the <title> tag. + + +[arg_def string header] + +This variable is meant to hold a fragment of HTML (default: empty). +The fragment it contains will be inserted into the generated output +just after the <h1> title tag in the body of the document, in the +class.header <div>'ision. + + + +[arg_def string footer] + +This variable is meant to hold a fragment of HTML (default: +empty). The fragment it contains will be inserted into the generated +output just before the </body> tag, in the class.footer <div>'ision. + + +[arg_def dictionary kwid] + +The value of this variable (default: empty) maps keywords to the +identifiers to use as their anchor names. Each keyword [var FOO] not +found in the dictionary uses [const KW-][var FOO] as anchor, +i.e. itself prefixed with the string [const KW-]. + + +[arg_def string sepline] + +The value of this variable is the string to use for the separator +comments inserted into the output when the outpout is broken across +lines and/or indented. The default string consists of 60 dashes. + + +[arg_def integer kwidth] + +This variable holds the size of the keyword column in the main table +generated by the plugin, in percent of the total width of the +table. This is an integer number in the range of 1 to 99. Choosing a +value outside of that range causes the generator to switch back to the +defauly setting, 35 percent. + + +[arg_def string dot] + +This variable contains a HTML fragment inserted between the entries of +the navigation bar, and the references associated with each keyword. +The default is the HTML entity · i.e. the bullet character, also +known as the "Greek middle dot", i.e. the unicode character 00B7. + + +[arg_def string class.main] + +This variable contains the class name for the main <div>'ivision of +the generated document. The default is [const doctools]. + + +[arg_def string class.header] + +This variable contains the class name for the header <div>'ision of +the generated document. The default is [const idx-header]. This +division contains the document title, the user specified [var header], +if any, a visible separator line, and the navigation bar for quick +access to each keyword section. + + +[arg_def string class.title] + +This variable contains the class name for the <h1> tag enclosing the +document title. The default is [const idx-title]. + + +[arg_def string class.navsep] + +This variable contains the class name for the <hr> separators in the +header and footer sections of the generated document. The default is +[const idx-navsep]. + + +[arg_def string class.navbar] + +This variable contains the class name for the navigation <div>'ision +enclosing the navigation bar of the generated document. The default is +[const idx-kwnav]. + + +[arg_def string class.contents] + +This variable contains the class name for the <table> holding the +keywords and their references in the generated document. The default +is [const idx-contents]. + + +[arg_def string class.leader] + +This variable contains the class name for the anchor names the plugin +inserts into the keyword table when switching from one section to the +next (Each section holds all keywords with a particular first +character). The default is [const idx-leader]. + + +[arg_def string class.row0] + +This variable contains the class name used to label the even rows +(<tr>) of the keyword table. The default is [const idx-even]. + + +[arg_def string class.row1] + +This variable contains the class name used to label the odd rows +(<tr>) of the keyword table. The default is [const idx-odd]. + + +[arg_def string class.keyword] + +This variable contains the class name used to label the keyword +cells/column (<td>) in the keyword table of the document. The default +is [const idx-keyword]. + + +[arg_def string class.refs] + +This variable contains the class name used to label the reference +cells/column (<td>) in the keyword table of the document. The default +is [const idx-refs]. + + +[arg_def string class.footer] + +This variable contains the class name for the footer <div>'ision of +the generated document. The default is [const idx-footer]. This +division contains a browser-visible separator line and the user +specified [var footer], if any. + + +[list_end] + +[emph Note] that this plugin ignores the standard configuration +variable [var format], and its value. diff --git a/tcllib/modules/doctools2idx/include/export/config/json.inc b/tcllib/modules/doctools2idx/include/export/config/json.inc new file mode 100644 index 0000000..24844b8 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/config/json.inc @@ -0,0 +1,39 @@ + +[include ../../format/json.inc] + +[section Configuration] + +The JSON export plugin recognizes the following configuration +variables and changes its behaviour as they specify. + +[list_begin arguments] +[arg_def boolean indented] + +If this flag is set the plugin will break the generated JSON code +across lines and indent it according to its inner structure, with each +key of a dictionary on a separate line. + +[para] + +If this flag is not set (the default), the whole JSON object will be +written on a single line, with minimum spacing between all elements. + + +[arg_def boolean aligned] + +If this flag is set the generator ensures that the values for the keys +in a dictionary are vertically aligned with each other, for a nice +table effect. To make this work this also implies that [var indented] +is set. + +[para] + +If this flag is not set (the default), the output is formatted as per +the value of [var indented], without trying to align the values for +dictionary keys. + +[list_end] + +[emph Note] that this plugin ignores the standard configuration +variables [var user], [var format], [var file], and [var map] and +their values. diff --git a/tcllib/modules/doctools2idx/include/export/config/nroff.inc b/tcllib/modules/doctools2idx/include/export/config/nroff.inc new file mode 100644 index 0000000..3674055 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/config/nroff.inc @@ -0,0 +1,40 @@ +[section Configuration] + +The nroff export plugin recognizes the following configuration +variables and changes its behaviour as they specify. + +[list_begin arguments] + +[arg_def string user] +This standard configuration variable contains the name of the user +running the process which invoked the export plugin. + +The plugin puts this information into the provenance comment at the +beginning of the generated document. + +[arg_def string file] + +This standard configuration variable contains the name of the file the +index came from. This variable may not be set or contain the empty +string. + +The plugin puts this information, if defined, i.e. set and not the +empty string, into the provenance comment at the beginning of the +generated document. + + +[arg_def boolean inline] + +If this flag is set (default) the plugin will place the definitions of +the man macro set directly into the output. + +[para] + +If this flag is not set, the plugin will place a reference to the +definitions of the man macro set into the output, but not the macro +definitions themselves. + +[list_end] + +[emph Note] that this plugin ignores the standard configuration +variables [var format], and [var map], and their values. diff --git a/tcllib/modules/doctools2idx/include/export/config/text.inc b/tcllib/modules/doctools2idx/include/export/config/text.inc new file mode 100644 index 0000000..3d23a78 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/config/text.inc @@ -0,0 +1,22 @@ +[section Configuration] + +The text export plugin recognizes the following configuration +variables and changes its behaviour as they specify. + +[list_begin arguments] + +[arg_def dictionary map] + +This standard configuration variable contains a dictionary mapping +from the symbolic files names in manpage references to the actual +filenames and/or urls to be used in the output. + +[para] + +Url references and symbolic file names without a mapping are used +unchanged. + +[list_end] + +[emph Note] that this plugin ignores the standard configuration +variables [var user], [var file], and [var format], and their values. diff --git a/tcllib/modules/doctools2idx/include/export/config/wiki.inc b/tcllib/modules/doctools2idx/include/export/config/wiki.inc new file mode 100644 index 0000000..c74554f --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/config/wiki.inc @@ -0,0 +1,42 @@ +[section {Wiki markup}] + +The basic syntax of the wiki markup generated by this plugin are +described at [uri http://wiki.tcl.tk/14]. + +[para] + +The plugin goes beyond the classic markup to generate proper headers +and either a table or indented list of the keywords and their +references. + + +[section Configuration] + +The wiki export plugin recognizes the following configuration +variables and changes its behaviour as they specify. + +[list_begin arguments] + +[arg_def dictionary map] + +This standard configuration variable contains a dictionary mapping +from the symbolic files names in manpage references to the actual +filenames and/or urls to be used in the output. + +[para] + +Url references and symbolic file names without a mapping are used +unchanged. + +[arg_def enum style] + +This variable recognizes two values as legal, [const list] (default), +and [const table]. + +Depending on the value the plugin generates either a list- or +table-based wiki page for the index. + +[list_end] + +[emph Note] that this plugin ignores the standard configuration +variables [var user], [var file] and [var format], and their values. diff --git a/tcllib/modules/doctools2idx/include/export/format/html.inc b/tcllib/modules/doctools2idx/include/export/format/html.inc new file mode 100644 index 0000000..c8803f4 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/format/html.inc @@ -0,0 +1,3 @@ +[require doctools::text] +[require doctools::html] +[require doctools::html::cssdefaults] diff --git a/tcllib/modules/doctools2idx/include/export/format/json.inc b/tcllib/modules/doctools2idx/include/export/format/json.inc new file mode 100644 index 0000000..9ef73f0 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/format/json.inc @@ -0,0 +1 @@ +[require textutil::adjust] diff --git a/tcllib/modules/doctools2idx/include/export/format/nroff.inc b/tcllib/modules/doctools2idx/include/export/format/nroff.inc new file mode 100644 index 0000000..7883881 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/format/nroff.inc @@ -0,0 +1,2 @@ +[require doctools::text] +[require doctools::nroff::man_macros] diff --git a/tcllib/modules/doctools2idx/include/export/format/null.inc b/tcllib/modules/doctools2idx/include/export/format/null.inc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/format/null.inc diff --git a/tcllib/modules/doctools2idx/include/export/format/text.inc b/tcllib/modules/doctools2idx/include/export/format/text.inc new file mode 100644 index 0000000..be41da5 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/format/text.inc @@ -0,0 +1 @@ +[require doctools::text] diff --git a/tcllib/modules/doctools2idx/include/export/plugin.inc b/tcllib/modules/doctools2idx/include/export/plugin.inc new file mode 100644 index 0000000..ed79cc5 --- /dev/null +++ b/tcllib/modules/doctools2idx/include/export/plugin.inc @@ -0,0 +1,55 @@ +[comment {-*- tcl -*- --- !doctools ---}] +[manpage_begin doctools::idx::export::[vset PACKAGE] n [vset VERSION]] +[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}] +[moddesc {Documentation tools}] +[titledesc "[vset NAME] export plugin"] +[category {Text formatter plugin}] +[require Tcl 8.4] +[require doctools::idx::export::[vset PACKAGE] [opt [vset VERSION]]] +[include format/[vset REQUIRE].inc] +[keywords doctools index serialization export [vset NAME]] +[description] + +This package implements the doctools keyword index export plugin for +the generation of [vset NAME] markup. + +[para] + +This is an internal package of doctools, for use by the higher level +management packages handling keyword indices, especially [package \ +doctools::idx::export], the export manager. + +[para] + +Using it from a regular interpreter is possible, however only with +contortions, and is not recommended. + +The proper way to use this functionality is through the package +[package doctools::idx::export] and the export manager objects it +provides. + + +[section API] + +The API provided by this package satisfies the specification of the +docidx export plugin API version 2. + +[list_begin definitions] + +[call [cmd export] [arg serial] [arg configuration]] + +This command takes the canonical serialization of a keyword index, as +specified in section [sectref {Keyword index serialization format}], +and contained in [arg serial], the [arg configuration], a dictionary, +and generates [vset NAME] markup encoding the index. + +The created string is then returned as the result of the command. + +[list_end] + +[include config/[vset CONFIG].inc] +[include ../serialization.inc] + +[vset CATEGORY doctools] +[include ../../../doctools2base/include/feedback.inc] +[manpage_end] |