Tcl Library Source Code

Check-in [fae3542632]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:doctools: - `text`: Sliced and diced internals for easier (re)comprehension of the parts. Going towards reuse for a new `markdown` format. Fixed various mis-formattings: - Missing newline at end of output - Superflous newlines at beginning of example sections. - Updated various formatters to not pass initial leading whitespace into the output (See testsuite change, added comments) - `latex`: Fixed handling of paragraph breaks, [nl]. - Extended testsuite, more manpage examples. Also added comments at top with short description. doctoc: - Syntax checker fix, items are allowed before toc end, after the last division. - `text`: Updated to make use of and match the reworked engine. - `html`: Fixed fixed mismanagement of items before first and after last division. Completely new state for tracking levels, items. - `nroff`: Fixed missing indenting of division title - `tmml`: Fixed variable name typo - Extended testsuite with examples for all the generators. docidx: - `nroff`: Fixed unsorted output - Extended testsuite with examples for all the generators.
Timelines: family | ancestors | descendants | both | doc-fixup-and-markdown
Files: files | file ages | folders
SHA3-256:fae35426325dae81bfd0dec73a571a88ed29cee291c81c495e615bcc54a814ca
User & Date: aku 2019-03-14 07:27:54
Context
2019-03-14
19:35
Shuffled the test support files for doctools around for a nicer hierarchy, with fmt, idx, and toc properly segregated. Updated the test suite to match the changes. Furthermore dropped superfluous checks for long-gone `CVS` directories. check-in: 7e7f01191f user: aku tags: doc-fixup-and-markdown
07:27
doctools: - `text`: Sliced and diced internals for easier (re)comprehension of the parts. Going towards reuse for a new `markdown` format. Fixed various mis-formattings: - Missing newline at end of output - Superflous newlines at beginning of example sections. - Updated various formatters to not pass initial leading whitespace into the output (See testsuite change, added comments) - `latex`: Fixed handling of paragraph breaks, [nl]. - Extended testsuite, more manpage examples. Also added comments at top with short description. doctoc: - Syntax checker fix, items are allowed before toc end, after the last division. - `text`: Updated to make use of and match the reworked engine. - `html`: Fixed fixed mismanagement of items before first and after last division. Completely new state for tracking levels, items. - `nroff`: Fixed missing indenting of division title - `tmml`: Fixed variable name typo - Extended testsuite with examples for all the generators. docidx: - `nroff`: Fixed unsorted output - Extended testsuite with examples for all the generators. check-in: fae3542632 user: aku tags: doc-fixup-and-markdown
2019-03-07
21:09
Squashed deprecated `nl` tags, using `para` instead check-in: 4a95b1eebb user: aku tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to modules/doctools/changelog.tcl.

     1      1   # changelog.tcl --
     2      2   #
     3      3   #	Handling of ChangeLog's.
     4      4   #
     5         -# Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@sourceforge.net>
            5  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     6      6   #
     7      7   # See the file "license.terms" for information on usage and redistribution
     8      8   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     9         -# 
    10         -# RCS: @(#) $Id: changelog.tcl,v 1.8 2008/07/08 23:03:58 andreas_kupries Exp $
    11         -
    12      9   
    13     10   # FUTURE -- Expand pre-parsed log (nested lists) into flat structures
    14     11   # FUTURE --  => date/author/file/cref + cref/text
    15     12   # FUTURE -- I.e. relational/tabular structure, useable in table displays,
    16     13   # FUTURE -- sort by date, author, file to see aggregated changes
    17     14   # FUTURE --  => Connectivity to 'struct::matrix', Reports!
    18     15   

Changes to modules/doctools/checker_toc.tcl.

    49     49   #		+-----------------------+-----------
    50     50   #		| toc_end		| -> done
    51     51   # --------------+-----------------------+----------------------
    52     52   # division	| item			| -> division //
    53     53   #		+-----------------------+-----------
    54     54   #		| division_start	| -> division, PUSH division
    55     55   #		+-----------------------+-----------
    56         -#		| division_end		| POP (-> division / -> end)
           56  +#		| division_end		| POP (-> division / -> contents)
    57     57   # --------------+-----------------------+----------------------
    58     58   # end		| toc_end		| -> done
    59     59   #		+-----------------------+-----------
    60     60   #		| division_start	| PUSH division
    61     61   # --------------+-----------------------+----------------------
    62     62   
    63     63   # State machine, as above ... Command centered
................................................................................
   108    108       set msg [::msgcat::mc $code]
   109    109       dt_warning "TOC warning ($code): [join [split [format $msg $text] \n] "\nTOC warning ($code): "]"
   110    110       return
   111    111   }
   112    112   
   113    113   proc Is    {s} {global state ; return [string equal $state $s]}
   114    114   proc IsNot {s} {global state ; return [expr {![string equal $state $s]}]}
   115         -proc Go    {s} {Log " >>\[$s\]" ; global state ; set state $s; return}
   116         -proc Push  {s} {Log " //\[$s\]" ; global state stack ; lappend stack $state ; set state $s; return}
   117         -proc Pop   {}  {Log* " pop" ;  global state stack ; set state [lindex $stack end] ; set stack [lrange $stack 0 end-1] ; Log " \\\\\[$state\]" ; return}
          115  +proc Go    {s} {Log " ==\[$s\]" ; global state ; set state $s; return}
          116  +proc Push  {s} {Log " >>\[$s\]" ; global state stack ; lappend stack $state ; set state $s; return}
          117  +proc Pop   {}  {Log* " <<"     ;  global state stack ; set state [lindex $stack end] ; set stack [lrange $stack 0 end-1] ; Log " \\\\\[$state\]" ; return}
   118    118   proc State {} {global state stack ; return "$stack || $state"}
   119    119   
   120         -proc Enter {cmd} {Log* "\[[State]\] $cmd"}
          120  +proc Enter {cmd} {Log* "\n\[[State]\] $cmd"}
   121    121   
          122  +proc Log* {args} {}
          123  +proc Log  {args} {}
   122    124   #proc Log* {text} {puts -nonewline $text}
   123    125   #proc Log  {text} {puts            $text}
   124         -proc Log* {text} {}
   125         -proc Log  {text} {}
   126    126   
   127    127   # -------------------------------------------------------------
   128    128   # Framing
   129    129   proc ck_initialize {} {
   130    130       global state   ; set state toc_begin
   131    131       global stack   ; set stack [list]
   132    132   }
................................................................................
   173    173   }
   174    174   
   175    175   # -------------------------------------------------------------
   176    176   # Formatting commands
   177    177   proc toc_begin {label title} {
   178    178       Enter toc_begin
   179    179       if {[IsNot toc_begin]} {Error toc/begincmd}
   180         -    Go contents
          180  +    Go   end
          181  +    Push contents
   181    182       fmt_toc_begin $label $title
   182    183   }
   183    184   proc toc_end {} {
   184    185       Enter toc_end
   185    186       if {[IsNot end] && [IsNot contents]} {Error toc/endcmd}
   186    187       Go done
   187    188       fmt_toc_end
   188    189   }
   189    190   proc division_start {title {symfile {}}} {
   190    191       Enter division_start
   191    192       if {
   192    193   	[IsNot contents] && [IsNot end] && [IsNot division]
   193    194       } {Error toc/sectcmd}
   194         -    if {[Is contents] || [Is end]} {Go end} else {Go division}
   195    195       Push division
   196    196       fmt_division_start $title $symfile
   197    197   }
   198    198   proc division_end {} {
   199    199       Enter division_end
   200    200       if {[IsNot division]} {Error toc/sectecmd [State]}
   201    201       Pop

Changes to modules/doctools/cvs.tcl.

     1      1   # cvs.tcl --
     2      2   #
     3      3   #	Handling of various cvs output formats.
     4      4   #
     5         -# Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@sourceforge.net>
            5  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     6      6   #
     7      7   # See the file "license.terms" for information on usage and redistribution
     8      8   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     9         -# 
    10         -# RCS: @(#) $Id: cvs.tcl,v 1.10 2008/07/08 23:03:58 andreas_kupries Exp $
    11      9   
    12     10   package require Tcl 8.2
    13     11   package require textutil
    14     12   
    15     13   namespace eval ::doctools {}
    16     14   namespace eval ::doctools::cvs {
    17     15       namespace export scanLog toChangeLog

Changes to modules/doctools/docidx.tcl.

     1      1   # docidx.tcl --
     2      2   #
     3      3   #	Implementation of docidx objects for Tcl.
     4      4   #
     5         -# Copyright (c) 2003-2018 Andreas Kupries <andreas_kupries@sourceforge.net>
            5  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     6      6   #
     7      7   # See the file "license.terms" for information on usage and redistribution
     8      8   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     9         -# 
    10         -# RCS: @(#) $Id: docidx.tcl,v 1.22 2010/06/08 19:13:53 andreas_kupries Exp $
    11      9   
    12     10   package require Tcl 8.2
    13     11   package require textutil::expander
    14     12   
    15     13   # @mdgen OWNER: api_idx.tcl
    16     14   # @mdgen OWNER: checker_idx.tcl
    17     15   # @mdgen OWNER: mpformats/*.tcl

Changes to modules/doctools/docidx.test.

     1      1   # -*- tcl -*-
     2      2   # docidx.test:  tests for the doctools::idx package.
     3      3   #
     4      4   # This file contains a collection of tests for one or more of the Tcl
     5      5   # built-in commands.  Sourcing this file into Tcl runs the tests and
     6      6   # generates output for errors.  No output means no errors were found.
     7      7   #
     8         -# Copyright (c) 2003-2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
            8  +# Copyright (c) 2003-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
     9      9   # All rights reserved.
    10         -#
    11         -# RCS: @(#) $Id: docidx.test,v 1.15 2009/02/12 05:42:47 andreas_kupries Exp $
    12     10   
    13     11   # -------------------------------------------------------------------------
    14     12   
    15     13   source [file join \
    16     14   	[file dirname [file dirname [file join [pwd] [info script]]]] \
    17     15   	devtools testutilities.tcl]
    18     16   
    19     17   testsNeedTcl     8.2
    20     18   testsNeedTcltest 1.0
    21     19   
    22     20   support {
    23     21       use textutil/expander.tcl textutil::expander
           22  +    use fileutil/fileutil.tcl fileutil
    24     23   }
    25     24   testing {
    26     25       useLocal docidx.tcl doctools::idx
    27     26   }
    28     27   
    29     28   # -------------------------------------------------------------------------
    30     29   
................................................................................
   303    302       catch {mydocidx format {[index_begin KWIC Test][key X][index_end]}} result
   304    303       mydocidx destroy
   305    304       set result
   306    305   } {Docidx Error in macro at line 1, column 30:
   307    306   [index_end]
   308    307   --> (FmtError) IDX error (idx/endcmd), "index_end" : Command not allowed here..}
   309    308   
          309  +
          310  +# -------------------------------------------------------------------------
          311  +## Series of tests for all available backends, check their formatting.
          312  +
          313  +set k 11
          314  +foreach format {
          315  +    html nroff text
          316  +    wiki null
          317  +} {
          318  +    set n 0
          319  +    foreach src [TestFilesGlob tests/idx/idx/*] {
          320  +	if {[file tail $src] == "CVS"} continue
          321  +
          322  +	# Get the expected result
          323  +	set dst [localPath [file join tests idx $format [file tail $src]]]
          324  +	set map {} ; lappend map @USR@ $tcl_platform(user)
          325  +	set rem {} ; lappend rem $tcl_platform(user) @USR@
          326  +	if {$format eq "nroff"} {
          327  +		lappend map ".so man.macros\n" [fileutil::cat [localPath mpformats/man.macros]]
          328  +	}
          329  +	if {[catch {
          330  +	    set expected [string map $map [fileutil::cat $dst]]
          331  +	}]} { set expected **missing** }
          332  +
          333  +	test docidx-${format}-${k}.$n "docidx backends, $format/[file tail $src]" {
          334  +	    new mydocidx
          335  +	    mydocidx configure \
          336  +		-format    $format \
          337  +		-file      .FILE.
          338  +	    if {[catch {
          339  +		set res [mydocidx format [fileutil::cat $src]]
          340  +	    }]} {
          341  +		set res $::errorInfo
          342  +	    }
          343  +	    mydocidx destroy
          344  +	    #fileutil::writeFile ${dst}.actual [string map $rem $res]
          345  +	    set res
          346  +	} $expected
          347  +
          348  +	#fileutil::writeFile ${dst}.expected $expected
          349  +	incr n
          350  +    }
          351  +    incr k
          352  +}
          353  +
          354  +# -------------------------------------------------------------------------
   310    355   
   311    356   namespace forget ::doctools::idx::new
   312    357   
   313    358   # -------------------------------------------------------------------------
   314    359   
   315    360   testsuiteCleanup
   316    361   return

Changes to modules/doctools/doctoc.test.

     1      1   # -*- tcl -*-
     2      2   # doctoc.test:  tests for the doctools::toc package.
     3      3   #
     4      4   # This file contains a collection of tests for one or more of the Tcl
     5      5   # built-in commands.  Sourcing this file into Tcl runs the tests and
     6      6   # generates output for errors.  No output means no errors were found.
     7      7   #
     8         -# Copyright (c) 2003-2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
            8  +# Copyright (c) 2003-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
     9      9   # All rights reserved.
    10         -#
    11         -# RCS: @(#) $Id: doctoc.test,v 1.14 2009/02/12 05:42:47 andreas_kupries Exp $
    12     10   
    13     11   # -------------------------------------------------------------------------
    14     12   
    15     13   source [file join \
    16     14   	[file dirname [file dirname [file join [pwd] [info script]]]] \
    17     15   	devtools testutilities.tcl]
    18     16   
    19     17   testsNeedTcl     8.2
    20     18   testsNeedTcltest 1.0
    21     19   
    22     20   support {
    23     21       use textutil/expander.tcl textutil::expander
           22  +    use fileutil/fileutil.tcl fileutil
    24     23   }
    25     24   testing {
    26     25       useLocal doctoc.tcl doctools::toc
    27     26   }
    28     27   
    29     28   # -------------------------------------------------------------------------
    30     29   
................................................................................
   286    285       catch {mydoctoc format foo} result
   287    286       mydoctoc destroy
   288    287       set result
   289    288   } {Doctoc Error in plain text at line 1, column 0:
   290    289   [plain_text foo]
   291    290   --> (FmtError) TOC error (toc/plaintext), "plain_text foo" : Plain text beyond whitespace is not allowed..}
   292    291   
   293         -test docidx-9.1 {doctoc syntax v1.1, empty toc, ok} {
   294         -    new mydocidx -format null
   295         -    set result [mydocidx format {[toc_begin TOC Test][toc_end]}]
   296         -    mydocidx destroy
          292  +test doctoc-9.1 {doctoc syntax v1.1, empty toc, ok} {
          293  +    new mydoctoc -format null
          294  +    set result [mydoctoc format {[toc_begin TOC Test][toc_end]}]
          295  +    mydoctoc destroy
          296  +    set result
          297  +} {}
          298  +
          299  +test doctoc-9.2 {doctoc syntax v1.1, mixing items and divisions, ok} {
          300  +    new mydoctoc -format null
          301  +    set result [mydoctoc format {[toc_begin TOC Test][item I1f i1 i1d][division_start D Df][item I2f i2 i2d][division_end][toc_end]}]
          302  +    mydoctoc destroy
   297    303       set result
   298    304   } {}
   299    305   
   300         -test docidx-9.2 {doctoc syntax v1.1, mixing items and divisions, ok} {
   301         -    new mydocidx -format null
   302         -    set result [mydocidx format {[toc_begin TOC Test][item I1f i1 i1d][division_start D Df][item I2f i2 i2d][division_end][toc_end]}]
   303         -    mydocidx destroy
          306  +test doctoc-9.3 {doctoc syntax v1.1, empty division, ok} {
          307  +    new mydoctoc -format null
          308  +    set result [mydoctoc format {[toc_begin TOC Test][division_start D Df][division_end][toc_end]}]
          309  +    mydoctoc destroy
   304    310       set result
   305    311   } {}
   306    312   
   307         -test docidx-9.3 {doctoc syntax v1.1, empty division, ok} {
   308         -    new mydocidx -format null
   309         -    set result [mydocidx format {[toc_begin TOC Test][division_start D Df][division_end][toc_end]}]
   310         -    mydocidx destroy
   311         -    set result
   312         -} {}
          313  +
          314  +# -------------------------------------------------------------------------
          315  +## Series of tests for all available backends, check their formatting.
          316  +
          317  +set k 11
          318  +foreach format {
          319  +    html tmml nroff
          320  +    text wiki null
          321  +} {
          322  +    set n 0
          323  +    foreach src [TestFilesGlob tests/toc/toc/*] {
          324  +	if {[file tail $src] == "CVS"} continue
          325  +
          326  +	# Get the expected result
          327  +	set dst [localPath [file join tests toc $format [file tail $src]]]
          328  +	set map {} ; lappend map @USR@ $tcl_platform(user)
          329  +	set rem {} ; lappend rem $tcl_platform(user) @USR@
          330  +	if {$format eq "nroff"} {
          331  +		lappend map ".so man.macros\n" [fileutil::cat [localPath mpformats/man.macros]]
          332  +	}
          333  +	if {[catch {
          334  +	    set expected [string map $map [fileutil::cat $dst]]
          335  +	}]} { set expected **missing** }
          336  +
          337  +	test doctoc-${format}-${k}.$n "doctoc backends, $format/[file tail $src]" {
          338  +	    new mydoctoc
          339  +	    mydoctoc configure \
          340  +		-format    $format \
          341  +		-file      .FILE.
          342  +	    if {[catch {
          343  +		set res [mydoctoc format [fileutil::cat $src]]
          344  +	    }]} {
          345  +		set res $::errorInfo
          346  +	    }
          347  +	    mydoctoc destroy
          348  +	    #fileutil::writeFile ${dst}.actual [string map $rem $res]
          349  +	    set res
          350  +	} $expected
          351  +
          352  +	#fileutil::writeFile ${dst}.expected $expected
          353  +	incr n
          354  +    }
          355  +    incr k
          356  +}
          357  +
          358  +# -------------------------------------------------------------------------
   313    359   
   314    360   namespace forget ::doctools::toc::new
   315    361   
   316    362   # -------------------------------------------------------------------------
   317         -
   318    363   testsuiteCleanup
   319    364   return

Changes to modules/doctools/doctools.test.

     1      1   # -*- tcl -*-
     2      2   # doctools.test:  tests for the doctools package.
     3      3   #
     4      4   # This file contains a collection of tests for one or more of the Tcl
     5      5   # built-in commands.  Sourcing this file into Tcl runs the tests and
     6      6   # generates output for errors.  No output means no errors were found.
     7      7   #
     8         -# Copyright (c) 2003-2010 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
            8  +# Copyright (c) 2003-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
     9      9   # All rights reserved.
    10         -#
    11         -# RCS: @(#) $Id: doctools.test,v 1.28 2011/01/13 02:41:44 andreas_kupries Exp $
    12     10   
    13     11   # -------------------------------------------------------------------------
    14     12   
    15     13   source [file join \
    16     14   	[file dirname [file dirname [file join [pwd] [info script]]]] \
    17     15   	devtools testutilities.tcl]
    18     16   
................................................................................
   314    312   --> (FmtError) Manpage error (body), "plain_text foo" : Plain text not allowed outside of the body of the manpage.}
   315    313   
   316    314   # -------------------------------------------------------------------------
   317    315   ## Series of tests for all available backends, check their formatting.
   318    316   
   319    317   set k 11
   320    318   foreach format {
   321         -    html  tmml
   322         -    nroff latex
   323         -    text  wiki
          319  +    html  tmml nroff
          320  +    latex text wiki
   324    321       desc  list null
   325    322   } {
   326    323       set n 0
   327    324       foreach src [TestFilesGlob tests/man/*] {
   328    325   	if {[file tail $src] == "CVS"} continue
   329    326   
   330    327   	# Get the expected result
   331    328   	set dst [localPath [file join tests $format [file tail $src]]]
   332         -	set map @ID@   ; lappend map \$Id\$ ; lappend map @USR@ $tcl_platform(user)
   333         -	set rem \$Id\$ ; lappend rem @ID@   ; lappend $tcl_platform(user) @USR@
          329  +	set map {} ; lappend map @USR@ $tcl_platform(user)
          330  +	set rem {} ; lappend rem $tcl_platform(user) @USR@
   334    331   	if {$format eq "nroff"} {
   335    332   		lappend map ".so man.macros\n" [fileutil::cat [localPath mpformats/man.macros]]
   336    333   	}
   337    334   	if {[catch {
   338    335   	    set expected [string map $map [fileutil::cat $dst]]
   339    336   	}]} { set expected **missing** }
   340    337   
................................................................................
   367    364   
   368    365   set n 0
   369    366   foreach src [TestFilesGlob tests/man/*] {
   370    367       if {[file tail $src] == "CVS"} continue
   371    368   
   372    369       # Get the expected result
   373    370       set dst [localPath [file join tests html [file tail $src]]]
   374         -    set map @ID@   ; lappend map \$Id\$ ; lappend map @USR@ $tcl_platform(user)
   375         -    set rem \$Id\$ ; lappend rem @ID@   ; lappend $tcl_platform(user) @USR@
          371  +    set map {} ; lappend map @USR@ $tcl_platform(user)
          372  +    set rem {} ; lappend rem $tcl_platform(user) @USR@
   376    373   
   377    374       if {[catch {
   378    375   	set expected [string map $map [fileutil::cat $dst]]
   379    376       }]} { set expected **missing** }
   380    377   
   381    378       # Transform regular output to contents of body/, i.e. raw output.
   382    379       regsub {</body>.*} $expected {} expected
   383    380       regsub {.*<body>}  $expected {} expected
   384    381       append expected \n
   385         -    if {$n == 5 || $n == 8} { set expected \n$expected }
          382  +    #if {$n == 5 || $n == 8} { set expected \n$expected }
   386    383   
   387    384       # Run the test ...
   388    385       test doctools-html-raw-11.$n "doctools backends, html-raw/[file tail $src]" {
   389    386   	new mydoctools
   390    387   	mydoctools configure \
   391    388   	    -format    html \
   392    389   	    -module    .MODULE. \

Changes to modules/doctools/mpformats/_html.tcl.

     1      1   # -*- tcl -*-
     2         -# Copyright (c) 2001-2008 Andreas Kupries <andreas_kupries@sourceforge.net>
            2  +# Copyright (c) 2001-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     3      3   #
     4      4   # Helper rules for the creation of the memchan website from the .exp files.
     5      5   # General formatting instructions ...
     6         -
            6  +#
     7      7   # htmlEscape text --
     8      8   #	Replaces HTML markup characters in $text with the
     9      9   #	appropriate entity references.
    10     10   #
    11     11   
    12     12   global textMap;
    13     13   set    textMap {
................................................................................
    90     90   
    91     91       if 0 {
    92     92   	puts_stderr @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    93     93   	puts_stderr $text
    94     94   	puts_stderr @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    95     95       }
    96     96   
    97         -    return $text
           97  +    return [string trimleft $text]
    98     98   }
    99     99   
   100    100   # markup text --
   101    101   #	Protect markup characters in $text with \1.
   102    102   #	These will be stripped out in PostProcess.
   103    103   #
   104    104   proc markup {text} {

Changes to modules/doctools/mpformats/_nroff.tcl.

     1      1   # -*- tcl -*-
     2      2   #
     3      3   # -- nroff commands
     4      4   #
     5         -# Copyright (c) 2003-2005 Andreas Kupries <andreas_kupries@sourceforge.net>
     6         -
            5  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     7      6   
     8      7   ################################################################
     9      8   # nroff specific commands
    10      9   #
    11     10   # All dot-commands (f.e. .PP) are returned with a leading \n\1,
    12     11   # enforcing that they are on a new line and will be protected as markup.
    13     12   # Any empty line created because of this is filtered out in the 
................................................................................
   174    173   
   175    174       lappend map	\n\1.IP\n\1.\1.\n  \n\1.IP\n\1.\1.\n
   176    175       lappend map \n\1.IP\n\1.       \n\1.
   177    176   
   178    177       set lines [string map $map $lines]
   179    178   
   180    179       # Return the modified result buffer
   181         -    return [string map $finalMap $lines]
          180  +    return [string trim [string map $finalMap $lines]]\n
   182    181   }
   183    182   

Changes to modules/doctools/mpformats/_text.tcl.

     1      1   # -*- tcl -*-
     2      2   #
     3         -# _text.tcl -- Core support for text engines.
     4         -
            3  +# -- Core support for text engines.
            4  +#
            5  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            6  +# Freely redistributable.
     5      7   
     6      8   ################################################################
     7      9   
     8     10   if {0} {
     9     11       catch {rename proc proc__} msg ; puts_stderr >>$msg
    10     12       proc__ proc {cmd argl body} {
    11     13   	puts_stderr "proc $cmd $argl ..."
................................................................................
    21     23       puts_stderr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    22     24       rename proc {}
    23     25       rename proc__ proc
    24     26       puts_stderr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    25     27   }
    26     28   
    27     29   
    28         -################################################################
    29         -# Formatting constants ... Might be engine variables in the future.
    30         -
    31         -global lmarginIncrement ; set lmarginIncrement 4
    32         -global rmarginThreshold ; set rmarginThreshold 20
    33         -global bulleting        ; set bulleting        {* - # @ ~ %}
    34         -global enumeration      ; set enumeration      {[%] (%) <%>}
    35         -
    36         -proc Bullet {ivar} {
    37         -    global bulleting ; upvar $ivar i
    38         -    set res [lindex $bulleting $i]
    39         -    set i [expr {($i + 1) % [llength $bulleting]}]
    40         -    return $res
    41         -}
    42         -
    43         -proc EnumBullet {ivar} {
    44         -    global enumeration ; upvar $ivar i
    45         -    set res [lindex $enumeration $i]
    46         -    set i [expr {($i + 1) % [llength $enumeration]}]
    47         -    return $res
    48         -}
    49         -
    50         -################################################################
    51         -
    52         -#
    53         -# The engine maintains several data structures per document and pass.
    54         -# Most important is an internal representation of the text better
    55         -# suited to perform the final layouting, the display list. Elements of
    56         -# the display list are lists containing 2 elements, an operation, and
    57         -# its arguments, in this order. The arguments are a list again, its
    58         -# contents are specific to the operation.
    59         -#
    60         -# The operations are:
    61         -#
    62         -# - SECT	Section.    Title.
    63         -# - SUBSECT     Subsection. Title.
    64         -# - PARA	Paragraph.  Environment reference and text.
    65         -#
    66         -# The PARA operation is the workhorse of the engine, dooing all the
    67         -# formatting, using the information in an "environment" as the guide
    68         -# for doing so. The environments themselves are generated during the
    69         -# second pass through the contents. They contain the information about
    70         -# nesting (i.e. indentation), bulleting and the like.
    71         -#
    72         -
    73         -global cmds ; set cmds [list]   ; # Display list
    74         -global pEnv ; array set pEnv {} ; # Defined paragraph environments (bulleting, indentation, other).
    75         -global para ; set para ""       ; # Text buffer for paragraphs.
    76         -
    77         -global nextId     ; set       nextId     0      ; # Counter for environment generation.
    78         -global currentId  ; set       currentId  {}     ; # Id of current environment in 'pEnv'
    79         -global currentEnv ; array set currentEnv {}     ; # Current environment, expanded form.
    80         -global contexts   ; set       contexts   [list] ; # Stack of saved environments.
    81         -global off        ; set off   1                 ; # Suppression of plain text in some places.
    82         -
    83         -################################################################
    84         -# Management of the current context.
    85         -
    86         -proc Text  {text}    {global para ; append para $text ; return}
    87         -proc Store {op args} {global cmds ; lappend cmds [list $op $args] ; return}
    88         -proc Off   {}        {global off ; set off 1 ; return}
    89         -proc On    {}        {global off para ; set off 0 ; set para "" ; return}
    90         -proc IsOff {}        {global off ; return [expr {$off == 1}]}
    91         -
    92         -# Debugging ...
    93         -#proc Text  {text}    {puts_stderr "TXT \{$text\}"; global para; append para $text ; return}
    94         -#proc Store {op args} {puts_stderr "STO $op $args"; global cmds; lappend cmds [list $op $args]; return}
    95         -#proc Off   {}        {puts_stderr OFF ; global off ; set off 1 ; return}
    96         -#proc On    {}        {puts_stderr ON_ ; global off para ; set off 0 ; set para "" ; return}
    97         -
    98         -
    99         -proc NewEnv {name script} {
   100         -    global currentId  nextId currentEnv
   101         -
   102         -    #puts_stderr "NewEnv ($name)"
   103         -
   104         -    set    parentId  $currentId
   105         -    set    currentId $nextId
   106         -    incr              nextId
   107         -
   108         -    append currentEnv(NAME) -$parentId-$name
   109         -    set currentEnv(parent) $parentId
   110         -    set currentEnv(id)     $currentId
   111         -
   112         -    # Always squash a verbatim environment inherited from the previous
   113         -    # environment ...
   114         -    catch {unset currentEnv(verbenv)}
   115         -
   116         -    uplevel $script
   117         -    SaveEnv
   118         -    return $currentId
   119         -}
   120         -
   121         -################################################################
   122         -
   123         -proc TextInitialize {} {
   124         -    global off  ; set off 1
   125         -    global cmds ; set cmds [list]   ; # Display list
   126         -    global pEnv ; array set pEnv {} ; # Defined paragraph environments (bulleting, indentation, other).
   127         -    global para ; set para ""       ; # Text buffer for paragraphs.
   128         -
   129         -    global nextId     ; set       nextId     0      ; # Counter for environment generation.
   130         -    global currentId  ; set       currentId  {}     ; # Id of current environment in 'pEnv'
   131         -    global currentEnv ; array set currentEnv {}     ; # Current environment, expanded form.
   132         -    global contexts   ; set       contexts   [list] ; # Stack of saved environments.
   133         -
   134         -    # lmargin  = location of left margin for text.
   135         -    # prefix   = prefix string to use for all lines.
   136         -    # wspfx    = whitespace prefix for all but the first line
   137         -    # listtype = type of list, if any
   138         -    # bullet   = bullet to use for unordered, bullet template for ordered.
   139         -    # verbatim = flag if verbatim formatting requested.
   140         -    # next     = if present the environment to use after closing the paragraph using this one.
   141         -
   142         -    NewEnv Base {
   143         -	array set currentEnv {
   144         -	    lmargin     0
   145         -	    prefix      {}
   146         -	    wspfx       {}
   147         -	    listtype    {}
   148         -	    bullet      {}
   149         -	    verbatim    0
   150         -	    bulleting   0
   151         -	    enumeration 0
   152         -	}
   153         -    }
   154         -    return
   155         -}
   156         -
   157         -################################################################
   158         -
   159         -proc Section    {name} {Store SECT    $name ; return}
   160         -proc Subsection {name} {Store SUBSECT $name ; return}
   161         -
   162         -proc CloseParagraph {{id {}}} {
   163         -    global para currentId
   164         -    if {$para != {}} {
   165         -	if {$id == {}} {set id $currentId}
   166         -	Store PARA $id $para
   167         -	#puts_stderr "CloseParagraph $id"
   168         -    }
   169         -    set para ""
   170         -    return
   171         -} 
   172         -
   173         -proc SaveContext {} {
   174         -    global  contexts  currentId
   175         -    lappend contexts $currentId
   176         -
   177         -    #global currentEnv ; puts_stderr "Save>> $currentId ($currentEnv(NAME))"
   178         -    return
   179         -}
   180         -
   181         -proc RestoreContext {} {
   182         -    global                contexts
   183         -    SetContext   [lindex $contexts end]
   184         -    set contexts [lrange $contexts 0 end-1]
   185         -
   186         -    #global currentId currentEnv ; puts_stderr "<<Restored $currentId ($currentEnv(NAME))"
   187         -    return
   188         -}
   189         -
   190         -proc SetContext {id} {
   191         -    global    currentId currentEnv pEnv
   192         -    set       currentId $id
   193         -
   194         -    # Ensure that array is clean before setting hte new block of
   195         -    # information.
   196         -    unset     currentEnv
   197         -    array set currentEnv $pEnv($currentId)
   198         -
   199         -    #puts_stderr "--Set $currentId ($currentEnv(NAME))"
   200         -    return
   201         -}
   202         -
   203         -proc SaveEnv {} {
   204         -    global pEnv  currentId             currentEnv
   205         -    set    pEnv($currentId) [array get currentEnv]
   206         -    return
   207         -}
   208         -
   209         -################################################################
   210         -
   211         -proc NewVerbatim {} {
   212         -    global currentEnv
   213         -    return [NewEnv Verbatim {set currentEnv(verbatim) 1}]
   214         -}
   215         -
   216         -proc Verbatim {} {
   217         -    global currentEnv
   218         -    if {![info exists currentEnv(verbenv)]} {
   219         -	SaveContext
   220         -	set verb [NewVerbatim]
   221         -	RestoreContext
   222         -
   223         -	# Remember verbatim mode in the base environment
   224         -	set currentEnv(verbenv) $verb
   225         -	SaveEnv
   226         -    }
   227         -    return $currentEnv(verbenv)
   228         -}
   229         -
   230         -################################################################
   231         -
   232         -proc text_plain_text {text} {
   233         -    #puts_stderr "<<text_plain_text>>"
   234         -
   235         -    if  {[IsOff]} {return}
   236         -
   237         -    # Note: Whenever we get plain text it is possible that a macro for
   238         -    # visual markup actually generated output before the expander got
   239         -    # to the current text. This output was captured by the expander in
   240         -    # its current context. Given the current organization of the
   241         -    # engine we have to retrieve this formatted text from the expander
   242         -    # or it will be lost. This is the purpose of the 'ctopandclear',
   243         -    # which retrieves the data and also clears the capture buffer. The
   244         -    # latter to prevent us from retrieving it again later, after the
   245         -    # next macro added more data.
   246         -
   247         -    set text [ex_ctopandclear]$text
   248         -
   249         -    # ... TODO ... Handling of example => verbatim
   250         -
   251         -    if {[string length [string trim $text]] == 0} return
   252         -
   253         -    Text $text
   254         -    return
   255         -}
   256         -
   257         -################################################################
   258         -
   259         -proc text_postprocess {text} {
   260         -
   261         -    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   262         -    #puts_stderr <<$text>>
   263         -    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   264         -
   265         -    global cmds
   266         -    # The argument is not relevant. Access the display list, perform
   267         -    # the final layouting and return its result.
   268         -
   269         -    set linebuffer [list]
   270         -    array set state {lmargin 0 rmargin 0}
   271         -    foreach cmd $cmds {
   272         -	foreach {op arguments} $cmd break
   273         -	$op $arguments
   274         -    }
   275         -
   276         -    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   277         -
   278         -    return [join $linebuffer \n]
   279         -}
   280         -
   281         -
   282         -proc SECT {text} {
   283         -    upvar linebuffer linebuffer
   284         -
   285         -    # text is actually the list of arguments, having one element, the text.
   286         -    set text [lindex $text 0]
   287         -    #puts_stderr "SECT $text"
   288         -    #puts_stderr ""
   289         -
   290         -    # Write section title, underline it
   291         -
   292         -    lappend linebuffer ""
   293         -    lappend linebuffer $text
   294         -    lappend linebuffer [textutil::repeat::strRepeat = [string length $text]]
   295         -    return
   296         -}
   297         -
   298         -proc SUBSECT {text} {
   299         -    upvar linebuffer linebuffer
   300         -
   301         -    # text is actually the list of arguments, having one element, the text.
   302         -    set text [lindex $text 0]
   303         -    #puts_stderr "SUBSECT $text"
   304         -    #puts_stderr ""
   305         -
   306         -    # Write subsection title, underline it (with less emphasis)
   307         -
   308         -    lappend linebuffer ""
   309         -    lappend linebuffer $text
   310         -    lappend linebuffer [textutil::repeat::strRepeat - [string length $text]]
   311         -    return
   312         -}
   313         -
   314         -proc PARA {arguments} {
   315         -    global pEnv
   316         -    upvar linebuffer linebuffer
   317         -
   318         -    foreach {env text} $arguments break
   319         -    array set para $pEnv($env)
   320         -
   321         -    #puts_stderr "PARA $env"
   322         -    #parray_stderr para
   323         -    #puts_stderr "     \{$text\}"
   324         -    #puts_stderr ""
   325         -
   326         -    # Use the information in the referenced environment to format the paragraph.
   327         -
   328         -    if {$para(verbatim)} {
   329         -	set text [textutil::adjust::undent $text]
   330         -    } else {
   331         -	# The size is determined through the set left and right margins
   332         -	# right margin is fixed at 80, left margin is variable. Size
   333         -	# is at least 20. I.e. when left margin > 60 right margin is
   334         -	# shifted out to the right.
   335         -
   336         -	set size [expr {80 - $para(lmargin)}]
   337         -	if {$size < 20} {set size 20}
   338         -
   339         -	set text [textutil::adjust::adjust $text -length $size]
   340         -    }
   341         -
   342         -    # Now apply prefixes, (ws prefixes bulleting), at last indentation.
   343         -
   344         -    if {[string length $para(prefix)] > 0} {
   345         -	set text [textutil::adjust::indent $text $para(prefix)]
   346         -    }
   347         -
   348         -    if {$para(listtype) != {}} {
   349         -	switch -exact $para(listtype) {
   350         -	    bullet {
   351         -		# Indent for bullet, but not the first line. This is
   352         -		# prefixed by the bullet itself.
   353         -
   354         -		set thebullet $para(bullet)
   355         -	    }
   356         -	    enum {
   357         -		# Handling the enumeration counter. Special case: An
   358         -		# example as first paragraph in an item has to use the
   359         -		# counter in environment it is derived from to prevent
   360         -		# miscounting.
   361         -
   362         -		if {[info exists para(example)]} {
   363         -		    set parent $para(parent)
   364         -		    array set __ $pEnv($parent)
   365         -		    if {![info exists __(counter)]} {
   366         -			set __(counter) 1
   367         -		    } else {
   368         -			incr __(counter)
   369         -		    }
   370         -		    set pEnv($parent) [array get __] ; # Save context change ...
   371         -		    set n $__(counter)
   372         -		} else {
   373         -		    if {![info exists para(counter)]} {
   374         -			set para(counter) 1
   375         -		    } else {
   376         -			incr para(counter)
   377         -		    }
   378         -		    set pEnv($env) [array get para] ; # Save context change ...
   379         -		    set n $para(counter)
   380         -		}
   381         -
   382         -		set thebullet [string map [list % $n] $para(bullet)]
   383         -	    }
   384         -	}
   385         -
   386         -	set blen [string length $thebullet]
   387         -	if {$blen >= [string length $para(wspfx)]} {
   388         -	    set text    "$thebullet\n[textutil::adjust::indent $text $para(wspfx)]"
   389         -	} else {
   390         -	    set fprefix $thebullet[string range $para(wspfx) $blen end]
   391         -	    set text    "${fprefix}[textutil::adjust::indent $text $para(wspfx) 1]"
   392         -	}
   393         -    }
   394         -
   395         -    if {$para(lmargin) > 0} {
   396         -	set text [textutil::adjust::indent $text \
   397         -		      [textutil::repeat::strRepeat " " $para(lmargin)]]
   398         -    }
   399         -
   400         -    lappend linebuffer ""
   401         -    lappend linebuffer $text
   402         -    return
   403         -}
   404         -
   405         -################################################################
   406         -
   407         -proc strong      {text} {return *${text}*}
   408         -proc em          {text} {return _${text}_}
   409         -
   410         -################################################################
   411         -
   412     30   proc parray_stderr {a {pattern *}} {
   413     31       upvar 1 $a array
   414     32       if {![array exists array]} {
   415     33           error "\"$a\" isn't an array"
   416     34       }
   417     35       set maxl 0
   418     36       foreach name [lsort [array names array $pattern]] {
................................................................................
   423     41       set maxl [expr {$maxl + [string length $a] + 2}]
   424     42       foreach name [lsort [array names array $pattern]] {
   425     43           set nameString [format %s(%s) $a $name]
   426     44           puts_stderr "    [format "%-*s = {%s}" $maxl $nameString $array($name)]"
   427     45       }
   428     46   }
   429     47   
   430         -################################################################
           48  +# # ## ### ##### ########
           49  +##
           50  +
           51  +dt_source _text_utils.tcl
           52  +# Formatting utilities
           53  +
           54  +dt_source _text_margin.tcl
           55  +# RMargin, LMI
           56  +
           57  +dt_source _text_state.tcl
           58  +# On, Off, IsOff
           59  +
           60  +dt_source _text_para.tcl
           61  +# Text, Text?, TextClear, TextPlain (-> IsOff)
           62  +
           63  +dt_source _text_cstack.tcl
           64  +# ContextReset, ContextPush, ContextPop (-> CAttrCurrent, ContextSet)
           65  +
           66  +dt_source _text_ccore.tcl
           67  +# ContextSetup, ContextSet, ContextNew, ContextCommit, CAttrName, CAttrCurrent,
           68  +# CAttrRef, CAttrUnset, CAttrSet, CAttrAppend, CAttrIncr, CAttrGet, CAttrHas
           69  +
           70  +dt_source _text_bullets.tcl
           71  +# DIB, IBullet (-> CAttrRef)
           72  +# DEB, EBullet (-> CAttrRef)
           73  +
           74  +dt_source _text_dlist.tcl
           75  +# DListClear, Section, Subsection, CloseParagraph (-> Text?, TextClear, CAttrCurrent)
           76  +# PostProcess
           77  +# - SECT    (-> SectTitle)
           78  +# - SUBSECT (-> SubsectTitle)
           79  +# - PARA (-> TEXT context accessors)
           80  +
           81  +# # ## ### ##### ########
           82  +##
           83  +
           84  +proc TextInitialize {} {
           85  +    DListClear
           86  +    TextClear
           87  +    ContextReset
           88  +    Off
           89  +    ContextSetup
           90  +    
           91  +    # Root context
           92  +    ContextNew Base {
           93  +	MarginReset
           94  +	PrefixReset
           95  +	WPrefixReset
           96  +	VerbatimOff
           97  +	ListNone
           98  +	BulletReset
           99  +	ItemReset
          100  +	EnumReset
          101  +    }
          102  +    return
          103  +}
          104  +
          105  +# # ## ### ##### ########
          106  +## `text` formatting
          107  +
          108  +proc SectTitle {lb title} {
          109  +    upvar 1 $lb lines
          110  +    #lappend lines ""
          111  +    lappend lines $title
          112  +    lappend lines [RepeatM = $title]
          113  +    return
          114  +}
          115  +
          116  +proc SubsectTitle {lb title} {
          117  +    upvar 1 $lb lines
          118  +    #lappend lines ""
          119  +    lappend lines $title
          120  +    lappend lines [RepeatM - $title]
          121  +    return
          122  +}
          123  +
          124  +proc Strong {text} { return *${text}* }
          125  +proc Em     {text} { return _${text}_ }
          126  +
          127  +# # ## ### ##### ########
          128  +## Bulleting
          129  +#
          130  +# itembullet  = index of the bullet to use in the next itemized list
          131  +# enumbullet  = index of the bullet to use in the next enumerated list
          132  +
          133  +proc EnumReset {} { CAttrSet enumbullet 0 }
          134  +proc ItemReset {} { CAttrSet itembullet 0 }
          135  +
          136  +# # ## ### ##### ########
          137  +##
          138  +
          139  +proc text_plain_text  {text} { TextPlain   $text }
          140  +proc text_postprocess {text} { PostProcess $text }
          141  +
          142  +#return
          143  +
          144  +# Debugging
          145  +proc text_postprocess {text} {
          146  +    if {[set code [catch {
          147  +	PostProcess $text
          148  +    } res]]} {
          149  +	global errorInfo errorCode
          150  +	puts_stderr
          151  +	puts_stderr $errorCode
          152  +	puts_stderr $errorInfo
          153  +	return -code $code -errorinfo $errorInfo -errorcode $errorCode $msg
          154  +    }
          155  +    return $res
          156  +}

Added modules/doctools/mpformats/_text_bullets.tcl.

            1  +# -*- tcl -*-
            2  +#
            3  +# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Freely redistributable.
            5  +#
            6  +# _text_bullets.tcl -- Bulleting configuration and use.
            7  +
            8  +global itembullets      ; set itembullets      {* - # @ ~ %}
            9  +global enumbullets      ; set enumbullets      {[%] (%) <%>}
           10  +
           11  +proc IB  {}        { global itembullets ; return $itembullets      }
           12  +proc EB  {}        { global enumbullets ; return $enumbullets      }
           13  +proc DIB {bullets} { global itembullets ; set itembullets $bullets }
           14  +proc DEB {bullets} { global enumbullets ; set enumbullets $bullets }
           15  +
           16  +proc NB {bullets countervar} {
           17  +    upvar 1 $countervar counter
           18  +    set bullet  [lindex $bullets $counter]
           19  +    set counter [expr {($counter + 1) % [llength $bullets]}]
           20  +    return $bullet
           21  +}
           22  +
           23  +proc ItemBullet {countervar} { upvar 1 $countervar counter ; NB [IB] counter }
           24  +proc EnumBullet {countervar} { upvar 1 $countervar counter ; NB [EB] counter }
           25  +
           26  +# xref current content
           27  +proc IBullet {} { ItemBullet [CAttrRef itembullet] }
           28  +proc EBullet {} { EnumBullet [CAttrRef enumbullet] }
           29  +
           30  +return

Added modules/doctools/mpformats/_text_ccore.tcl.

            1  +# -*- tcl -*-
            2  +#
            3  +# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Freely redistributable.
            5  +#
            6  +# _text_ccore.tcl -- Management of current context, and database of all contexts
            7  +
            8  +global nextId      ; # Counter for context generation.
            9  +global contextData ; # In-memory database of known contexts.
           10  +global contextName ; # Map context handles to name.
           11  +
           12  +global currentHandle  ; # Handle of context in 'currentContext'.
           13  +global currentContext ; # Current context, for direct access of all attributes
           14  +
           15  +# # ## ### ##### ########
           16  +## Internals
           17  +
           18  +proc ContextCommit {} {
           19  +    global contextData  currentHandle             currentContext
           20  +    set    contextData($currentHandle) [array get currentContext]
           21  +    return
           22  +}
           23  +
           24  +proc NextId {} {
           25  +    global nextId
           26  +    set new $nextId
           27  +    incr     nextId
           28  +    return $new
           29  +}
           30  +
           31  +# # ## ### ##### ########
           32  +## Basic management
           33  +
           34  +proc ContextSetup {} {
           35  +    global contextData ; unset -nocomplain contextData ; array set contextData {}
           36  +    global contextName ; unset -nocomplain contextName ; array set contextName {}
           37  +    global nextId ; set                                            nextId 0
           38  +    
           39  +    global currentHandle  ; set       currentHandle  {}
           40  +    global currentContext ; array set currentContext {}
           41  +    return
           42  +}
           43  +
           44  +proc ContextSet {id} {
           45  +    global    currentHandle currentContext contextData
           46  +    set       currentHandle $id
           47  +
           48  +    #puts_stderr "--Set ($id) ([CAttrName $id])"
           49  +
           50  +    # Ensure that array is clean before setting hte new block of
           51  +    # information.
           52  +    unset     currentContext
           53  +    array set currentContext $contextData($currentHandle)
           54  +    return
           55  +}
           56  +
           57  +proc ContextNew {name script} {
           58  +    global currentHandle contextName currentContext
           59  +    set in [array get currentContext]
           60  +    
           61  +    set parentId  $currentHandle
           62  +    set currentHandle [NextId]
           63  +
           64  +    #puts_stderr "ContextNew ${currentHandle}:($name) in ${parentId}:[CAttrName $parentId]"
           65  +
           66  +    CAttrAppend NAME   /${name}:$currentHandle
           67  +    CAttrSet    parent $parentId
           68  +    CAttrSet    id     $currentHandle
           69  +    CAttrUnset  verbenv ;# Each context must have its own verbatim variant.
           70  +    
           71  +    # Customize the context - modifier commands
           72  +    uplevel $script
           73  +
           74  +    # ContextCommit state for future use.
           75  +    ContextCommit
           76  +    set contextName($currentHandle) [CAttrGet NAME]
           77  +    
           78  +    return $currentHandle
           79  +}
           80  +
           81  +# # ## ### ##### ########
           82  +## Generic accessors
           83  +
           84  +proc CAttrName {{id {}}} {
           85  +    global contextName
           86  +    if {$id == {}} { global currentHandle ; set id $currentHandle }
           87  +    if {![info exists contextName($id)]} { return <$id> }
           88  +    return $contextName($id)
           89  +}
           90  +
           91  +proc CAttrCurrent {} { global currentHandle ; return $currentHandle }
           92  +
           93  +proc CAttrSet    {key value}     { global currentContext ; set    currentContext($key) $value }
           94  +proc CAttrAppend {key value}     { global currentContext ; append currentContext($key) $value }
           95  +proc CAttrIncr   {key {value 1}} { global currentContext ; incr   currentContext($key) $value }
           96  +proc CAttrGet    {key}           { global currentContext ; set currentContext($key) }
           97  +proc CAttrHas    {key}           { global currentContext ; info exists currentContext($key) }
           98  +proc CAttrUnset  {key}           { global currentContext ; catch { unset currentContext($key) } }
           99  +proc CAttrRef    {key}           { return "::currentContext($key)" }
          100  +
          101  +# # ## ### ##### ########
          102  +## Verbatim
          103  +#
          104  +# Attributes:
          105  +# - verbatim    = flag if verbatim formatting requested, i.e. no paragraph reflow.
          106  +# - verbenv     = if present, id of verbatim variant of this environment
          107  +
          108  +proc NewVerbatim {} {
          109  +    return [ContextNew Verbatim { VerbatimOn }]
          110  +}
          111  +
          112  +proc Verbatim {} {
          113  +    if {![CAttrHas verbenv]} {
          114  +	ContextPush
          115  +	set verbenv [NewVerbatim]
          116  +	ContextPop
          117  +	# Remember the associated verbatim mode in the base
          118  +	# environment and database.
          119  +	CAttrSet verbenv $verbenv
          120  +	ContextCommit
          121  +    }
          122  +    return [CAttrGet verbenv]
          123  +}
          124  +
          125  +proc VerbatimOff {} { CAttrSet verbatim 0 }
          126  +proc VerbatimOn  {} { CAttrSet verbatim 1 }
          127  +proc Verbatim?   {} { CAttrGet verbatim }
          128  +
          129  +# # ## ### ##### ########
          130  +
          131  +proc Parent? {} { CAttrGet parent }
          132  +
          133  +# # ## ### ##### ########
          134  +return

Added modules/doctools/mpformats/_text_cstack.tcl.

            1  +# -*- tcl -*-
            2  +#
            3  +# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Freely redistributable.
            5  +#
            6  +# _text_cstack.tcl -- Stack of contexts and accessors
            7  +
            8  +global contexts ; set contexts {}
            9  +
           10  +################################################################
           11  +# Management of the stack
           12  +
           13  +proc ContextReset {} { global contexts ; set contexts {} ; return }
           14  +
           15  +proc ContextPush {} {
           16  +    global  contexts
           17  +    lappend contexts [set id [CAttrCurrent]]
           18  +
           19  +    #puts_stderr "Push:[llength $contexts]>> [CAttrName $id]"
           20  +    return
           21  +}
           22  +
           23  +proc ContextPop {} {
           24  +    global contexts
           25  +    set id       [lindex $contexts end]
           26  +    set contexts [lrange $contexts 0 end-1]
           27  +
           28  +    #puts_stderr "<<Pop:[llength $contexts]  [CAttrName $id]"
           29  +    ContextSet   $id
           30  +    return
           31  +}

Added modules/doctools/mpformats/_text_dlist.tcl.

            1  +# -*- tcl -*-
            2  +#
            3  +# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Freely redistributable.
            5  +#
            6  +# _text_dlist.tcl -- Display list variables and accessors
            7  +
            8  +#
            9  +# The engine maintains several data structures per document and pass.
           10  +# Most important is an internal representation of the text better
           11  +# suited to perform the final layouting, the display list. Elements of
           12  +# the display list are lists containing 2 elements, an operation, and
           13  +# its arguments, in this order. The arguments are a list again, its
           14  +# contents are specific to the operation.
           15  +#
           16  +# The operations are:
           17  +#
           18  +# - SECT	Section.    Title.
           19  +# - SUBSECT     Subsection. Title.
           20  +# - PARA	Paragraph.  Context reference and text.
           21  +#
           22  +# The PARA operation is the workhorse of the engine, dooing all the
           23  +# formatting, using the information in an "context" as the guide
           24  +# for doing so. The contexts themselves are generated during the
           25  +# second pass through the contents. They contain the information about
           26  +# nesting (i.e. indentation), bulleting and the like.
           27  +#
           28  +
           29  +# # ## ### ##### ########
           30  +## State: Display list
           31  +
           32  +global __dlist
           33  +
           34  +# # ## ### ##### ########
           35  +## Internal: Extend
           36  +
           37  +proc Store {op args} { global __dlist ; lappend __dlist [list $op $args] ; return}
           38  +
           39  +# Debugging ...
           40  +#proc Store {op args} {puts_stderr "STO $op $args"; global __dlist; lappend __dlist [list $op $args]; return}
           41  +
           42  +# # ## ### ##### ########
           43  +## API
           44  +#
           45  +# API Section		Add section
           46  +# API Subsection	Add subsection
           47  +# API CloseParagraph	Add paragraph using text and (current) env
           48  +#                       Boolean result indicates if something was added, or not
           49  +
           50  +proc DListClear {} { global __dlist ; unset -nocomplain __dlist ; set __dlist {} }
           51  +
           52  +proc Section    {name} {Store SECT    $name ; return}
           53  +proc Subsection {name} {Store SUBSECT $name ; return}
           54  +
           55  +proc CloseParagraph {{id {}}} {
           56  +    set para [Text?]
           57  +    if {$para == {}} { return 0 }
           58  +    if {$id == {}} { set id [CAttrCurrent] }
           59  +    Store PARA $id $para
           60  +    #puts_stderr "CloseParagraph $id [CAttrName $id]"
           61  +    TextClear
           62  +    return 1
           63  +} 
           64  +
           65  +proc PostProcess {text} {
           66  +    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           67  +    #puts_stderr <<$text>>
           68  +    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           69  +
           70  +    global __dlist
           71  +    # The argument is not relevant. Access the display list, perform
           72  +    # the final layouting and return its result.
           73  +
           74  +    set lines {}
           75  +    array set state {lmargin 0 rmargin 0}
           76  +    foreach cmd $__dlist {
           77  +	lappend lines ""
           78  +	foreach {op arguments} $cmd break
           79  +	$op $arguments
           80  +    }
           81  +
           82  +    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           83  +
           84  +    return [Compose lines]\n
           85  +}
           86  +
           87  +# # ## ### ##### ########
           88  +## PARA attributes
           89  +#
           90  +# Attributes
           91  +# - bullet      = bullet (template) to use for (un)ordered lists.
           92  +# - counter     = if present, item counter for enumeration list.
           93  +# - listtype    = type of list, if any.
           94  +# - lmargin     = left-indent, location of left margin for text.
           95  +# - prefix      = prefix to use for all lines of the parapgraph.
           96  +# - wspfx       = whitespace prefix for all but the first line of the paragraph.
           97  +
           98  +proc BulletReset  {} { CAttrSet bullet {} }
           99  +proc ListNone     {} { CAttrSet listtype {} }
          100  +proc MarginIn     {} { CAttrIncr lmargin [LMI] }
          101  +proc MarginReset  {} { CAttrSet lmargin 0 }
          102  +proc PrefixReset  {} { CAttrSet prefix {} }
          103  +proc WPrefixReset {} { CAttrSet wspfx {} }
          104  +
          105  +proc Prefix!   {p} { CAttrSet prefix $p }
          106  +proc WPrefix!  {p} { CAttrSet wspfx  $p }
          107  +
          108  +proc Bullet?   {} { CAttrGet bullet }
          109  +proc ListType? {} { CAttrGet listtype }
          110  +proc Margin?   {} { CAttrGet lmargin }
          111  +proc Prefix?   {} { CAttrGet prefix }
          112  +proc WPrefix?  {} { CAttrGet wspfx }
          113  +
          114  +proc List! {type bullet wprefix} {
          115  +    CAttrSet listtype $type
          116  +    CAttrSet bullet   $bullet
          117  +    CAttrSet wspfx    $wprefix
          118  +}
          119  +
          120  +proc EnumCounter {} {
          121  +    if {![CAttrHas counter]} {
          122  +	CAttrSet counter 1
          123  +    } else {
          124  +	CAttrIncr counter
          125  +    }
          126  +    ContextCommit	
          127  +    #puts_stderr "Counter ... [CAttrName] => [CAttrGet counter]"
          128  +    return [CAttrGet counter]
          129  +}
          130  +
          131  +proc EnumId {} {
          132  +    # Handling the enumeration counter.
          133  +    #
          134  +    # Special case: An example as first paragraph in an item has to
          135  +    # use the counter in the context it is derived from to prevent
          136  +    # miscounting.
          137  +
          138  +    #puts_stderr "EnumId: [CAttrName] | [CAttrName [Parent?]]"
          139  +    
          140  +    if {[Example?]} {
          141  +	ContextPush
          142  +	ContextSet [Parent?]
          143  +	set n [EnumCounter]
          144  +	ContextPop
          145  +    } else {
          146  +	set n [EnumCounter]
          147  +    }
          148  +    return $n
          149  +}
          150  +
          151  +# # ## ### ##### ########
          152  +## Hooks
          153  +
          154  +proc SECT {text} {
          155  +    #puts_stderr "SECT $text"
          156  +    #puts_stderr ""
          157  +    # text is actually the list of arguments, having one element, the text.
          158  +    upvar 1 lines lines
          159  +    set text [lindex $text 0]
          160  +    SectTitle lines $text
          161  +    return
          162  +}
          163  +
          164  +proc SUBSECT {text} {
          165  +    #puts_stderr "SUBSECT $text"
          166  +    #puts_stderr ""
          167  +    # text is actually the list of arguments, having one element, the text.
          168  +    upvar 1 lines lines
          169  +    set text [lindex $text 0]
          170  +    SubsectTitle lines $text
          171  +    return
          172  +}
          173  +
          174  +proc PARA {arguments} {
          175  +    upvar lines lines
          176  +
          177  +    # Note. As the display list is processed at the very end we can
          178  +    # reuse the current context and accessors to hold and query the
          179  +    # context of each paragraph.
          180  +    
          181  +    foreach {env text} $arguments break
          182  +    ContextSet $env
          183  +
          184  +    #puts_stderr "PARA $env"
          185  +    #parray_stderr ::currentEnv
          186  +    #puts_stderr "     \{$text\}"
          187  +    #puts_stderr ""
          188  +
          189  +    # Use the information in the referenced context to format the
          190  +    # paragraph.
          191  +
          192  +    set lm    [Margin?]
          193  +    set lt    [ListType?]
          194  +    set blank [WPrefix?]
          195  +    
          196  +    if {[Verbatim?]} {
          197  +	set text [Undent $text]
          198  +    } else {
          199  +	set  plm $lm
          200  +	incr plm [string length $blank]
          201  +	set text [Reflow $text [RMargin $plm]]
          202  +    }
          203  +
          204  +    # Now apply prefixes, (ws prefixes bulleting), at last indentation.
          205  +
          206  +    set p [Prefix?]
          207  +    if {[string length $p]} {
          208  +	set text [Indent $text $p]
          209  +    }
          210  +
          211  +    if {$lt != {}} {
          212  +	switch -exact $lt {
          213  +	    bullet {
          214  +		# Indent for bullet, but not the first line. This is
          215  +		# prefixed by the bullet itself.
          216  +		set thebullet [Bullet?]
          217  +	    }
          218  +	    enum {
          219  +		#puts_stderr EB
          220  +
          221  +		set n [EnumId]
          222  +		set thebullet [string map [list % $n] [Bullet?]]
          223  +
          224  +		#puts_stderr "E $n | $thebullet |"
          225  +	    }
          226  +	}
          227  +
          228  +	set blank [WPrefix?]
          229  +
          230  +	if {[string length $thebullet] >= [string length $blank]} {
          231  +	    # The item's bullet is longer than the space for indenting.
          232  +	    # Put bullet and text on separate lines, indent text in full.
          233  +
          234  +	    set text "$thebullet\n[Indent $text $blank]"
          235  +	} else {
          236  +	    # The item's bullet fits into the space for
          237  +	    # indenting. Make hanging indent of text and place the
          238  +	    # bullet in front of the first line, with suitable partial
          239  +	    # spacing.
          240  +
          241  +	    set text [Indent1 $text [ReHead $blank $thebullet] $blank]
          242  +	}
          243  +    }
          244  +
          245  +    if {$lm} {
          246  +	set text [Indent $text [Blank $lm]]
          247  +    }
          248  +
          249  +    lappend lines $text
          250  +    return
          251  +}
          252  +
          253  +# # ## ### ##### ########
          254  +return

Added modules/doctools/mpformats/_text_margin.tcl.

            1  +# -*- tcl -*-
            2  +#
            3  +# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Freely redistributable.
            5  +#
            6  +# _text_margin.tcl -- Margin control
            7  +
            8  +global lmarginIncrement ; set lmarginIncrement 4
            9  +global rmarginThreshold ; set rmarginThreshold 20
           10  +
           11  +proc LMI {} { global lmarginIncrement ; return $lmarginIncrement }
           12  +proc RMT {} { global rmarginThreshold ; return $rmarginThreshold }
           13  +
           14  +proc RMargin {indent} {
           15  +    set rmt [RMT]
           16  +    set rmargin [expr {80 - $indent}]
           17  +    if {$rmargin < $rmt} { set rmargin $rmt }
           18  +    return $rmargin
           19  +}
           20  +
           21  +return

Added modules/doctools/mpformats/_text_para.tcl.

            1  +# -*- tcl -*-
            2  +#
            3  +# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Freely redistributable.
            5  +#
            6  +# _text_para.tcl -- Paragraph variables and accessors - Text accumulator
            7  +
            8  +# # ## ### ##### ########
            9  +## State: Text buffer for paragraphs.
           10  +
           11  +global __currentp
           12  +
           13  +# # ## ### ##### ########
           14  +## API
           15  +
           16  +proc Text      {text} { global __currentp ; append __currentp $text ; return }
           17  +proc Text?     {}     { global __currentp ; return $__currentp }
           18  +proc TextClear {}     { global __currentp ; set __currentp "" }
           19  +
           20  +proc TextTrimLeadingSpace {} {
           21  +    global __currentp
           22  +    regsub {^([ \t\v\f]*\n)*} $__currentp {} __currentp
           23  +    return
           24  +}
           25  +
           26  +proc TextPlain {text} {
           27  +    #puts_stderr "<<text_plain_text>>"
           28  +
           29  +    if  {[IsOff]} {return}
           30  +
           31  +    # Note: Whenever we get plain text it is possible that a macro for
           32  +    # visual markup actually generated output before the expander got
           33  +    # to the current text. This output was captured by the expander in
           34  +    # its current context. Given the current organization of the
           35  +    # engine we have to retrieve this formatted text from the expander
           36  +    # or it will be lost. This is the purpose of the 'ctopandclear',
           37  +    # which retrieves the data and also clears the capture buffer. The
           38  +    # latter to prevent us from retrieving it again later, after the
           39  +    # next macro added more data.
           40  +
           41  +    set text [ex_ctopandclear]$text
           42  +
           43  +    # ... TODO ... Handling of example => verbatim
           44  +
           45  +    if {[string length [string trim $text]] == 0} return
           46  +
           47  +    Text $text
           48  +    return
           49  +}
           50  +
           51  +#return
           52  +# # ## ### ##### ########
           53  +## Debugging
           54  +
           55  +proc Text {text} {
           56  +    #puts_stderr "T++ (($text))"
           57  +    global __currentp
           58  +    append __currentp $text
           59  +    return
           60  +}

Added modules/doctools/mpformats/_text_state.tcl.

            1  +# -*- tcl -*-
            2  +#
            3  +# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Freely redistributable.
            5  +#
            6  +# _text_state.tcl -- State variables and accessors
            7  +
            8  +# # ## ### ##### ########
            9  +# State: Flag to suppress of plain text in some places.
           10  +
           11  +global __off
           12  +
           13  +# # ## ### ##### ########
           14  +# API
           15  +
           16  +proc Off   {} { global __off ; set __off 1 ; return}
           17  +proc On    {} { global __off ; set __off 0 ; TextClear ; return}
           18  +proc IsOff {} { global __off ; return $__off }
           19  +
           20  +# Debugging ...
           21  +#proc Off   {}        {puts_stderr OFF ; global __off ; set __off 1 ; return}
           22  +#proc On    {}        {puts_stderr ON_ ; global __off ; set __off 0 ; TextClear ; return}

Added modules/doctools/mpformats/_text_utils.tcl.

            1  +# -*- tcl -*-
            2  +#
            3  +# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Freely redistributable.
            5  +#
            6  +# _text_utils.tcl -- Text formatting utilities
            7  +
            8  +# # ## ### ##### ########
            9  +## API
           10  +
           11  +proc Compose {lb} {
           12  +    upvar 1 $lb linebuffer
           13  +    return [string trimright [join $linebuffer \n]]
           14  +}
           15  +
           16  +proc ReHead {line prefix} {
           17  +    set n [string length $prefix]
           18  +    incr n -1
           19  +    string replace $line 0 $n $prefix
           20  +}
           21  +
           22  +proc MaxLen {v s} {
           23  +    upvar 1 $v max
           24  +    set n [string length $s]
           25  +    if {$n <= $max} return
           26  +    set max $n
           27  +}
           28  +
           29  +proc BlankMargin {} { global lmarginIncrement ; Blank $lmarginIncrement }
           30  +
           31  +proc Repeat  {char n}      { textutil::repeat::strRepeat $char $n }
           32  +proc Blank   {n}           { textutil::repeat::blank $n }
           33  +proc RepeatM {char text}   { Repeat $char [string length $text] }
           34  +proc BlankM  {text}        { Blank        [string length $text] }
           35  +proc Undent  {text}        { textutil::adjust::undent $text }
           36  +proc Reflow  {text maxlen} { textutil::adjust::adjust $text -length $maxlen }
           37  +proc Indent  {text prefix} { textutil::adjust::indent $text $prefix }
           38  +proc Indent1 {text p1 p}   { return "${p1}[textutil::adjust::indent $text $p 1]" }
           39  +proc InFlow {text maxlen prefix1 prefix} {
           40  +    # Reformats the paragraph `text` to keep line length under
           41  +    # `maxlen` and then indents the result using `prefix1` and
           42  +    # `prefix`.  `prefix1` is applied to the first line, and `prefix`
           43  +    # to the remainder. The caller is responsible for ensuring that
           44  +    # both prefixes have the same length.
           45  +    Indent1 [Reflow $text $maxlen] $prefix1 $prefix
           46  +}
           47  +
           48  +proc Provenance {} {
           49  +    textutil::string::uncap [c_provenance]
           50  +}
           51  +
           52  +# # ## ### ##### ########
           53  +# Internals
           54  +
           55  +# # ## ### ##### ########
           56  +return

Changes to modules/doctools/mpformats/_xml.tcl.

     1      1   # -*- tcl -*-
     2         -#
     3         -# $Id: _xml.tcl,v 1.9 2004/04/22 21:16:46 jenglish Exp $
     4         -#
     5      2   # [expand] utilities for generating XML.
     6      3   #
     7      4   # Copyright (C) 2001 Joe English <jenglish@sourceforge.net>.
     8      5   # Freely redistributable.
     9      6   #
            7  +# Copyright (C) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
    10      8   ######################################################################
    11         -
    12      9   
    13     10   # Handling XML delimiters in content:
    14     11   #
    15     12   # Plain text is initially passed through unescaped;
    16     13   # internally-generated markup is protected by preceding it with \1.
    17     14   # The final PostProcess step strips the escape character from
    18     15   # real markup and replaces markup characters from content
................................................................................
    20     17   #
    21     18   
    22     19   variable attvalMap { {&} &amp;  {<} &lt;  {>} &gt; {"} &quot; {'} &apos; } ; # "
    23     20   variable markupMap { {&} {\1&}  {<} {\1<}  {>} {\1>} }
    24     21   variable finalMap  { {\1&} {&}  {\1<} {<}  {\1>} {>}
    25     22   		     {&} &amp;  {<} &lt;   {>} &gt; }
    26     23   
    27         -proc fmt_postprocess {text}	{
           24  +proc fmt_postprocess {text} {
    28     25       variable finalMap
    29         -    return [string map $finalMap $text]
           26  +    return [string trim [string map $finalMap $text]]\n
    30     27   }
    31     28   
    32     29   # markup text --
    33     30   #	Protect markup characters in $text with \1.
    34     31   #	These will be stripped out in PostProcess.
    35     32   #
    36     33   proc markup {text} {

Changes to modules/doctools/mpformats/fmt.latex.

     1      1   # -*- tcl -*-
     2         -#
     3         -# fmt.latex
     4         -#
     5         -# (c) 2001 Andreas Kupries <andreas_kupries@sourceforge.net>
            2  +# (c) 2001-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     6      3   #
     7      4   # [mpexpand] definitions to convert a tcl based manpage definition into
     8      5   # a manpage based upon LaTeX markup.
     9      6   #
    10      7   ################################################################
    11      8   
    12      9   ##
................................................................................
    32     29   }
    33     30   
    34     31   proc Year {} {clock format [clock seconds] -format %Y}
    35     32   
    36     33   c_holdBuffers require
    37     34   
    38     35   proc fmt_postprocess {text} {
           36  +    # Trim trailing whitespace, for all lines.
           37  +    regsub -all -- "\[ \t]+\n" $text "\n" text
           38  +    # Strip superfluous line breaks
    39     39       regsub -all -- "\n+" $text "\n" text
    40         -    return [string map {\1\\ \\ \1$ $} $text]
           40  +    # Normalize paragraph breaks (subsume leading and traling whitespace)
           41  +    regsub -all -- "\[\t \n]+\1@P" $text "\1@P" text
           42  +    regsub -all -- "\1@P\[\t \n]+" $text "\1@P" text
           43  +    # Insert the paragraph breaks, unify multiple adjacent breaks
           44  +    regsub -all -- "(\1@P)+" $text "\n\n" text
           45  +    # Finalize the protected special characters
           46  +    return [string trimleft [string map {\1\\ \\ \1$ $} $text]]
    41     47       #return $text
    42     48   }
    43     49   
    44     50   ################################################################
    45     51   ## Backend for LaTeX markup
    46     52   
    47     53   c_pass 1 fmt_manpage_begin {title section version} NOP
................................................................................
    54     60       set copyright   [c_get_copyright]
    55     61   
    56     62       set     hdr ""
    57     63       append  hdr [Comment [c_provenance]] \n
    58     64       if {$copyright != {}} {
    59     65   	append  hdr [Comment $copyright] \n
    60     66       }
    61         -    append  hdr [Comment "CVS: \$Id\$ $title.$section"] \n
           67  +    append  hdr [Comment "$title.$section"] \n
    62     68       append  hdr \n
    63     69       append  hdr "\1\\documentclass\{article\}" \n
    64     70   
    65     71       if {$_has_images} {
    66     72   	append hdr "\1\\usepackage{epsfig}" \n
    67     73   	append hdr "\1\\usepackage{epstopdf}" \n
    68     74       }
................................................................................
   127    133       }
   128    134       append  res "\1\\end\{document\}"
   129    135       return $res
   130    136   }
   131    137   
   132    138   proc fmt_section    {name id} {return    "\1\\section\{[texEscape $name]\}\1\\label\{$id\}"}
   133    139   proc fmt_subsection {name id} {return "\1\\subsection\{[texEscape $name]\}\1\\label\{$id\}"}
   134         -proc fmt_para    {}        {return \n\n}
          140  +
          141  +proc fmt_para   {} { return \1@P }
          142  +proc fmt_nl     {} { return \1@P }
   135    143   
   136    144   c_pass 2 fmt_require {pkg {version {}}} NOP
   137    145   c_pass 1 fmt_require {pkg {version {}}} {
   138    146       if {$version != {}} {
   139    147   	set res "package require [Bold "$pkg $version"]\n"
   140    148       } else {
   141    149   	set res "package require [Bold $pkg]\n"
................................................................................
   302    310       global _in_example
   303    311       set    _in_example 0
   304    312       return {\end{verbatim}}
   305    313   }
   306    314   # No mapping of special characters
   307    315   proc fmt_example {code} { return "\1\\begin\{verbatim\}\n${code}\n\1\\end\{verbatim\}\n" }
   308    316   
   309         -proc fmt_nl     {}     {return}
   310    317   proc fmt_arg    {text} {Underline $text}
   311    318   proc fmt_cmd    {text} {Bold      $text}
   312    319   proc fmt_emph   {text} {Italic    $text}
   313    320   proc fmt_opt    {text} {return   ?$text?}
   314    321   
   315    322   proc fmt_comment {text} {
   316    323       set res [list]
................................................................................
   389    396   	\1\\_ \1\\_
   390    397   	\1\\% \1\\%
   391    398   	\1\\^ \1\\^
   392    399   	\1\\$ \1\\$
   393    400   	\1\\# \1\\#
   394    401   	\1\\& \1\\&
   395    402   	\1\\ \1\\
   396         -	\\ \1$\\backslash$ _ \1\\_ % \1\\% ^ \1\\^ $ \1\\$ < \1$<$ > \1$>$ # \1\\# & \1\\&
          403  +	\\ \1$\\backslash$
          404  +	_ \1\\_
          405  +	% \1\\%
          406  +	^ \1\\^
          407  +	$ \1\\$
          408  +	< \1$<$
          409  +	> \1$>$
          410  +	# \1\\#
          411  +	& \1\\&
   397    412       } $text]
   398    413       if {$x} {
   399    414   	#puts_stderr "==> '$text'"
   400    415       }
   401    416       return $text
   402    417   }
   403    418   
   404    419   ################################################################

Changes to modules/doctools/mpformats/fmt.nroff.

     1      1   # -*- tcl -*-
     2      2   #
     3      3   # -- doctools NROFF formatting engine.
     4      4   #
     5         -# Copyright (c) 2001-2011 Andreas Kupries <andreas_kupries@sourceforge.net>
            5  +# Copyright (c) 2001-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     6      6   #
     7      7   # [expand] definitions to convert a tcl based manpage definition into
     8      8   # a manpage based upon *roff markup. Additional definition files allow
     9      9   # the conversion into HTML and TMML.
    10     10   
    11     11   
    12     12   ################################################################
................................................................................
    99     99   	append nroff [nr_nofill] \n
   100    100   	append nroff $ct \n
   101    101   	append nroff [nr_fill]
   102    102       }
   103    103       return $nroff
   104    104   }
   105    105   
   106         -proc fmt_postprocess {nroff} {return [nroff_postprocess $nroff]}
          106  +proc fmt_postprocess {nroff} { nroff_postprocess $nroff }
   107    107   
   108    108   proc fmt_section    {name {id {}}} {return [nr_section    $name]}
   109    109   proc fmt_subsection {name {id {}}} {return [nr_subsection $name]}
   110    110   proc fmt_para {} {
   111    111       if {[dt_lnesting]} { return [nr_item] }
   112    112       nr_p
   113    113   }

Changes to modules/doctools/mpformats/fmt.text.

     1      1   # -*- tcl -*-
     2      2   #
     3         -# fmt.text -- Engine to convert a doctools document into plain text.
            3  +# -- Engine to convert a doctools document into plain text.
     4      4   #
     5         -# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
     6         -#
     7         -################################################################
     8         -################################################################
            5  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     9      6   
    10         -# Load shared code and modify it to our needs.
            7  +# # ## ### ##### ######## #############
            8  +## Load shared code and modify it to our needs.
    11      9   
    12     10   dt_source _common.tcl
    13     11   dt_source _text.tcl
           12  +
    14     13   proc c_copyrightsymbol {} {return "(c)"}
    15     14   
    16         -rename fmt_initialize     BaseInitialize
    17         -proc   fmt_initialize {} {BaseInitialize ; TextInitialize ; return}
           15  +# # ## ### ##### ########
           16  +## Special manpage contexts
    18     17   
    19         -################################################################
    20         -# Special manpage environments
           18  +# example     = if present, context is for an example
           19  +# exenv       = if present, reference to example variant of current context
           20  +
           21  +proc Example!     {} { CAttrSet example . }
           22  +proc Example?  {} { CAttrHas example }
    21     23   
    22     24   proc NewExample {} {
    23         -    global currentEnv
    24         -    return [NewEnv Example {
    25         -	set    currentEnv(verbatim) 1
    26         -	append currentEnv(prefix)   "| "
    27         -	set    currentEnv(example) .
    28         -    }] ; # {}
           25  +    return [ContextNew Example { VerbatimOn ; Example! ; Prefix! "| " }] ; # {}
    29     26   }
    30     27   
    31     28   proc Example {} {
    32         -    global currentEnv
    33         -    if {![info exists currentEnv(exenv)]} {
    34         -	SaveContext
    35         -	set verb [NewExample]
    36         -	RestoreContext
    37         -
    38         -	# Remember verbatim mode in the base environment
    39         -	set currentEnv(exenv) $verb
    40         -	SaveEnv
           29  +    if {![CAttrHas exenv]} {
           30  +	ContextPush
           31  +	set exenv [NewExample]
           32  +	ContextPop
           33  +	CAttrSet exenv $exenv
           34  +	ContextCommit
    41     35       }
    42         -    return $currentEnv(exenv)
           36  +    return [CAttrGet exenv]
    43     37   }
    44     38   
    45     39   proc NewList {what} {
    46         -    # List environments
    47         -    # Per list several environments are required.
    48         -
           40  +    # List contexts
           41  +    # Per list several contexts are required.
    49     42       switch -exact -- $what {
    50     43   	enumerated {NewOrderedList}
    51     44   	itemized   {NewUnorderedList}
    52     45   	arguments -
    53     46   	commands  -
    54     47   	options   -
    55     48   	tkoptions -
    56     49   	definitions {NewDefinitionList}
    57     50       }
           51  +    return
    58     52   }
    59     53   
    60     54   proc NewUnorderedList {} {
    61         -    global currentEnv lmarginIncrement
    62         -
    63     55       # Itemized list - unordered list - bullet
    64         -    # 1. Base environment provides indentation.
           56  +    # 1. Base context provides indentation.
    65     57       # 2. First paragraph in a list item.
    66     58       # 3. All other paragraphs.
    67         -
    68         -    set base [NewEnv Itemized {
    69         -	incr currentEnv(lmargin)   $lmarginIncrement
    70         -
    71         -	set bullet [Bullet currentEnv(bulleting)]
           59  +    ContextPush
           60  +    set base [ContextNew Itemized {
           61  +	MarginIn
           62  +	set bullet [IBullet]
    72     63       }] ; # {}
    73         -    set first [NewEnv First {
    74         -	set currentEnv(wspfx) [::textutil::repeat::blank $lmarginIncrement]
    75         -	set currentEnv(listtype)  bullet
    76         -	set currentEnv(bullet) $bullet
    77         -    }] ; SetContext $base ; # {}
    78     64   
    79         -    set next [NewEnv Next {
    80         -	incr currentEnv(lmargin)   $lmarginIncrement
    81         -    }] ; SetContext $base ; # {}
           65  +    set first [ContextNew First {
           66  +	List! bullet $bullet [BlankMargin]
           67  +    }] ; ContextSet $base ; # {}
    82     68   
    83         -    set currentEnv(_first) $first
    84         -    set currentEnv(_next)  $next
    85         -    set currentEnv(pcount) 0
    86         -    SaveEnv
           69  +    set next [ContextNew Next {
           70  +	MarginIn
           71  +    }] ; ContextSet $base ; # {}
           72  +
           73  +    OUL $first $next
           74  +    ContextCommit
           75  +
           76  +    ContextPop
           77  +    ContextSet $base
    87     78       return
    88     79   }
    89     80   
    90     81   proc NewOrderedList {} {
    91         -    global currentEnv lmarginIncrement
    92         -
    93     82       # Ordered list - enumeration - enum
    94         -    # 1. Base environment provides indentation.
           83  +    # 1. Base context provides indentation.
    95     84       # 2. First paragraph in a list item.
    96     85       # 3. All other paragraphs.
    97         -
    98         -    set base [NewEnv Enumerated {
    99         -	incr currentEnv(lmargin)   $lmarginIncrement
   100         -
   101         -	set bullet [EnumBullet currentEnv(enumeration)]
           86  +    ContextPush
           87  +    
           88  +    set base [ContextNew Enumerated {
           89  +	MarginIn
           90  +	set bullet [EBullet]
   102     91       }] ; # {}
   103         -    set first [NewEnv First {
   104         -	set currentEnv(wspfx)  [::textutil::repeat::blank $lmarginIncrement]
   105         -	set currentEnv(listtype)  enum
   106         -	set currentEnv(bullet) $bullet
   107         -    }] ; SetContext $base ; # {}
   108     92   
   109         -    set next [NewEnv Next {
   110         -	incr currentEnv(lmargin)   $lmarginIncrement
   111         -    }] ; SetContext $base ; # {}
           93  +    set first [ContextNew First {
           94  +	List! enum $bullet [BlankMargin]
           95  +    }] ; ContextSet $base ; # {}
   112     96   
   113         -    set currentEnv(_first) $first
   114         -    set currentEnv(_next)  $next
   115         -    set currentEnv(pcount) 0
   116         -    SaveEnv
           97  +    set next [ContextNew Next {
           98  +	MarginIn
           99  +    }] ; ContextSet $base ; # {}
          100  +
          101  +    OUL $first $next
          102  +    ContextCommit
          103  +
          104  +    ContextPop
          105  +    ContextSet $base
   117    106       return
   118    107   }
   119    108   
   120    109   proc NewDefinitionList {} {
   121         -    global currentEnv lmarginIncrement
   122         -
   123    110       # Definition list - terms & definitions
   124         -    # 1. Base environment provides indentation.
   125         -    # 2. Term environment
   126         -    # 3. Definition environment
          111  +    # 1. Base context provides indentation.
          112  +    # 2. Term context
          113  +    # 3. Definition context
          114  +    ContextPush
   127    115   
   128         -    set base [NewEnv DefL {
   129         -	incr currentEnv(lmargin)   $lmarginIncrement
          116  +    set base [ContextNew Definitions {
          117  +	MarginIn
   130    118       }] ; # {}
   131         -    set term [NewEnv Term {
   132         -	set currentEnv(verbatim) 1
   133         -    }] ; SetContext $base ; # {}
   134         -
   135         -    set def [NewEnv Def {
   136         -	incr currentEnv(lmargin) $lmarginIncrement
   137         -    }] ; SetContext $base ; # {}
   138         -
   139         -    set currentEnv(_term)       $term
   140         -    set currentEnv(_definition) $def
   141         -    SaveEnv
   142         -    return
   143         -}
   144         -
   145         -################################################################
   146         -# Final layouting.
          119  +
          120  +    set term [ContextNew Term {
          121  +	VerbatimOn
          122  +    }] ; ContextSet $base ; # {}
          123  +
          124  +    set def [ContextNew Def {
          125  +	MarginIn
          126  +    }] ; ContextSet $base ; # {}
          127  +
          128  +    TD $term $def
          129  +    ContextCommit
          130  +    
          131  +    ContextPop
          132  +    ContextSet $base
          133  +    return
          134  +}
          135  +
          136  +# # ## ### ##### ########
          137  +##
          138  +
          139  +proc OUL {f n} {
          140  +    CAttrSet _first $f
          141  +    CAttrSet _next  $n
          142  +    CAttrSet pcount 0
          143  +}
          144  +
          145  +proc TD {t d} {
          146  +    CAttrSet _term       $t
          147  +    CAttrSet _definition $d
          148  +}
          149  +
          150  +proc IsPara   {} { CAttrHas pcount }
          151  +proc Paras    {} { CAttrGet pcount }
          152  +proc PAdvance {} { CAttrIncr pcount 1 }
          153  +proc PReset   {} { CAttrSet pcount 0 }
          154  +proc First    {} { CAttrGet _first }
          155  +proc Other    {} { CAttrGet _next }
          156  +proc Term     {} { CAttrGet _term }
          157  +proc Def      {} { CAttrGet _definition }
          158  +proc IsDef    {} { CAttrHas _definition }
          159  +
          160  +# # ## ### ##### ########
          161  +##
          162  +
          163  +proc CloseCurrent {{op PAdvance}} {
          164  +    if {[IsDef]} {
          165  +	# Currently in a definition list.
          166  +	CloseParagraph [Def]
          167  +    } elseif {[IsPara]} {
          168  +	# Currently in an (un)ordered list.
          169  +	if {![Paras]} {
          170  +	    # No paragraphs yet, this is first in the item
          171  +	    if {[CloseParagraph [First]]} $op
          172  +	} else {
          173  +	    # More paragraphs in the item
          174  +	    if {[CloseParagraph [Other]]} $op
          175  +	}
          176  +    } else {
          177  +	# Currently in a regular paragraph
          178  +	CloseParagraph
          179  +    }
          180  +}
          181  +
          182  +proc GetCurrent {{op PAdvance}} {
          183  +    if {[IsDef]} {
          184  +	# Currently in a definition list.
          185  +	return [Def]
          186  +    } elseif {[IsPara]} {
          187  +	# Currently in an (un)ordered list.
          188  +	if {![Paras]} {
          189  +	    set res [First]
          190  +	} else {
          191  +	    set res [Other]
          192  +	}
          193  +	$op
          194  +	return $res
          195  +    } else {
          196  +	# Currently in a regular paragraph
          197  +	return {}
          198  +    }
          199  +}
          200  +
          201  +# # ## ### ##### ########
          202  +##
   147    203   
   148    204   c_holdBuffers require
   149    205   
   150         -proc fmt_postprocess {text} {text_postprocess $text}
          206  +rename fmt_initialize   BaseInitialize
          207  +proc fmt_initialize {} {BaseInitialize ; TextInitialize ; return}
   151    208   
          209  +proc fmt_postprocess {text} { text_postprocess $text }
   152    210   
   153         -################################################################
   154         -# Implementations of the formatting commands.
          211  +# # ## ### ##### ########
          212  +## Implementations of the formatting commands.
   155    213   
   156    214   c_pass 1 fmt_plain_text {text} NOP
   157         -c_pass 2 fmt_plain_text {text} {text_plain_text $text}
          215  +c_pass 2 fmt_plain_text {text} { text_plain_text $text }
   158    216   
   159    217   c_pass 1 fmt_manpage_begin {title section version} NOP
   160    218   c_pass 2 fmt_manpage_begin {title section version} {
   161    219       Off
   162    220       set module      [dt_module]
   163    221       set shortdesc   [c_get_module]
   164    222       set description [c_get_title]
................................................................................
   205    263   c_pass 1 fmt_section     {name {id {}}} NOP
   206    264   c_pass 2 fmt_section     {name {id {}}} {CloseParagraph ; Section $name ; return}
   207    265   
   208    266   c_pass 1 fmt_subsection  {name {id {}}} NOP
   209    267   c_pass 2 fmt_subsection  {name {id {}}} {CloseParagraph ; Subsection $name ; return}
   210    268   
   211    269   c_pass 1 fmt_para {} NOP
   212         -c_pass 2 fmt_para {} {CloseParagraph ; return}
          270  +c_pass 2 fmt_para {} {CloseCurrent ; return}
          271  +
          272  +# NL is an alias of PARA
          273  +# See also fmt_example_begin
          274  +c_pass 1 fmt_nl {} NOP
          275  +c_pass 2 fmt_nl {} {CloseCurrent ; return }
   213    276   
   214    277   c_pass 2 fmt_require {pkg {version {}}} NOP
   215    278   c_pass 1 fmt_require {pkg {version {}}} {
   216    279       set result "package require $pkg"
   217    280       if {$version != {}} {append result " $version"}
   218    281       c_hold require $result
   219    282       return
................................................................................
   243    306   	CloseParagraph [Verbatim]
   244    307       }
   245    308   
   246    309       Section DESCRIPTION
   247    310       return
   248    311   }
   249    312   
   250         -################################################################
          313  +# # ## ### ##### ########
          314  +##
   251    315   
   252    316   c_pass 1 fmt_list_begin {what {hint {}}} NOP
   253    317   c_pass 2 fmt_list_begin {what {hint {}}} {
   254    318       #puts_stderr "<<fmt_list_begin $what>>"
   255    319   
   256         -    global currentEnv
   257         -    if {[info exists currentEnv(_definition)]} {
   258         -	CloseParagraph $currentEnv(_definition)
   259         -    } elseif {[info exists currentEnv(pcount)]} {
   260         -	if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
   261         -	if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
   262         -	incr currentEnv(pcount)
   263         -    } else {
   264         -	CloseParagraph
   265         -    }
   266         -    SaveContext
          320  +    CloseCurrent
          321  +    ContextPush
   267    322       NewList $what
   268    323       Off
   269    324   
   270    325       #puts_stderr "<<fmt_list_begin _____>>"
   271    326       return
   272    327   }
   273    328   
   274    329   c_pass 1 fmt_list_end {} NOP
   275    330   c_pass 2 fmt_list_end {} {
   276    331       #puts_stderr "<<fmt_list_end>>"
   277    332   
   278         -    global currentEnv
   279         -    if {[info exists currentEnv(_definition)]} {
   280         -	CloseParagraph $currentEnv(_definition)
   281         -    } else {
   282         -	if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
   283         -	if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
   284         -    }
   285         -    RestoreContext
          333  +    CloseCurrent
          334  +    ContextPop
   286    335   
   287    336       #puts_stderr "<<fmt_list_end ____>>"
   288    337       return
   289    338   }
   290    339   
   291    340   c_pass 1 fmt_lst_item {text} NOP
   292    341   c_pass 2 fmt_lst_item {text} {
   293         -    global currentEnv
   294         -
   295    342       #puts_stderr "<<fmt_lst_item \{$text\}>>"
   296    343   
   297         -    if {[IsOff]} {
   298         -	On
   299         -    } else {
   300         -	CloseParagraph $currentEnv(_definition)
   301         -    }
          344  +    if {[IsOff]} { On } else { CloseParagraph [Def] }
   302    345       Text $text
   303         -    CloseParagraph $currentEnv(_term)
          346  +    CloseParagraph [Term]
   304    347   
   305    348       #puts_stderr "<<fmt_lst_item _____>>"
   306    349       return
   307    350   }
   308    351   
   309    352   c_pass 1 fmt_bullet {} NOP
   310    353   c_pass 2 fmt_bullet {} {
   311         -    global currentEnv
   312    354       if {[IsOff]} {On ; return}
   313         -    if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
   314         -    if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
   315         -    set  currentEnv(pcount) 0
          355  +    CloseCurrent PReset
   316    356       return
   317    357   }
   318    358   
   319    359   c_pass 1 fmt_enum {} NOP
   320    360   c_pass 2 fmt_enum {} {
   321         -    global currentEnv
   322    361       if {[IsOff]} {On ; return}
   323         -    if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
   324         -    if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
   325         -    set  currentEnv(pcount) 0
          362  +    CloseCurrent PReset
   326    363       return
   327    364   }
   328    365   
   329    366   c_pass 1 fmt_cmd_def  {command} NOP
   330    367   c_pass 2 fmt_cmd_def  {command} {fmt_lst_item [fmt_cmd $command]}
   331    368   
   332    369   c_pass 1 fmt_arg_def {type name {mode {}}} NOP
................................................................................
   345    382       return
   346    383   }
   347    384   
   348    385   c_pass 1 fmt_tkoption_def {name dbname dbclass} NOP
   349    386   c_pass 2 fmt_tkoption_def {name dbname dbclass} {
   350    387       set    text ""
   351    388       append text "Command-Line Switch:\t[fmt_option $name]\n"
   352         -    append text "Database Name:\t[strong $dbname]\n"
   353         -    append text "Database Class:\t[strong $dbclass]\n"
          389  +    append text "Database Name:\t[Strong $dbname]\n"
          390  +    append text "Database Class:\t[Strong $dbclass]\n"
   354    391       fmt_lst_item $text
   355    392   }
   356    393   
   357         -################################################################
          394  +# # ## ### ##### ########
          395  +##
   358    396   
   359    397   c_pass 1 fmt_example_begin {} NOP
   360         -c_pass 2 fmt_example_begin {} {
   361         -    global currentEnv para
   362         -    if {[info exists currentEnv(_definition)]} {
   363         -	CloseParagraph $currentEnv(_definition)
   364         -    } elseif {[info exists currentEnv(pcount)]} {
   365         -	if {$para != {}} {
   366         -	    if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
   367         -	    if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
   368         -	    incr currentEnv(pcount)
   369         -	}
   370         -    } else {
   371         -	CloseParagraph
   372         -    }
   373         -    return
   374         -}
          398  +c_pass 2 fmt_example_begin {} { CloseCurrent ; return }
   375    399   
   376    400   c_pass 1 fmt_example_end {} NOP
   377    401   c_pass 2 fmt_example_end {} {
   378         -    global currentEnv para
   379         -    set penv {}
   380         -    if {[info exists currentEnv(_definition)]} {
   381         -	set penv $currentEnv(_definition)
   382         -    } elseif {[info exists currentEnv(pcount)]} {
   383         -	if {$currentEnv(pcount) == 0} {set penv $currentEnv(_first)}
   384         -	if {$currentEnv(pcount) >  0} {set penv $currentEnv(_next)}
   385         -	incr currentEnv(pcount)
   386         -    }
          402  +    TextTrimLeadingSpace
          403  +    
          404  +    set penv [GetCurrent]
   387    405       if {$penv != {}} {
   388         -	# Save current list context, get chosen paragraph context and
   389         -	# then create an example context form this. After closing the
   390         -	# paragraph we get back our main list context.
   391         -
   392         -	SaveContext
   393         -	SetContext $penv
          406  +	# In a list we save the current list context, activate the
          407  +	# proper paragraph context and create its example
          408  +	# variant. After closing the paragraph using the example we
          409  +	# restore and reactivate the list context.
          410  +	ContextPush
          411  +	ContextSet $penv
   394    412   	CloseParagraph [Example]
   395         -	RestoreContext
          413  +	ContextPop
   396    414       } else {
          415  +	# In a regular paragraph we simple close the example
   397    416   	CloseParagraph [Example]
   398    417       }
   399    418       return
   400    419   }
   401    420   
   402    421   c_pass 1 fmt_example {code} NOP
   403    422   c_pass 2 fmt_example {code} {
   404    423       fmt_example_begin
   405    424       fmt_plain_text $code
   406    425       fmt_example_end
   407    426       return
   408    427   }
   409    428   
   410         -c_pass 1 fmt_nl {} NOP
   411         -c_pass 2 fmt_nl {} {
   412         -    global currentEnv
   413         -    if {[info exists currentEnv(_definition)]} {
   414         -	CloseParagraph $currentEnv(_definition)
   415         -    } else {
   416         -	if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
   417         -	if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
   418         -	incr currentEnv(pcount)
   419         -    }
   420         -    return
   421         -}
          429  +# # ## ### ##### ########
          430  +## Visual markup of words and phrases.
   422    431   
   423         -################################################################
   424         -# Visual markup of words and phrases.
   425         -
   426         -proc fmt_arg     {text} {return $text}
   427         -proc fmt_cmd     {text} {return $text}
   428         -proc fmt_emph	 {text} {em     $text }
   429         -proc fmt_opt     {text} {return "?$text?" }
   430         -proc fmt_comment {text} {return}
          432  +proc fmt_arg     {text} { return $text }
          433  +proc fmt_cmd     {text} { return $text }
          434  +proc fmt_emph	 {text} { Em     $text }
          435  +proc fmt_opt     {text} { return "?$text?" }
          436  +proc fmt_comment {text} { return }
   431    437   proc fmt_sectref {text {label {}}} {
   432    438       if {![string length $label]} {set label $text}
   433    439       return "-> $text"
   434    440   }
   435         -proc fmt_syscmd  {text} {strong $text}
   436         -proc fmt_method  {text} {return $text}
   437         -proc fmt_option  {text} {return $text}
   438         -proc fmt_widget  {text} {strong $text}
   439         -proc fmt_fun     {text} {strong $text}
   440         -proc fmt_type    {text} {strong $text}
   441         -proc fmt_package {text} {strong $text}
   442         -proc fmt_class   {text} {strong $text}
   443         -proc fmt_var     {text} {strong $text}
   444         -proc fmt_file    {text} {return "\"$text\""}
   445         -proc fmt_namespace     {text} {strong $text}
          441  +
          442  +proc fmt_syscmd  {text} { Strong $text }
          443  +proc fmt_method  {text} { return $text }
          444  +proc fmt_option  {text} { return $text }
          445  +proc fmt_widget  {text} { Strong $text }
          446  +proc fmt_fun     {text} { Strong $text }
          447  +proc fmt_type    {text} { Strong $text }
          448  +proc fmt_package {text} { Strong $text }
          449  +proc fmt_class   {text} { Strong $text }
          450  +proc fmt_var     {text} { Strong $text }
          451  +proc fmt_file    {text} { return "\"$text\"" }
          452  +proc fmt_namespace     {text} { Strong $text }
   446    453   proc fmt_uri     {text {label {}}} {
   447    454       if {$label == {}} {
   448    455   	# Without label we use the link directly as part of the text.
   449    456   	return "<URL:$text>"
   450    457       } else {
   451         -	return "[em $label] <URL:$text>"
          458  +	return "[Em $label] <URL:$text>"
   452    459       }
   453    460   }
   454    461   proc fmt_image {text {label {}}} {
   455    462       # text = symbolic name of the image.
   456    463   
   457    464       set img [dt_imgdata $text {txt}]
   458    465       if {$img eq {}} {
................................................................................
   461    468   	} else {
   462    469   	    return "IMAGE: $text $label"
   463    470   	}
   464    471       }
   465    472   
   466    473       return $img
   467    474   }
   468         -proc fmt_term    {text} {em     $text}
   469         -proc fmt_const   {text} {strong $text}
          475  +
          476  +proc fmt_term    {text} { Em     $text }
          477  +proc fmt_const   {text} { Strong $text }
   470    478   proc fmt_mdash {} { return " --- " }
   471    479   proc fmt_ndash {} { return " -- " }
   472    480   
   473         -################################################################
          481  +# # ## ### ##### ########
          482  +return

Changes to modules/doctools/mpformats/fmt.wiki.

     1      1   # -*- tcl -*-
     2         -#
     3         -# fmt.nroff
     4         -#
     5         -# (c) 2002 Andreas Kupries <andreas_kupries@sourceforge.net>
            2  +# (c) 2002-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     6      3   #
     7      4   # [expand] definitions to convert a tcl based manpage definition into
     8      5   # Wiki markup.
     9      6   #
    10      7   ################################################################
    11      8   
    12      9   dt_source _common.tcl   ; # Shared code
................................................................................
    46     43   		lappend lines [string map {[ [[ ] ]]} [string trim $line]]
    47     44   	    } else {
    48     45   		# Everything else
    49     46   		lappend lines [string map {[ [[ ] ]]} [string trimright $line]]
    50     47   	    }
    51     48   	}
    52     49       }
    53         -    set wiki [join $lines \n]\n
           50  +    set wiki [join $lines \n]
    54     51   
    55     52       regsub {^[ ]+} $wiki {} wiki
    56         -    return $wiki
           53  +    return [string trim $wiki]\n
    57     54   }
    58     55   
    59     56   
    60     57   ################################################################
    61     58   ## Backend for *roff markup
    62     59   
    63     60   c_pass 1 fmt_manpage_begin {title section version} NOP
................................................................................
   120    117       }
   121    118       return $wiki
   122    119   }
   123    120   
   124    121   proc fmt_section    {name {id {}}} {return "\n\n**$name**\n\n"}
   125    122   proc fmt_subsection {name {id {}}} {return "\n\n***$name***\n\n"}
   126    123   
          124  +# TODO: Modify behaviour depending on context (normal vs list)
   127    125   proc fmt_para    {}     {return \n}
          126  +proc fmt_nl      {}     {return \n}
   128    127   
   129    128   c_pass 2 fmt_require {pkg {version {}}} NOP
   130    129   c_pass 1 fmt_require {pkg {version {}}} {
   131    130       if {$version != {}} {set version " $version"}
   132    131       # @mdgen NODEP: '''
   133    132       c_hold synopsis "package require '''$pkg$version'''\n"
   134    133   }
................................................................................
   219    218   proc fmt_example {code} {
   220    219       return "$code"
   221    220   }
   222    221   
   223    222   proc emph    {text} {return ''$text''}
   224    223   proc strong  {text} {return '''$text'''}
   225    224   
   226         -proc fmt_nl      {}     {return ""}
   227    225   proc fmt_arg     {text} {return ''$text''}
   228    226   proc fmt_cmd     {text} {return '''$text'''}
   229    227   proc fmt_emph    {text} {return ''$text''}
   230    228   proc fmt_opt     {text} {return ?$text?}
   231    229   proc fmt_comment {text} {return {}}
   232    230   proc fmt_sectref {text {label {}}} {
   233    231       if {![string length $label]} {set label $text}

Changes to modules/doctools/mpformats/idx.nroff.

     1      1   # -*- tcl -*-
     2         -#
     3         -# $Id: idx.nroff,v 1.7 2009/01/30 04:56:47 andreas_kupries Exp $
     4         -#
     5      2   # Engine to convert a docidx document into nroff.
     6      3   #
     7      4   # Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
     8      5   # Freely redistributable.
     9      6   #
    10      7   ######################################################################
    11      8   
................................................................................
    35     32   
    36     33   #proc fmt_plain_text {text} {if {$text != {}} {return \n} else {return {}}}
    37     34   proc fmt_plain_text {text} {return {}}
    38     35   
    39     36   ################################################################
    40     37   ## Backend for NROFF markup
    41     38   
           39  +global map ; array set map {}
           40  +global key ; set key {}
           41  +global max ; set max 0
           42  +
    42     43   global prec ok haskey
    43     44   set    prec   ""
    44     45   set    ok     0
    45     46   set    haskey 0
    46     47   
    47     48   proc fmt_index_begin     {label title}      {
    48     49       global prec ok
................................................................................
    55     56       append  hdr [nr_title "\"[string trimleft $label :]\" n"]\n
    56     57       append  hdr [nr_read man.macros]\n
    57     58       append  hdr [nr_bolds]\n
    58     59       append  hdr [nr_section INDEX]\n
    59     60       append  hdr $title[nr_in]\n
    60     61       return $hdr
    61     62   }
    62         -proc fmt_index_end {}          {return [nr_out]}
    63         -proc fmt_key       {text}      {
           63  +
           64  +proc fmt_index_end {} {
           65  +    global map
           66  +    foreach key [lsort [array names map]] {
           67  +	append r $key [nr_in] \n
           68  +	foreach ref  $map($key) {
           69  +	foreach {file label} $ref break
           70  +	    append r [Man $file $label]
           71  +	}
           72  +	append r [nr_out] \n
           73  +    }
           74  +    
           75  +    append r [nr_out]
           76  +    return $r
           77  +}
           78  +
           79  +proc fmt_key     {text}       { global key     ; set key $text ; return }
           80  +proc fmt_manpage {file label} { global map key ; lappend map($key) [list $file $label] ; return }
           81  +proc fmt_url     {url  label} { global map key ; lappend map($key) [list $url  $label] ; return }
           82  +
           83  +proc Key {text} {
    64     84       global haskey
    65     85       set res ""
    66     86       if {$haskey} {append res [nr_out]\n}
    67     87       append res $text[nr_in]\n
    68     88       set haskey 1
    69     89       return $res
    70     90   }
    71         -proc fmt_manpage   {file label} {return [nr_blt [nr_bld]$file[nr_rst]]\n$label\n}
    72         -proc fmt_url       {url label}  {return [nr_blt [nr_bld]$url[nr_rst]]\n$label\n}
           91  +
           92  +proc Man {file label} {return [nr_blt [nr_bld]$file[nr_rst]]\n$label\n}
    73     93   
    74     94   proc fmt_comment {text} {
    75     95       global prec ok
    76         -    if {$ok} {return [nr_comment $text]}
           96  +    if {$ok} { return [nr_comment $text] }
    77     97       append prec $text \n
    78         -    return {}
           98  +    return
    79     99   }
    80    100   
    81    101   ################################################################

Changes to modules/doctools/mpformats/idx.text.

     1      1   # -*- tcl -*-
     2         -#
     3         -# $Id: idx.text,v 1.4 2010/06/08 19:32:36 andreas_kupries Exp $
     4         -#
     5      2   # Engine to convert a docidx document into plain text.
     6      3   #
     7         -# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     8      5   # Freely redistributable.
     9      6   #
    10      7   ######################################################################
    11      8   
    12      9   dt_source _idx_common.tcl
    13     10   dt_source _text.tcl
           11  +
    14     12   proc c_copyrightsymbol {} {return "(c)"}
    15     13   
    16     14   ######################################################################
    17     15   # Conversion specification.
    18     16   # One-pass processing.
    19     17   
    20     18   rename idx_postprocess {}
................................................................................
    25     23   ## Backend for plain text markup
    26     24   
    27     25   global map ; array set map {}
    28     26   global key ; set key {}
    29     27   global max ; set max 0
    30     28   
    31     29   proc fmt_index_begin {label title} {
    32         -    TextInitialize
    33         -
    34     30       global map ; unset map ; array set map {}
    35     31       global key ; set key {}
    36     32       global max ; set max 0
    37     33   
    38         -    set hdr ""
    39         -    append hdr "Index [textutil::string::uncap [c_provenance]]\n\n"
    40         -
    41     34       if {($label != {}) && ($title != {})} {
    42     35   	set title "$label -- $title"
    43     36       } elseif {$label != {}} {
    44     37   	set title $label
    45     38       } elseif {$title != {}} {
    46     39   	 # title is set
    47     40       }
    48         -    append hdr $title \n
    49         -    append hdr [textutil::repeat::strRepeat = [string length $title]]
    50         -    Text  $hdr
           41  +
           42  +    TextInitialize
           43  +
           44  +    lappend   hdr "Index [Provenance]"
           45  +    SectTitle hdr $title
           46  +    Text [Compose hdr]
    51     47       CloseParagraph [Verbatim]
    52     48       return
    53     49   }
           50  +
    54     51   proc fmt_index_end {} {
    55     52       global map max
    56     53   
    57         -    set break 0
    58         -    set rmargin [expr {80 - $max}]
    59         -    if {$rmargin < 20} {set rmargin 20}
           54  +    set rmargin [RMargin $max]
           55  +
    60     56       incr max
    61         -    set pfx [textutil::repeat::blank $max]
           57  +    set blank [Blank $max] ;# indent
    62     58   
    63     59       foreach key [lsort [array names map]] {
    64         -	set   opfx $key[string range $pfx [string length $key] end]
    65         -	Text $opfx[textutil::adjust::indent [textutil::adjust::adjust [join $map($key) ", "] -length $rmargin] $pfx 1]
           60  +	set keys [join $map($key) ", "]
           61  +	Text [InFlow $keys $rmargin [ReHead $blank $key] $blank]
    66     62   	CloseParagraph [Verbatim]
    67     63       }
    68     64       return
    69     65   }
           66  +
    70     67   proc fmt_key {text} {
    71     68       global key max ; set key $text
    72         -    if {[string length $text] > $max} {set max [string length $text]}
           69  +    MaxLen max $text
    73     70       return
    74     71   }
           72  +
    75     73   proc fmt_manpage {file label} {global map key ; lappend map($key) $file ; return}
    76         -proc fmt_url     {url label}  {global map key ; lappend map($key) $url ; return}
           74  +proc fmt_url     {url label}  {global map key ; lappend map($key) $url  ; return}
    77     75   proc fmt_comment {text}       {return}
    78     76   
    79     77   ################################################################

Changes to modules/doctools/mpformats/toc.html.

     1      1   # -*- tcl -*-
     2         -#
     3         -# $Id: toc.html,v 1.6 2005/09/28 04:51:19 andreas_kupries Exp $
     4         -#
     5      2   # Engine to convert a doctoc document into HTML.
     6      3   #
     7         -# Copyright (c) 2003-2018 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     8      5   # Freely redistributable.
     9      6   #
    10      7   ######################################################################
    11      8   
    12      9   dt_source _toc_common.tcl
    13     10   dt_source _html.tcl
    14     11   
................................................................................
    19     16   
    20     17   rename toc_postprocess {}
    21     18   rename fmt_postprocess toc_postprocess
    22     19   
    23     20   proc fmt_plain_text {text} {return {}}
    24     21   
    25     22   ################################################################
    26         -## Backend for TMML markup
           23  +## Backend for HTML markup
    27     24   
    28         -global firstitem   ; set firstitem   1
    29         -global maintable   ; set maintable   1
    30         -global even        ; set even        1
    31         -
    32         -proc fmt_toc_begin     {label title}      {
           25  +proc fmt_toc_begin {label title} {
    33     26       set hdr ""
    34     27       if {![Get raw]} {
    35     28   	append  hdr "[markup {<!DOCTYPE html>}]"
    36     29   	append  hdr "[markup <html><head>]\n"
    37     30   	append  hdr "[markup <title>] $label [markup </title>]\n"
    38     31   
    39     32   	# Engine parameter - insert 'meta'
................................................................................
    49     42       # Engine parameter - insert 'header'
    50     43       if {[set header [Get header]] != {}} {
    51     44   	lappend map @TITLE@ $label
    52     45   	set header [string map $map $header]
    53     46   	append hdr [markup $header]\n
    54     47       }
    55     48   
    56         -    append  hdr "[markup <h3>] $label [markup </h3>]\n"
    57         -    append  hdr "[markup <hr><dl><dt><h2>] $title [markup </h2><dd>]\n"
           49  +    append hdr [markup <h3>]
           50  +    append hdr $label
           51  +    append hdr [markup </h3>] \n
           52  +    append hdr [markup <hr><dl><dt><h2>]
           53  +    append hdr $title
           54  +    append hdr [markup </h2></dt><dd>] \n
           55  +    LSetup
           56  +    IPush
    58     57       return $hdr
    59     58   }
    60         -proc fmt_toc_end       {}           {
    61         -    global maintable
           59  +
           60  +proc fmt_toc_end {} {
    62     61       set text "\n"
    63         -    if {$maintable} {append text [tag/ table]\n}
           62  +    # Close table of items since last division
           63  +    if {[Items]} { append text [tag/ table] \n }
    64     64   
    65     65       # Engine parameter - insert 'footer'
    66     66       set footer [Get footer]
    67         -    if {$footer != {}} {set footer \n[markup ${footer}]\n}
           67  +    if {$footer != {}} {set footer \n[markup $footer]\n}
    68     68   
    69         -    append text [tag /dl][tag hr]${footer}
           69  +    append text [tag /dd] [tag /dl] [tag hr] $footer
    70     70   
    71     71       if {![Get raw]} {
    72         -	append text [tag/ body][tag/ html]\n
           72  +	append text [tag/ body] [tag/ html] \n
           73  +    }
           74  +
           75  +    IPop ; # Assert items == {}
           76  +    LOut ; # Assert level == 0
           77  +    return $text
           78  +}
           79  +
           80  +proc fmt_division_start {title symfile} {
           81  +    # Close table of items before the division.  Reset counter for
           82  +    # items between end of this and following division.
           83  +    if {[Items]} { append r [tag/ table] \n ; IReset }
           84  +        
           85  +    if {$symfile ne ""} {
           86  +	append t [markup "<a href=\"[dt_fmap $symfile]\">"]
           87  +	append t $title
           88  +	append t [markup </a>]
           89  +	set title $t
           90  +    }
           91  +
           92  +    append r \n [markup "<dl><dt><a name='[Anchor $title]'>"]
           93  +    append r $title
           94  +    append r [markup </dt><dd>]
           95  +
           96  +    LIn
           97  +    IPush
           98  +    return $r
           99  +}
          100  +
          101  +proc fmt_division_end {} {
          102  +    if {[Items]} { append t [tag/ table] }
          103  +    append t [tag /dl]
          104  +    Even!
          105  +    IPop
          106  +    LOut
          107  +    return $t
          108  +}
          109  +
          110  +proc fmt_item {file label desc} {
          111  +    if {[IFirst]} { append text \n[markup "<table class=\"#doctools_toc\">"]\n }
          112  +    INext
          113  +
          114  +    if {[Even]} {
          115  +	append text [markup "<tr class=\"#doctools_toceven\" >"]\n
          116  +    } else {
          117  +	append text [markup "<tr class=\"#doctools_tocodd\"  >"]\n
    73    118       }
          119  +    EFlip
          120  +    append text [markup "<td class=\"#doctools_tocleft\" >"]
          121  +    append text [markup "<a name='[Anchor $label]'><a href=\"[dt_fmap $file]\">"]
          122  +    append text $label
          123  +    append text [tag/ a][tag/ td]\n
          124  +    append text [markup "<td class=\"#doctools_tocright\">"]${desc}[tag /td]\n
          125  +    append text [tag/ tr]\n
    74    126       return $text
    75    127   }
    76    128   
          129  +proc fmt_comment {text} {ht_comment $text}
          130  +
          131  +################################################################
          132  +
          133  +proc Term {text} { return [tag dt]${text}[tag /dt] }
          134  +proc Def  {text} { return [tag dd]${text}[tag /dd] }
          135  +
    77    136   proc Anchor {text} {
    78    137       set anchor [regsub -all {[^a-zA-Z0-9]} [string tolower $text] {_}]
    79    138       set anchor [regsub -all {__+} $anchor _]
    80    139       return $anchor
    81    140   }
    82    141   
    83         -proc fmt_division_start {title symfile} {
    84         -    global maintable ; set maintable 0
          142  +################################################################
          143  +
          144  +global __level
          145  +global __items  ; set __items  {}
          146  +global __istack ; set __istack {}
          147  +global __even   ; set __even   1
          148  +
          149  +proc Even! {} { global __even ; set __even 1 }
          150  +proc Even  {} { global __even ; set __even }
          151  +proc EFlip {} { global __even ; set __even [expr {1 - $__even}] }
    85    152       
    86         -    if {$symfile ne ""} {
    87         -	set title [markup "<a href=\"[dt_fmap $symfile]\">"]$title[markup </a>]
    88         -    }
          153  +
          154  +proc LSetup {} { global __level ; set  __level  0 }
          155  +proc LIn    {} { global __level ; incr __level  1 }
          156  +proc LOut   {} { global __level ; incr __level -1 }
          157  +proc LTop   {} { global __level ; expr {!$__level } }
          158  +
          159  +proc IReset {} { global __items ; set  __items 0 }
          160  +proc INext  {} { global __items ; incr __items }
          161  +proc IFirst {} { global __items ; expr {!$__items} }
          162  +proc Items  {} { global __items ; set __items }
    89    163   
    90         -    return \n[markup "<dl><dt><a name='[Anchor $title]'>"]$title[markup <dd>]
          164  +proc IPush {} {
          165  +    global  __istack  __items
          166  +    lappend __istack $__items
          167  +    set __items 0
          168  +    return
    91    169   }
    92         -proc fmt_division_end   {}           {
    93         -    global firstitem ; set firstitem 1
    94         -    global even      ; set even 1
    95         -    return [markup </table></dl>]
    96         -}
    97         -proc fmt_item          {file label desc} {
    98         -    global firstitem even
    99         -    set text ""
   100    170   
   101         -    if {$firstitem} {
   102         -	set firstitem 0
   103         -	append text \n[markup "<table class=\"#doctools_toc\">"]\n
   104         -    }
   105         -
   106         -    if {$even} {
   107         -	append text [markup "<tr class=\"#doctools_toceven\" >"]\n
   108         -    } else {
   109         -	append text [markup "<tr class=\"#doctools_tocodd\"  >"]\n
   110         -    }
   111         -    set even [expr {1-$even}]
   112         -    append text [markup "<td class=\"#doctools_tocleft\" >"][markup "<a name='[Anchor $label]'><a href=\"[dt_fmap $file]\">"]$label[tag/ a][tag/ td]\n
   113         -    append text [markup "<td class=\"#doctools_tocright\">"]${desc}[tag /td]\n
   114         -    append text [tag/ tr]\n
   115         -    return $text
          171  +proc IPop {} {
          172  +    global __items __istack
          173  +    set __items  [lindex   $__istack end]
          174  +    set __istack [lreplace $__istack end end]
          175  +    return
   116    176   }
   117         -proc fmt_comment       {text}       {ht_comment $text}
   118    177   
   119    178   ################################################################
   120    179   
   121    180   global    __var
   122    181   array set __var {
   123    182       meta   {}
   124    183       header {}

Changes to modules/doctools/mpformats/toc.nroff.

     1      1   # -*- tcl -*-
     2         -#
     3         -# $Id: toc.nroff,v 1.7 2009/01/30 04:56:47 andreas_kupries Exp $
     4         -#
     5      2   # Engine to convert a doctoc document into nroff.
     6      3   #
     7         -# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     8      5   # Freely redistributable.
     9      6   #
    10      7   ######################################################################
    11      8   
    12      9   dt_source _toc_common.tcl
    13     10   dt_source _nroff.tcl
    14     11   
................................................................................
    39     36   ################################################################
    40     37   ## Backend for TMML markup
    41     38   
    42     39   global prec ok
    43     40   set    prec ""
    44     41   set    ok   0
    45     42   
    46         -proc fmt_toc_begin     {label title}      {
           43  +proc fmt_toc_begin {label title} {
    47     44       global prec ok
    48     45       set ok 1
    49     46       set     hdr [nr_comment {}]\n
    50     47       if {$prec != {}} {
    51     48   	set hdr [nr_comment $prec]\n
    52     49       }
    53     50       append  hdr [nr_comment [c_provenance]]\n
................................................................................
    55     52       append  hdr [nr_read man.macros]\n
    56     53       append  hdr [nr_bolds]\n
    57     54       append  hdr [nr_section CONTENTS]\n
    58     55       append  hdr $title[nr_in]\n
    59     56       return $hdr
    60     57   }
    61     58   proc fmt_toc_end        {}           {}
    62         -proc fmt_division_start {title symfile} {return $title[nr_in]\n}
           59  +proc fmt_division_start {title symfile} {return [nr_blt $title][nr_in]\n}
    63     60   proc fmt_division_end   {}              {return [nr_out]\n}
    64     61   proc fmt_item           {file label desc} {return "[nr_blt [nr_bld]$label[nr_rst]]\n[nr_ul]$file[nr_rst]: $desc\n"}
    65     62   
    66     63   proc fmt_comment {text} {
    67     64       global prec ok
    68     65       if {$ok} {return [nr_comment $text]}
    69     66       append prec $text \n
    70     67       return {}
    71     68   }
    72     69   
    73     70   ################################################################

Changes to modules/doctools/mpformats/toc.text.

     1      1   # -*- tcl -*-
     2         -#
     3         -# $Id: toc.text,v 1.8 2010/06/08 19:13:53 andreas_kupries Exp $
     4         -#
     5      2   # Engine to convert a doctoc document into plain text.
     6      3   #
     7         -# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     8      5   # Freely redistributable.
     9      6   #
    10      7   ######################################################################
    11      8   
    12      9   dt_source _toc_common.tcl
    13     10   dt_source _text.tcl
    14     11   
................................................................................
    18     15   
    19     16   rename toc_postprocess {}
    20     17   rename text_postprocess toc_postprocess
    21     18   
    22     19   proc fmt_plain_text {text} {return {}}
    23     20   
    24     21   ################################################################
    25         -## Backend for TMML markup
           22  +## Backend for TEXT markup
    26     23   
    27     24   global seclist ; set seclist {}
    28     25   global max     ; set max 0
    29     26   
    30         -proc fmt_comment       {text}        {return}
    31         -proc fmt_toc_end       {}            {return}
    32         -proc fmt_toc_begin     {label title} {
    33         -    TextInitialize
    34         -
    35         -    set     title "$label -- $title"
    36         -    set     hdr ""
    37         -    append  hdr "Table of contents [textutil::string::uncap [c_provenance]]\n"
    38         -    append  hdr \n
    39         -    append  hdr $title \n
    40         -    append  hdr [textutil::repeat::strRepeat = [string length $title]]
    41         -    Text   $hdr
    42         -    CloseParagraph [Verbatim]
    43         -}
    44         -proc fmt_division_start {title symfile} {
    45         -    global lmarginIncrement currentEnv
    46         -    global seclist ; set seclist {}
    47         -    global max     ; set max 0
    48         -
    49         -    Text $title\n
    50         -    Text [textutil::repeat::strRepeat - [string length $title]]
    51         -    CloseParagraph [Verbatim]
    52         -    SaveContext
    53         -    NewEnv Division {
    54         -	incr currentEnv(lmargin) $lmarginIncrement
    55         -    }
           27  +proc InitSections {} {
           28  +    global seclist ; set seclist {} ;# list of items in this division
           29  +    global max     ; set max 0      ;# length of longest file path in the division
    56     30       return
    57     31   }
    58         -proc fmt_division_end   {}      {
           32  +
           33  +proc ProcessSections {} {
    59     34       global seclist max
           35  +    
           36  +    if {![llength $seclist]} {
           37  +	# Division is empty, nothing to do
           38  +	return
           39  +    }
    60     40   
    61         -    if {[llength $seclist] > 0} {
    62         -	set break 0
    63         -	incr max 2
    64         -	set  rmargin [expr {80 - $max}]
    65         -	if {$rmargin < 20} {set rmargin 20}
    66         -	set pfx [textutil::blank $max]
    67         -	incr max -1
    68         -	set fpfx "[textutil::repeat::strRepeat . $max] "
           41  +    incr max 2  ; set rmargin [RMargin  $max]
           42  +    incr max -1 ; set blank   [Blank    $max]
           43  +    incr max -1 ; set dots   "[Repeat . $max] "
    69     44   
    70         -	foreach {file desc} $seclist {
    71         -	    set   opfx "$file [string range $fpfx [string length $file] end]"
    72         -	    Text $opfx[textutil::adjust::indent [textutil::adjust::adjust $desc -length $rmargin] $pfx 1]
    73         -	    CloseParagraph [Verbatim]
    74         -	}
    75         -	set seclist {}
           45  +    # Example wrt max handling, blank, and dots:
           46  +    #
           47  +    # string = "longest",  max = 7 +2 => max = lmargin = 9
           48  +    # blank  = "________" (max = 8, using _ as visible placeholder)
           49  +    # dots   = "......._" (max = 7 (dots))
           50  +    
           51  +    foreach {file desc} $seclist {
           52  +	Text [InFlow $desc $rmargin [ReHead $dots "$file "] $blank]
           53  +	CloseParagraph [Verbatim]
    76     54       }
    77     55   
    78         -    RestoreContext
           56  +    set seclist {}
           57  +    return
           58  +}
           59  +
           60  +proc fmt_toc_begin {label title} {
           61  +    set title "$label -- $title"
           62  +    
           63  +    TextInitialize
           64  +    lappend   hdr "Table of contents [Provenance]"
           65  +    lappend   hdr ""
           66  +    SectTitle hdr $title
           67  +    Text [Compose hdr]    
           68  +    CloseParagraph [Verbatim]
           69  +    return
           70  +}
           71  +
           72  +proc fmt_toc_end {} {
           73  +    ProcessSections
           74  +    return
           75  +}
           76  +
           77  +proc fmt_division_start {title symfile} {
           78  +    # We may have sections before the new division
           79  +    ProcessSections
           80  +
           81  +    InitSections
           82  +    SubsectTitle hdr $title
           83  +    Text [Compose hdr]
           84  +    CloseParagraph [Verbatim]
           85  +
           86  +    ContextPush ;# Ref (a)
           87  +    ContextNew Division { MarginIn }
           88  +    return
           89  +}
           90  +
           91  +proc fmt_division_end   {}      {
           92  +    ProcessSections
           93  +    ContextPop ;# Ref (a)
    79     94       return
    80     95   }
           96  +
    81     97   proc fmt_item {file label desc} {
    82         -    global seclist max
           98  +    global  seclist max
    83     99       lappend seclist $file $desc
    84         -    if {[string length $file] > $max} {set max [string length $file]}
          100  +    MaxLen max $file
    85    101       return
    86    102   }
          103  +
          104  +proc fmt_comment {text} {return}
    87    105   
    88    106   ################################################################

Changes to modules/doctools/mpformats/toc.tmml.

     1      1   # -*- tcl -*-
     2         -#
     3         -# $Id: toc.tmml,v 1.6 2005/09/28 04:51:19 andreas_kupries Exp $
     4         -#
     5      2   # Engine to convert a doctoc document into TMML.
     6      3   #
     7         -# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
            4  +# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
     8      5   # Freely redistributable.
     9      6   #
    10      7   # See also <URL: http://tmml.sourceforge.net>
    11      8   #
    12      9   ######################################################################
    13     10   
    14     11   dt_source _toc_common.tcl
................................................................................
    25     22   proc fmt_plain_text {text} {if {$text != {}} {return \n} else {return {}}}
    26     23   
    27     24   ################################################################
    28     25   ## Backend for TMML markup
    29     26   
    30     27   proc fmt_toc_begin      {label title}     {sequence [start manual package $label] [wrap $title title]}
    31     28   proc fmt_toc_end        {}                {end manual}
    32         -proc fmt_division_start {title symfile}   {sequence [start division] [wrap $text title]}
           29  +proc fmt_division_start {title symfile}   {sequence [start division] [wrap $title title]}
    33     30   proc fmt_division_end   {}                {end   division}
    34     31   proc fmt_item           {file label desc} {emptyElement subdoc href [dt_fmap $file]}
    35     32   proc fmt_comment        {text}            {xmlComment $text}
    36     33   
    37     34   ################################################################

Added modules/doctools/tests/desc/09.


Added modules/doctools/tests/desc/10.


Added modules/doctools/tests/desc/11.


Added modules/doctools/tests/desc/12.


Added modules/doctools/tests/desc/13.


Added modules/doctools/tests/desc/14.


Added modules/doctools/tests/desc/15.


Changes to modules/doctools/tests/html/05.

     1         -
     2      1   <!DOCTYPE html><html><head>
     3      2   <title>BASIC - </title>
     4      3   <style type="text/css"><!--
     5      4       HTML {
     6      5   	background: 	#FFFFFF;
     7      6   	color: 		black;
     8      7       }

Changes to modules/doctools/tests/html/08.

     1         -
     2      1   <!DOCTYPE html><html><head>
     3      2   <title>ALL - ..THE_MODULE..</title>
     4      3   <style type="text/css"><!--
     5      4       HTML {
     6      5   	background: 	#FFFFFF;
     7      6   	color: 		black;
     8      7       }

Added modules/doctools/tests/html/09.

            1  +<!DOCTYPE html><html><head>
            2  +<title>TEST - </title>
            3  +<style type="text/css"><!--
            4  +    HTML {
            5  +	background: 	#FFFFFF;
            6  +	color: 		black;
            7  +    }
            8  +    BODY {
            9  +	background: 	#FFFFFF;
           10  +	color:	 	black;
           11  +    }
           12  +    DIV.doctools {
           13  +	margin-left:	10%;
           14  +	margin-right:	10%;
           15  +    }
           16  +    DIV.doctools H1,DIV.doctools H2 {
           17  +	margin-left:	-5%;
           18  +    }
           19  +    H1, H2, H3, H4 {
           20  +	margin-top: 	1em;
           21  +	font-family:	sans-serif;
           22  +	font-size:	large;
           23  +	color:		#005A9C;
           24  +	background: 	transparent;
           25  +	text-align:		left;
           26  +    }
           27  +    H1.doctools_title {
           28  +	text-align: center;
           29  +    }
           30  +    UL,OL {
           31  +	margin-right: 0em;
           32  +	margin-top: 3pt;
           33  +	margin-bottom: 3pt;
           34  +    }
           35  +    UL LI {
           36  +	list-style: disc;
           37  +    }
           38  +    OL LI {
           39  +	list-style: decimal;
           40  +    }
           41  +    DT {
           42  +	padding-top: 	1ex;
           43  +    }
           44  +    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
           45  +	font:		normal 12pt/14pt sans-serif;
           46  +	list-style:	none;
           47  +    }
           48  +    LI.doctools_section, LI.doctools_subsection {
           49  +	list-style: 	none;
           50  +	margin-left: 	0em;
           51  +	text-indent:	0em;
           52  +	padding: 	0em;
           53  +    }
           54  +    PRE {
           55  +	display: 	block;
           56  +	font-family:	monospace;
           57  +	white-space:	pre;
           58  +	margin:		0%;
           59  +	padding-top:	0.5ex;
           60  +	padding-bottom:	0.5ex;
           61  +	padding-left:	1ex;
           62  +	padding-right:	1ex;
           63  +	width:		100%;
           64  +    }
           65  +    PRE.doctools_example {
           66  +	color: 		black;
           67  +	background: 	#f5dcb3;
           68  +	border:		1px solid black;
           69  +    }
           70  +    UL.doctools_requirements LI, UL.doctools_syntax LI {
           71  +	list-style: 	none;
           72  +	margin-left: 	0em;
           73  +	text-indent:	0em;
           74  +	padding:	0em;
           75  +    }
           76  +    DIV.doctools_synopsis {
           77  +	color: 		black;
           78  +	background: 	#80ffff;
           79  +	border:		1px solid black;
           80  +	font-family:	serif;
           81  +	margin-top: 	1em;
           82  +	margin-bottom: 	1em;
           83  +    }
           84  +    UL.doctools_syntax {
           85  +	margin-top: 	1em;
           86  +	border-top:	1px solid black;
           87  +    }
           88  +    UL.doctools_requirements {
           89  +	margin-bottom: 	1em;
           90  +	border-bottom:	1px solid black;
           91  +    }
           92  +--></style>
           93  +</head>
           94  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
           95  +   -->
           96  +<!-- Copyright &amp;copy; .COPYRIGHT.
           97  +   -->
           98  +<!-- TEST.z
           99  +   -->
          100  +<body><div class="doctools">
          101  +<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
          102  +<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
          103  +<p>TEST -</p>
          104  +</div>
          105  +<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
          106  +<ul class="doctools_toc">
          107  +<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
          108  +<li class="doctools_section"><a href="#section1">Description</a></li>
          109  +<li class="doctools_section"><a href="#copyright">Copyright</a></li>
          110  +</ul>
          111  +</div>
          112  +<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
          113  +<p>lorem</p>
          114  +<pre class="doctools_example">
          115  +1 lorem ipsum dolores
          116  +</pre>
          117  +<p>ipsum</p>
          118  +<pre class="doctools_example"> 2 lorem ipsum dolores </pre>
          119  +<p>dolores</p>
          120  +<pre class="doctools_example">
          121  +3 lorem ipsum dolores
          122  +</pre>
          123  +<p>lorem</p>
          124  +<pre class="doctools_example"> 4 lorem ipsum dolores
          125  +</pre>
          126  +<p>ipsum</p>
          127  +<pre class="doctools_example">
          128  +5 lorem ipsum dolores </pre>
          129  +<p>dolores</p>
          130  +</div>
          131  +<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
          132  +<p>Copyright &copy; .COPYRIGHT.</p>
          133  +</div>
          134  +</div></body></html>

Added modules/doctools/tests/html/10.

            1  +<!DOCTYPE html><html><head>
            2  +<title>test-itemized - </title>
            3  +<style type="text/css"><!--
            4  +    HTML {
            5  +	background: 	#FFFFFF;
            6  +	color: 		black;
            7  +    }
            8  +    BODY {
            9  +	background: 	#FFFFFF;
           10  +	color:	 	black;
           11  +    }
           12  +    DIV.doctools {
           13  +	margin-left:	10%;
           14  +	margin-right:	10%;
           15  +    }
           16  +    DIV.doctools H1,DIV.doctools H2 {
           17  +	margin-left:	-5%;
           18  +    }
           19  +    H1, H2, H3, H4 {
           20  +	margin-top: 	1em;
           21  +	font-family:	sans-serif;
           22  +	font-size:	large;
           23  +	color:		#005A9C;
           24  +	background: 	transparent;
           25  +	text-align:		left;
           26  +    }
           27  +    H1.doctools_title {
           28  +	text-align: center;
           29  +    }
           30  +    UL,OL {
           31  +	margin-right: 0em;
           32  +	margin-top: 3pt;
           33  +	margin-bottom: 3pt;
           34  +    }
           35  +    UL LI {
           36  +	list-style: disc;
           37  +    }
           38  +    OL LI {
           39  +	list-style: decimal;
           40  +    }
           41  +    DT {
           42  +	padding-top: 	1ex;
           43  +    }
           44  +    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
           45  +	font:		normal 12pt/14pt sans-serif;
           46  +	list-style:	none;
           47  +    }
           48  +    LI.doctools_section, LI.doctools_subsection {
           49  +	list-style: 	none;
           50  +	margin-left: 	0em;
           51  +	text-indent:	0em;
           52  +	padding: 	0em;
           53  +    }
           54  +    PRE {
           55  +	display: 	block;
           56  +	font-family:	monospace;
           57  +	white-space:	pre;
           58  +	margin:		0%;
           59  +	padding-top:	0.5ex;
           60  +	padding-bottom:	0.5ex;
           61  +	padding-left:	1ex;
           62  +	padding-right:	1ex;
           63  +	width:		100%;
           64  +    }
           65  +    PRE.doctools_example {
           66  +	color: 		black;
           67  +	background: 	#f5dcb3;
           68  +	border:		1px solid black;
           69  +    }
           70  +    UL.doctools_requirements LI, UL.doctools_syntax LI {
           71  +	list-style: 	none;
           72  +	margin-left: 	0em;
           73  +	text-indent:	0em;
           74  +	padding:	0em;
           75  +    }
           76  +    DIV.doctools_synopsis {
           77  +	color: 		black;
           78  +	background: 	#80ffff;
           79  +	border:		1px solid black;
           80  +	font-family:	serif;
           81  +	margin-top: 	1em;
           82  +	margin-bottom: 	1em;
           83  +    }
           84  +    UL.doctools_syntax {
           85  +	margin-top: 	1em;
           86  +	border-top:	1px solid black;
           87  +    }
           88  +    UL.doctools_requirements {
           89  +	margin-bottom: 	1em;
           90  +	border-bottom:	1px solid black;
           91  +    }
           92  +--></style>
           93  +</head>
           94  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
           95  +   -->
           96  +<!-- Copyright &amp;copy; .COPYRIGHT.
           97  +   -->
           98  +<!-- test-itemized.1
           99  +   -->
          100  +<body><div class="doctools">
          101  +<h1 class="doctools_title">test-itemized(1) n .MODULE. &quot;&quot;</h1>
          102  +<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
          103  +<p>test-itemized -</p>
          104  +</div>
          105  +<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
          106  +<ul class="doctools_toc">
          107  +<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
          108  +<li class="doctools_section"><a href="#section1">Description</a></li>
          109  +<li class="doctools_section"><a href="#copyright">Copyright</a></li>
          110  +</ul>
          111  +</div>
          112  +<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
          113  +<p>lorem ipsum dolores</p>
          114  +<ul class="doctools_itemized">
          115  +<li><p>lorem ipsum dolores</p></li>
          116  +<li><p>lorem ipsum dolores</p>
          117  +<p>lorem ipsum dolores</p></li>
          118  +<li><p>lorem ipsum dolores</p>
          119  +<p>lorem ipsum dolores</p>
          120  +<p>lorem ipsum dolores</p></li>
          121  +</ul>
          122  +</div>
          123  +<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
          124  +<p>Copyright &copy; .COPYRIGHT.</p>
          125  +</div>
          126  +</div></body></html>

Added modules/doctools/tests/html/11.

            1  +<!DOCTYPE html><html><head>
            2  +<title>test-enumerated - </title>
            3  +<style type="text/css"><!--
            4  +    HTML {
            5  +	background: 	#FFFFFF;
            6  +	color: 		black;
            7  +    }
            8  +    BODY {
            9  +	background: 	#FFFFFF;
           10  +	color:	 	black;
           11  +    }
           12  +    DIV.doctools {
           13  +	margin-left:	10%;
           14  +	margin-right:	10%;
           15  +    }
           16  +    DIV.doctools H1,DIV.doctools H2 {
           17  +	margin-left:	-5%;
           18  +    }
           19  +    H1, H2, H3, H4 {
           20  +	margin-top: 	1em;
           21  +	font-family:	sans-serif;
           22  +	font-size:	large;
           23  +	color:		#005A9C;
           24  +	background: 	transparent;
           25  +	text-align:		left;
           26  +    }
           27  +    H1.doctools_title {
           28  +	text-align: center;
           29  +    }
           30  +    UL,OL {
           31  +	margin-right: 0em;
           32  +	margin-top: 3pt;
           33  +	margin-bottom: 3pt;
           34  +    }
           35  +    UL LI {
           36  +	list-style: disc;
           37  +    }
           38  +    OL LI {
           39  +	list-style: decimal;
           40  +    }
           41  +    DT {
           42  +	padding-top: 	1ex;
           43  +    }
           44  +    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
           45  +	font:		normal 12pt/14pt sans-serif;
           46  +	list-style:	none;
           47  +    }
           48  +    LI.doctools_section, LI.doctools_subsection {
           49  +	list-style: 	none;
           50  +	margin-left: 	0em;
           51  +	text-indent:	0em;
           52  +	padding: 	0em;
           53  +    }
           54  +    PRE {
           55  +	display: 	block;
           56  +	font-family:	monospace;
           57  +	white-space:	pre;
           58  +	margin:		0%;
           59  +	padding-top:	0.5ex;
           60  +	padding-bottom:	0.5ex;
           61  +	padding-left:	1ex;
           62  +	padding-right:	1ex;
           63  +	width:		100%;
           64  +    }
           65  +    PRE.doctools_example {
           66  +	color: 		black;
           67  +	background: 	#f5dcb3;
           68  +	border:		1px solid black;
           69  +    }
           70  +    UL.doctools_requirements LI, UL.doctools_syntax LI {
           71  +	list-style: 	none;
           72  +	margin-left: 	0em;
           73  +	text-indent:	0em;
           74  +	padding:	0em;
           75  +    }
           76  +    DIV.doctools_synopsis {
           77  +	color: 		black;
           78  +	background: 	#80ffff;
           79  +	border:		1px solid black;
           80  +	font-family:	serif;
           81  +	margin-top: 	1em;
           82  +	margin-bottom: 	1em;
           83  +    }
           84  +    UL.doctools_syntax {
           85  +	margin-top: 	1em;
           86  +	border-top:	1px solid black;
           87  +    }
           88  +    UL.doctools_requirements {
           89  +	margin-bottom: 	1em;
           90  +	border-bottom:	1px solid black;
           91  +    }
           92  +--></style>
           93  +</head>
           94  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
           95  +   -->
           96  +<!-- Copyright &amp;copy; .COPYRIGHT.
           97  +   -->
           98  +<!-- test-enumerated.1
           99  +   -->
          100  +<body><div class="doctools">
          101  +<h1 class="doctools_title">test-enumerated(1) n .MODULE. &quot;&quot;</h1>
          102  +<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
          103  +<p>test-enumerated -</p>
          104  +</div>
          105  +<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
          106  +<ul class="doctools_toc">
          107  +<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
          108  +<li class="doctools_section"><a href="#section1">Description</a></li>
          109  +<li class="doctools_section"><a href="#copyright">Copyright</a></li>
          110  +</ul>
          111  +</div>
          112  +<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
          113  +<p>lorem ipsum dolores</p>
          114  +<ol class="doctools_enumerated">
          115  +<li><p>lorem ipsum dolores</p></li>
          116  +<li><p>lorem ipsum dolores</p>
          117  +<p>lorem ipsum dolores</p></li>
          118  +<li><p>lorem ipsum dolores</p>
          119  +<p>lorem ipsum dolores</p>
          120  +<p>lorem ipsum dolores</p></li>
          121  +</ol>
          122  +</div>
          123  +<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
          124  +<p>Copyright &copy; .COPYRIGHT.</p>
          125  +</div>
          126  +</div></body></html>

Added modules/doctools/tests/html/12.

            1  +<!DOCTYPE html><html><head>
            2  +<title>test-definitions - </title>
            3  +<style type="text/css"><!--
            4  +    HTML {
            5  +	background: 	#FFFFFF;
            6  +	color: 		black;
            7  +    }
            8  +    BODY {
            9  +	background: 	#FFFFFF;
           10  +	color:	 	black;
           11  +    }
           12  +    DIV.doctools {
           13  +	margin-left:	10%;
           14  +	margin-right:	10%;
           15  +    }
           16  +    DIV.doctools H1,DIV.doctools H2 {
           17  +	margin-left:	-5%;
           18  +    }
           19  +    H1, H2, H3, H4 {
           20  +	margin-top: 	1em;
           21  +	font-family:	sans-serif;
           22  +	font-size:	large;
           23  +	color:		#005A9C;
           24  +	background: 	transparent;
           25  +	text-align:		left;
           26  +    }
           27  +    H1.doctools_title {
           28  +	text-align: center;
           29  +    }
           30  +    UL,OL {
           31  +	margin-right: 0em;
           32  +	margin-top: 3pt;
           33  +	margin-bottom: 3pt;
           34  +    }
           35  +    UL LI {
           36  +	list-style: disc;
           37  +    }
           38  +    OL LI {
           39  +	list-style: decimal;
           40  +    }
           41  +    DT {
           42  +	padding-top: 	1ex;
           43  +    }
           44  +    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
           45  +	font:		normal 12pt/14pt sans-serif;
           46  +	list-style:	none;
           47  +    }
           48  +    LI.doctools_section, LI.doctools_subsection {
           49  +	list-style: 	none;
           50  +	margin-left: 	0em;
           51  +	text-indent:	0em;
           52  +	padding: 	0em;
           53  +    }
           54  +    PRE {
           55  +	display: 	block;
           56  +	font-family:	monospace;
           57  +	white-space:	pre;
           58  +	margin:		0%;
           59  +	padding-top:	0.5ex;
           60  +	padding-bottom:	0.5ex;
           61  +	padding-left:	1ex;
           62  +	padding-right:	1ex;
           63  +	width:		100%;
           64  +    }
           65  +    PRE.doctools_example {
           66  +	color: 		black;
           67  +	background: 	#f5dcb3;
           68  +	border:		1px solid black;
           69  +    }
           70  +    UL.doctools_requirements LI, UL.doctools_syntax LI {
           71  +	list-style: 	none;
           72  +	margin-left: 	0em;
           73  +	text-indent:	0em;
           74  +	padding:	0em;
           75  +    }
           76  +    DIV.doctools_synopsis {
           77  +	color: 		black;
           78  +	background: 	#80ffff;
           79  +	border:		1px solid black;
           80  +	font-family:	serif;
           81  +	margin-top: 	1em;
           82  +	margin-bottom: 	1em;
           83  +    }
           84  +    UL.doctools_syntax {
           85  +	margin-top: 	1em;
           86  +	border-top:	1px solid black;
           87  +    }
           88  +    UL.doctools_requirements {
           89  +	margin-bottom: 	1em;
           90  +	border-bottom:	1px solid black;
           91  +    }
           92  +--></style>
           93  +</head>
           94  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
           95  +   -->
           96  +<!-- Copyright &amp;copy; .COPYRIGHT.
           97  +   -->
           98  +<!-- test-definitions.1
           99  +   -->
          100  +<body><div class="doctools">
          101  +<h1 class="doctools_title">test-definitions(1) n .MODULE. &quot;&quot;</h1>
          102  +<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
          103  +<p>test-definitions -</p>
          104  +</div>
          105  +<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
          106  +<ul class="doctools_toc">
          107  +<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
          108  +<li class="doctools_section"><a href="#section1">Description</a></li>
          109  +<li class="doctools_section"><a href="#copyright">Copyright</a></li>
          110  +</ul>
          111  +</div>
          112  +<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
          113  +<p>lorem ipsum dolores</p>
          114  +<dl class="doctools_definitions">
          115  +<dt>lorem</dt>
          116  +<dd><p>ipsum dolores</p></dd>
          117  +<dt>lorem</dt>
          118  +<dd><p>ipsum dolores</p>
          119  +<p>lorem ipsum dolores</p></dd>
          120  +<dt>lorem</dt>
          121  +<dd><p>ipsum dolores</p>
          122  +<p>lorem ipsum dolores</p>
          123  +<p>lorem ipsum dolores</p></dd>
          124  +</dl>
          125  +</div>
          126  +<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
          127  +<p>Copyright &copy; .COPYRIGHT.</p>
          128  +</div>
          129  +</div></body></html>

Added modules/doctools/tests/html/13.

            1  +<!DOCTYPE html><html><head>
            2  +<title>test-itemized-examples - </title>
            3  +<style type="text/css"><!--
            4  +    HTML {
            5  +	background: 	#FFFFFF;
            6  +	color: 		black;
            7  +    }
            8  +    BODY {
            9  +	background: 	#FFFFFF;
           10  +	color:	 	black;
           11  +    }
           12  +    DIV.doctools {
           13  +	margin-left:	10%;
           14  +	margin-right:	10%;
           15  +    }
           16  +    DIV.doctools H1,DIV.doctools H2 {
           17  +	margin-left:	-5%;
           18  +    }
           19  +    H1, H2, H3, H4 {
           20  +	margin-top: 	1em;
           21  +	font-family:	sans-serif;
           22  +	font-size:	large;
           23  +	color:		#005A9C;
           24  +	background: 	transparent;
           25  +	text-align:		left;
           26  +    }
           27  +    H1.doctools_title {
           28  +	text-align: center;
           29  +    }
           30  +    UL,OL {
           31  +	margin-right: 0em;
           32  +	margin-top: 3pt;
           33  +	margin-bottom: 3pt;
           34  +    }
           35  +    UL LI {
           36  +	list-style: disc;
           37  +    }
           38  +    OL LI {
           39  +	list-style: decimal;
           40  +    }
           41  +    DT {
           42  +	padding-top: 	1ex;
           43  +    }
           44  +    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
           45  +	font:		normal 12pt/14pt sans-serif;
           46  +	list-style:	none;
           47  +    }
           48  +    LI.doctools_section, LI.doctools_subsection {
           49  +	list-style: 	none;
           50  +	margin-left: 	0em;
           51  +	text-indent:	0em;
           52  +	padding: 	0em;
           53  +    }
           54  +    PRE {
           55  +	display: 	block;
           56  +	font-family:	monospace;
           57  +	white-space:	pre;
           58  +	margin:		0%;
           59  +	padding-top:	0.5ex;
           60  +	padding-bottom:	0.5ex;
           61  +	padding-left:	1ex;
           62  +	padding-right:	1ex;
           63  +	width:		100%;
           64  +    }
           65  +    PRE.doctools_example {
           66  +	color: 		black;
           67  +	background: 	#f5dcb3;
           68  +	border:		1px solid black;
           69  +    }
           70  +    UL.doctools_requirements LI, UL.doctools_syntax LI {
           71  +	list-style: 	none;
           72  +	margin-left: 	0em;
           73  +	text-indent:	0em;
           74  +	padding:	0em;
           75  +    }
           76  +    DIV.doctools_synopsis {
           77  +	color: 		black;
           78  +	background: 	#80ffff;
           79  +	border:		1px solid black;
           80  +	font-family:	serif;
           81  +	margin-top: 	1em;
           82  +	margin-bottom: 	1em;
           83  +    }
           84  +    UL.doctools_syntax {
           85  +	margin-top: 	1em;
           86  +	border-top:	1px solid black;
           87  +    }
           88  +    UL.doctools_requirements {
           89  +	margin-bottom: 	1em;
           90  +	border-bottom:	1px solid black;
           91  +    }
           92  +--></style>
           93  +</head>
           94  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
           95  +   -->
           96  +<!-- Copyright &amp;copy; .COPYRIGHT.
           97  +   -->
           98  +<!-- test-itemized-examples.1
           99  +   -->
          100  +<body><div class="doctools">
          101  +<h1 class="doctools_title">test-itemized-examples(1) n .MODULE. &quot;&quot;</h1>
          102  +<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
          103  +<p>test-itemized-examples -</p>
          104  +</div>
          105  +<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
          106  +<ul class="doctools_toc">
          107  +<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
          108  +<li class="doctools_section"><a href="#section1">Description</a></li>
          109  +<li class="doctools_section"><a href="#copyright">Copyright</a></li>
          110  +</ul>
          111  +</div>
          112  +<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
          113  +<p>lorem ipsum dolores</p>
          114  +<ul class="doctools_itemized">
          115  +<li>
          116  +<pre class="doctools_example"> A lorem ipsum dolores </pre>
          117  +</li>
          118  +<li><p>lorem ipsum dolores</p>
          119  +<pre class="doctools_example"> B lorem ipsum dolores </pre>
          120  +<p>lorem ipsum dolores</p></li>
          121  +<li><p>lorem ipsum dolores</p>
          122  +<pre class="doctools_example"> C lorem ipsum dolores </pre>
          123  +</li>
          124  +<li><p>lorem ipsum dolores</p></li>
          125  +</ul>
          126  +</div>
          127  +<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
          128  +<p>Copyright &copy; .COPYRIGHT.</p>
          129  +</div>
          130  +</div></body></html>

Added modules/doctools/tests/html/14.

            1  +<!DOCTYPE html><html><head>
            2  +<title>test-enumerated-examples - </title>
            3  +<style type="text/css"><!--
            4  +    HTML {
            5  +	background: 	#FFFFFF;
            6  +	color: 		black;
            7  +    }
            8  +    BODY {
            9  +	background: 	#FFFFFF;
           10  +	color:	 	black;
           11  +    }
           12  +    DIV.doctools {
           13  +	margin-left:	10%;
           14  +	margin-right:	10%;
           15  +    }
           16  +    DIV.doctools H1,DIV.doctools H2 {
           17  +	margin-left:	-5%;
           18  +    }
           19  +    H1, H2, H3, H4 {
           20  +	margin-top: 	1em;
           21  +	font-family:	sans-serif;
           22  +	font-size:	large;
           23  +	color:		#005A9C;
           24  +	background: 	transparent;
           25  +	text-align:		left;
           26  +    }
           27  +    H1.doctools_title {
           28  +	text-align: center;
           29  +    }
           30  +    UL,OL {
           31  +	margin-right: 0em;
           32  +	margin-top: 3pt;
           33  +	margin-bottom: 3pt;
           34  +    }
           35  +    UL LI {
           36  +	list-style: disc;
           37  +    }
           38  +    OL LI {
           39  +	list-style: decimal;
           40  +    }
           41  +    DT {
           42  +	padding-top: 	1ex;
           43  +    }
           44  +    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
           45  +	font:		normal 12pt/14pt sans-serif;
           46  +	list-style:	none;
           47  +    }
           48  +    LI.doctools_section, LI.doctools_subsection {
           49  +	list-style: 	none;
           50  +	margin-left: 	0em;
           51  +	text-indent:	0em;
           52  +	padding: 	0em;
           53  +    }
           54  +    PRE {
           55  +	display: 	block;
           56  +	font-family:	monospace;
           57  +	white-space:	pre;
           58  +	margin:		0%;
           59  +	padding-top:	0.5ex;
           60  +	padding-bottom:	0.5ex;
           61  +	padding-left:	1ex;
           62  +	padding-right:	1ex;
           63  +	width:		100%;
           64  +    }
           65  +    PRE.doctools_example {
           66  +	color: 		black;
           67  +	background: 	#f5dcb3;
           68  +	border:		1px solid black;
           69  +    }
           70  +    UL.doctools_requirements LI, UL.doctools_syntax LI {
           71  +	list-style: 	none;
           72  +	margin-left: 	0em;
           73  +	text-indent:	0em;
           74  +	padding:	0em;
           75  +    }
           76  +    DIV.doctools_synopsis {
           77  +	color: 		black;
           78  +	background: 	#80ffff;
           79  +	border:		1px solid black;
           80  +	font-family:	serif;
           81  +	margin-top: 	1em;
           82  +	margin-bottom: 	1em;
           83  +    }
           84  +    UL.doctools_syntax {
           85  +	margin-top: 	1em;
           86  +	border-top:	1px solid black;
           87  +    }
           88  +    UL.doctools_requirements {
           89  +	margin-bottom: 	1em;
           90  +	border-bottom:	1px solid black;
           91  +    }
           92  +--></style>
           93  +</head>
           94  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
           95  +   -->
           96  +<!-- Copyright &amp;copy; .COPYRIGHT.
           97  +   -->
           98  +<!-- test-enumerated-examples.1
           99  +   -->
          100  +<body><div class="doctools">
          101  +<h1 class="doctools_title">test-enumerated-examples(1) n .MODULE. &quot;&quot;</h1>
          102  +<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
          103  +<p>test-enumerated-examples -</p>
          104  +</div>
          105  +<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
          106  +<ul class="doctools_toc">
          107  +<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
          108  +<li class="doctools_section"><a href="#section1">Description</a></li>
          109  +<li class="doctools_section"><a href="#copyright">Copyright</a></li>
          110  +</ul>
          111  +</div>
          112  +<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
          113  +<p>lorem ipsum dolores</p>
          114  +<ol class="doctools_enumerated">
          115  +<li>
          116  +<pre class="doctools_example"> A1 lorem ipsum dolores </pre>
          117  +</li>
          118  +<li><p>lorem ipsum dolores</p>
          119  +<pre class="doctools_example"> B2 lorem ipsum dolores </pre>
          120  +<p>lorem ipsum dolores</p></li>
          121  +<li><p>lorem ipsum dolores</p>
          122  +<pre class="doctools_example"> C3 lorem ipsum dolores </pre>
          123  +</li>
          124  +<li><p>lorem ipsum dolores</p></li>
          125  +</ol>
          126  +</div>
          127  +<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
          128  +<p>Copyright &copy; .COPYRIGHT.</p>
          129  +</div>
          130  +</div></body></html>

Added modules/doctools/tests/html/15.

            1  +<!DOCTYPE html><html><head>
            2  +<title>test-definition-examples - </title>
            3  +<style type="text/css"><!--
            4  +    HTML {
            5  +	background: 	#FFFFFF;
            6  +	color: 		black;
            7  +    }
            8  +    BODY {
            9  +	background: 	#FFFFFF;
           10  +	color:	 	black;
           11  +    }
           12  +    DIV.doctools {
           13  +	margin-left:	10%;
           14  +	margin-right:	10%;
           15  +    }
           16  +    DIV.doctools H1,DIV.doctools H2 {
           17  +	margin-left:	-5%;
           18  +    }
           19  +    H1, H2, H3, H4 {
           20  +	margin-top: 	1em;
           21  +	font-family:	sans-serif;
           22  +	font-size:	large;
           23  +	color:		#005A9C;
           24  +	background: 	transparent;
           25  +	text-align:		left;
           26  +    }
           27  +    H1.doctools_title {
           28  +	text-align: center;
           29  +    }
           30  +    UL,OL {
           31  +	margin-right: 0em;
           32  +	margin-top: 3pt;
           33  +	margin-bottom: 3pt;
           34  +    }
           35  +    UL LI {
           36  +	list-style: disc;
           37  +    }
           38  +    OL LI {
           39  +	list-style: decimal;
           40  +    }
           41  +    DT {
           42  +	padding-top: 	1ex;
           43  +    }
           44  +    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
           45  +	font:		normal 12pt/14pt sans-serif;
           46  +	list-style:	none;
           47  +    }
           48  +    LI.doctools_section, LI.doctools_subsection {
           49  +	list-style: 	none;
           50  +	margin-left: 	0em;
           51  +	text-indent:	0em;
           52  +	padding: 	0em;
           53  +    }
           54  +    PRE {
           55  +	display: 	block;
           56  +	font-family:	monospace;
           57  +	white-space:	pre;
           58  +	margin:		0%;
           59  +	padding-top:	0.5ex;
           60  +	padding-bottom:	0.5ex;
           61  +	padding-left:	1ex;
           62  +	padding-right:	1ex;
           63  +	width:		100%;
           64  +    }
           65  +    PRE.doctools_example {
           66  +	color: 		black;
           67  +	background: 	#f5dcb3;
           68  +	border:		1px solid black;
           69  +    }
           70  +    UL.doctools_requirements LI, UL.doctools_syntax LI {
           71  +	list-style: 	none;
           72  +	margin-left: 	0em;
           73  +	text-indent:	0em;
           74  +	padding:	0em;
           75  +    }
           76  +    DIV.doctools_synopsis {
           77  +	color: 		black;
           78  +	background: 	#80ffff;
           79  +	border:		1px solid black;
           80  +	font-family:	serif;
           81  +	margin-top: 	1em;
           82  +	margin-bottom: 	1em;
           83  +    }
           84  +    UL.doctools_syntax {
           85  +	margin-top: 	1em;
           86  +	border-top:	1px solid black;
           87  +    }
           88  +    UL.doctools_requirements {
           89  +	margin-bottom: 	1em;
           90  +	border-bottom:	1px solid black;
           91  +    }
           92  +--></style>
           93  +</head>
           94  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
           95  +   -->
           96  +<!-- Copyright &amp;copy; .COPYRIGHT.
           97  +   -->
           98  +<!-- test-definition-examples.1
           99  +   -->
          100  +<body><div class="doctools">
          101  +<h1 class="doctools_title">test-definition-examples(1) n .MODULE. &quot;&quot;</h1>
          102  +<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
          103  +<p>test-definition-examples -</p>
          104  +</div>
          105  +<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
          106  +<ul class="doctools_toc">
          107  +<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
          108  +<li class="doctools_section"><a href="#section1">Description</a></li>
          109  +<li class="doctools_section"><a href="#copyright">Copyright</a></li>
          110  +</ul>
          111  +</div>
          112  +<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
          113  +<p>lorem ipsum dolores</p>
          114  +<dl class="doctools_definitions">
          115  +<dt>lorem</dt>
          116  +<dd>
          117  +<pre class="doctools_example"> A1 lorem ipsum dolores </pre>
          118  +</dd>
          119  +<dt>lorem</dt>
          120  +<dd><p>ipsum dolores</p>
          121  +<pre class="doctools_example"> B2 lorem ipsum dolores </pre>
          122  +<p>lorem ipsum dolores</p></dd>
          123  +<dt>lorem</dt>
          124  +<dd><p>ipsum dolores</p>
          125  +<pre class="doctools_example"> C3 lorem ipsum dolores </pre>
          126  +</dd>
          127  +<dt>lorem</dt>
          128  +<dd><p>ipsum dolores</p></dd>
          129  +</dl>
          130  +</div>
          131  +<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
          132  +<p>Copyright &copy; .COPYRIGHT.</p>
          133  +</div>
          134  +</div></body></html>

Added modules/doctools/tests/idx/html/00.

            1  +<!DOCTYPE html>
            2  +<html>
            3  +<!-- Generated by tcllib/doctools/idx with format 'html'
            4  +   -->
            5  +<!-- KWIC
            6  +   -->
            7  +<head>
            8  +<title> KWIC </title>
            9  +</head>
           10  +<body>
           11  +<h3> KWIC -- Test </h3>
           12  +<hr><div class="#doctools_idxnav">
           13  +</div>
           14  +<hr><table class="#doctools_idx" width="100%">
           15  +</table>
           16  +</body></html>

Added modules/doctools/tests/idx/html/01.

            1  +<!DOCTYPE html>
            2  +<html>
            3  +<!-- Generated by tcllib/doctools/idx with format 'html'
            4  +   -->
            5  +<!-- KWIC
            6  +   -->
            7  +<head>
            8  +<title> KWIC </title>
            9  +</head>
           10  +<body>
           11  +<h3> KWIC -- Test </h3>
           12  +<hr><div class="#doctools_idxnav">
           13  +<a href="#cL"> L </a>
           14  +</div>
           15  +<hr><table class="#doctools_idx" width="100%">
           16  +<tr class="#doctools_idxheader"><th colspan="2">
           17  +<a name="cL">Keywords: L</a>
           18  +</th></tr>
           19  +<tr class="#doctools_idxeven" valign=top>
           20  +<td class="#doctools_idxleft" width="35%"><a name="lorem"> lorem </a></td>
           21  +<td class="#doctools_idxright" width="65%">
           22  +<a href="ipsum"> dolores </a>
           23  +</td></tr>
           24  +</table>
           25  +</body></html>

Added modules/doctools/tests/idx/html/02.

            1  +<!DOCTYPE html>
            2  +<html>
            3  +<!-- Generated by tcllib/doctools/idx with format 'html'
            4  +   -->
            5  +<!-- KWIC
            6  +   -->
            7  +<head>
            8  +<title> KWIC </title>
            9  +</head>
           10  +<body>
           11  +<h3> KWIC -- Test </h3>
           12  +<hr><div class="#doctools_idxnav">
           13  +<a href="#cD"> D </a> &#183; <a href="#cL"> L </a>
           14  +</div>
           15  +<hr><table class="#doctools_idx" width="100%">
           16  +<tr class="#doctools_idxheader"><th colspan="2">
           17  +<a name="cD">Keywords: D</a>
           18  +</th></tr>
           19  +<tr class="#doctools_idxeven" valign=top>
           20  +<td class="#doctools_idxleft" width="35%"><a name="dolores"> dolores </a></td>
           21  +<td class="#doctools_idxright" width="65%">
           22  +<a href="lorem"> ipsum </a> &#183; <a href="dolores"> lorem </a> &#183; <a href="ipsum"> dolores </a>
           23  +</td></tr>
           24  +<tr class="#doctools_idxheader"><th colspan="2">
           25  +<a name="cL">Keywords: L</a>
           26  +</th></tr>
           27  +<tr class="#doctools_idxodd" valign=top>
           28  +<td class="#doctools_idxleft" width="35%"><a name="lorem"> lorem </a></td>
           29  +<td class="#doctools_idxright" width="65%">
           30  +<a href="ipsum"> dolores </a> &#183; <a href="lorem"> ipsum </a>
           31  +</td></tr>
           32  +</table>
           33  +</body></html>

Added modules/doctools/tests/idx/idx/00.

            1  +[comment { -- basic empty }]
            2  +[index_begin KWIC Test]
            3  +[index_end]

Added modules/doctools/tests/idx/idx/01.

            1  +[comment { -- basic key }]
            2  +[index_begin KWIC Test]
            3  +[key lorem]
            4  +[manpage ipsum dolores]
            5  +[index_end]

Added modules/doctools/tests/idx/idx/02.

            1  +[comment { -- multiple keys }]
            2  +[index_begin KWIC Test]
            3  +[key lorem]
            4  +[manpage ipsum dolores]
            5  +[manpage lorem ipsum]
            6  +[key dolores]
            7  +[manpage lorem ipsum]
            8  +[manpage dolores lorem]
            9  +[manpage ipsum dolores]
           10  +[index_end]

Added modules/doctools/tests/idx/nroff/00.

            1  +'\"
            2  +'\" Generated by tcllib/doctools/idx with format 'nroff'
            3  +.TH "KWIC" n
            4  +.so man.macros
            5  +.BS
            6  +.SH INDEX
            7  +Test
            8  +.RS
            9  +.RE

Added modules/doctools/tests/idx/nroff/01.

            1  +'\"
            2  +'\" Generated by tcllib/doctools/idx with format 'nroff'
            3  +.TH "KWIC" n
            4  +.so man.macros
            5  +.BS
            6  +.SH INDEX
            7  +Test
            8  +.RS
            9  +lorem
           10  +.RS
           11  +.TP
           12  +\fBipsum\fR
           13  +dolores
           14  +.RE
           15  +.RE

Added modules/doctools/tests/idx/nroff/02.

            1  +'\"
            2  +'\" Generated by tcllib/doctools/idx with format 'nroff'
            3  +.TH "KWIC" n
            4  +.\" The -*- nroff -*- definitions below are for supplemental macros used
            5  +.\" in Tcl/Tk manual entries.
            6  +.\"
            7  +.\" .AP type name in/out ?indent?
            8  +.\"	Start paragraph describing an argument to a library procedure.
            9  +.\"	type is type of argument (int, etc.), in/out is either "in", "out",
           10  +.\"	or "in/out" to describe whether procedure reads or modifies arg,
           11  +.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
           12  +.\"	needed;  use .AS below instead)
           13  +.\"
           14  +.\" .AS ?type? ?name?
           15  +.\"	Give maximum sizes of arguments for setting tab stops.  Type and
           16  +.\"	name are examples of largest possible arguments that will be passed
           17  +.\"	to .AP later.  If args are omitted, default tab stops are used.
           18  +.\"
           19  +.\" .BS
           20  +.\"	Start box enclosure.  From here until next .BE, everything will be
           21  +.\"	enclosed in one large box.
           22  +.\"
           23  +.\" .BE
           24  +.\"	End of box enclosure.
           25  +.\"
           26  +.\" .CS
           27  +.\"	Begin code excerpt.
           28  +.\"
           29  +.\" .CE
           30  +.\"	End code excerpt.
           31  +.\"
           32  +.\" .VS ?version? ?br?
           33  +.\"	Begin vertical sidebar, for use in marking newly-changed parts
           34  +.\"	of man pages.  The first argument is ignored and used for recording
           35  +.\"	the version when the .VS was added, so that the sidebars can be
           36  +.\"	found and removed when they reach a certain age.  If another argument
           37  +.\"	is present, then a line break is forced before starting the sidebar.
           38  +.\"
           39  +.\" .VE
           40  +.\"	End of vertical sidebar.
           41  +.\"
           42  +.\" .DS
           43  +.\"	Begin an indented unfilled display.
           44  +.\"
           45  +.\" .DE
           46  +.\"	End of indented unfilled display.
           47  +.\"
           48  +.\" .SO ?manpage?
           49  +.\"	Start of list of standard options for a Tk widget. The manpage
           50  +.\"	argument defines where to look up the standard options; if
           51  +.\"	omitted, defaults to "options". The options follow on successive
           52  +.\"	lines, in three columns separated by tabs.
           53  +.\"
           54  +.\" .SE
           55  +.\"	End of list of standard options for a Tk widget.
           56  +.\"
           57  +.\" .OP cmdName dbName dbClass
           58  +.\"	Start of description of a specific option.  cmdName gives the
           59  +.\"	option's name as specified in the class command, dbName gives
           60  +.\"	the option's name in the option database, and dbClass gives
           61  +.\"	the option's class in the option database.
           62  +.\"
           63  +.\" .UL arg1 arg2
           64  +.\"	Print arg1 underlined, then print arg2 normally.
           65  +.\"
           66  +.\" .QW arg1 ?arg2?
           67  +.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
           68  +.\"
           69  +.\" .PQ arg1 ?arg2?
           70  +.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
           71  +.\"	(for trailing punctuation) and then a closing parenthesis.
           72  +.\"
           73  +.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
           74  +.if t .wh -1.3i ^B
           75  +.nr ^l \n(.l
           76  +.ad b
           77  +.\"	# Start an argument description
           78  +.de AP
           79  +.ie !"\\$4"" .TP \\$4
           80  +.el \{\
           81  +.   ie !"\\$2"" .TP \\n()Cu
           82  +.   el          .TP 15
           83  +.\}
           84  +.ta \\n()Au \\n()Bu
           85  +.ie !"\\$3"" \{\
           86  +\&\\$1 \\fI\\$2\\fP (\\$3)
           87  +.\".b
           88  +.\}
           89  +.el \{\
           90  +.br
           91  +.ie !"\\$2"" \{\
           92  +\&\\$1	\\fI\\$2\\fP
           93  +.\}
           94  +.el \{\
           95  +\&\\fI\\$1\\fP
           96  +.\}
           97  +.\}
           98  +..
           99  +.\"	# define tabbing values for .AP
          100  +.de AS
          101  +.nr )A 10n
          102  +.if !"\\$1"" .nr )A \\w'\\$1'u+3n
          103  +.nr )B \\n()Au+15n
          104  +.\"
          105  +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
          106  +.nr )C \\n()Bu+\\w'(in/out)'u+2n
          107  +..
          108  +.AS Tcl_Interp Tcl_CreateInterp in/out
          109  +.\"	# BS - start boxed text
          110  +.\"	# ^y = starting y location
          111  +.\"	# ^b = 1
          112  +.de BS
          113  +.br
          114  +.mk ^y
          115  +.nr ^b 1u
          116  +.if n .nf
          117  +.if n .ti 0
          118  +.if n \l'\\n(.lu\(ul'
          119  +.if n .fi
          120  +..
          121  +.\"	# BE - end boxed text (draw box now)
          122  +.de BE
          123  +.nf
          124  +.ti 0
          125  +.mk ^t
          126  +.ie n \l'\\n(^lu\(ul'
          127  +.el \{\
          128  +.\"	Draw four-sided box normally, but don't draw top of
          129  +.\"	box if the box started on an earlier page.
          130  +.ie !\\n(^b-1 \{\
          131  +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
          132  +.\}
          133  +.el \}\
          134  +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
          135  +.\}
          136  +.\}
          137  +.fi
          138  +.br
          139  +.nr ^b 0
          140  +..
          141  +.\"	# VS - start vertical sidebar
          142  +.\"	# ^Y = starting y location
          143  +.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
          144  +.de VS
          145  +.if !"\\$2"" .br
          146  +.mk ^Y
          147  +.ie n 'mc \s12\(br\s0
          148  +.el .nr ^v 1u
          149  +..
          150  +.\"	# VE - end of vertical sidebar
          151  +.de VE
          152  +.ie n 'mc
          153  +.el \{\
          154  +.ev 2
          155  +.nf
          156  +.ti 0
          157  +.mk ^t
          158  +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
          159  +.sp -1
          160  +.fi
          161  +.ev
          162  +.\}
          163  +.nr ^v 0
          164  +..
          165  +.\"	# Special macro to handle page bottom:  finish off current
          166  +.\"	# box/sidebar if in box/sidebar mode, then invoked standard
          167  +.\"	# page bottom macro.
          168  +.de ^B
          169  +.ev 2
          170  +'ti 0
          171  +'nf
          172  +.mk ^t
          173  +.if \\n(^b \{\
          174  +.\"	Draw three-sided box if this is the box's first page,
          175  +.\"	draw two sides but no top otherwise.
          176  +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
          177  +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
          178  +.\}
          179  +.if \\n(^v \{\
          180  +.nr ^x \\n(^tu+1v-\\n(^Yu
          181  +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
          182  +.\}
          183  +.bp
          184  +'fi
          185  +.ev
          186  +.if \\n(^b \{\
          187  +.mk ^y
          188  +.nr ^b 2
          189  +.\}
          190  +.if \\n(^v \{\
          191  +.mk ^Y
          192  +.\}
          193  +..
          194  +.\"	# DS - begin display
          195  +.de DS
          196  +.RS
          197  +.nf
          198  +.sp
          199  +..
          200  +.\"	# DE - end display
          201  +.de DE
          202  +.fi
          203  +.RE
          204  +.sp
          205  +..
          206  +.\"	# SO - start of list of standard options
          207  +.de SO
          208  +'ie '\\$1'' .ds So \\fBoptions\\fR
          209  +'el .ds So \\fB\\$1\\fR
          210  +.SH "STANDARD OPTIONS"
          211  +.LP
          212  +.nf
          213  +.ta 5.5c 11c
          214  +.ft B
          215  +..
          216  +.\"	# SE - end of list of standard options
          217  +.de SE
          218  +.fi
          219  +.ft R
          220  +.LP
          221  +See the \\*(So manual entry for details on the standard options.
          222  +..
          223  +.\"	# OP - start of full description for a single option
          224  +.de OP
          225  +.LP
          226  +.nf
          227  +.ta 4c
          228  +Command-Line Name:	\\fB\\$1\\fR
          229  +Database Name:	\\fB\\$2\\fR
          230  +Database Class:	\\fB\\$3\\fR
          231  +.fi
          232  +.IP
          233  +..
          234  +.\"	# CS - begin code excerpt
          235  +.de CS
          236  +.RS
          237  +.nf
          238  +.ta .25i .5i .75i 1i
          239  +..
          240  +.\"	# CE - end code excerpt
          241  +.de CE
          242  +.fi
          243  +.RE
          244  +..
          245  +.\"	# UL - underline word
          246  +.de UL
          247  +\\$1\l'|0\(ul'\\$2
          248  +..
          249  +.\"	# QW - apply quotation marks to word
          250  +.de QW
          251  +.ie '\\*(lq'"' ``\\$1''\\$2
          252  +.\"" fix emacs highlighting
          253  +.el \\*(lq\\$1\\*(rq\\$2
          254  +..
          255  +.\"	# PQ - apply parens and quotation marks to word
          256  +.de PQ
          257  +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
          258  +.\"" fix emacs highlighting
          259  +.el (\\*(lq\\$1\\*(rq\\$2)\\$3
          260  +..
          261  +.\"	# QR - quoted range
          262  +.de QR
          263  +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
          264  +.\"" fix emacs highlighting
          265  +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
          266  +..
          267  +.\"	# MT - "empty" string
          268  +.de MT
          269  +.QW ""
          270  +..
          271  +.BS
          272  +.SH INDEX
          273  +Test
          274  +.RS
          275  +dolores
          276  +.RS
          277  +.TP
          278  +\fBlorem\fR
          279  +ipsum
          280  +.TP
          281  +\fBdolores\fR
          282  +lorem
          283  +.TP
          284  +\fBipsum\fR
          285  +dolores
          286  +.RE
          287  +lorem
          288  +.RS
          289  +.TP
          290  +\fBipsum\fR
          291  +dolores
          292  +.TP
          293  +\fBlorem\fR
          294  +ipsum
          295  +.RE
          296  +.RE

Added modules/doctools/tests/idx/null/00.


Added modules/doctools/tests/idx/null/01.


Added modules/doctools/tests/idx/null/02.


Added modules/doctools/tests/idx/text/00.

            1  +
            2  +Index generated by tcllib/doctools/idx with format 'text'
            3  +KWIC -- Test
            4  +============

Added modules/doctools/tests/idx/text/01.

            1  +
            2  +Index generated by tcllib/doctools/idx with format 'text'
            3  +KWIC -- Test
            4  +============
            5  +
            6  +lorem ipsum

Added modules/doctools/tests/idx/text/02.

            1  +
            2  +Index generated by tcllib/doctools/idx with format 'text'
            3  +KWIC -- Test
            4  +============
            5  +
            6  +dolores lorem, dolores, ipsum
            7  +
            8  +lorem   ipsum, lorem

Added modules/doctools/tests/idx/wiki/00.

            1  +Index '''KWIC'''
            2  +'''Test'''
            3  +

Added modules/doctools/tests/idx/wiki/01.

            1  +Index '''KWIC'''
            2  +'''Test'''
            3  +
            4  +   '''lorem''':   ipsum

Added modules/doctools/tests/idx/wiki/02.

            1  +Index '''KWIC'''
            2  +'''Test'''
            3  +
            4  +   '''lorem''':   ipsum lorem
            5  +   '''dolores''':   lorem dolores ipsum

Changes to modules/doctools/tests/latex/00.

     1      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     2      2   % Copyright (c) .COPYRIGHT.
     3         -% CVS: @ID@ TEST.z
            3  +% TEST.z
     4      4   \documentclass{article}
     5      5   \begin{document}
     6      6   \author{@USR@}
     7      7   \title{.MODULE. / TEST --  : }
     8      8   \maketitle
     9      9   \section{Description}\label{section1}
    10     10   \section{Copyright}\label{copyright}
    11     11   \begin{flushleft}
    12     12   Copyright (c) .COPYRIGHT.\linebreak
    13     13   \end{flushleft}
    14     14   \end{document}

Changes to modules/doctools/tests/latex/01.

     1      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     2      2   % Copyright (c) **Copyright**
     3         -% CVS: @ID@ TEST.z
            3  +% TEST.z
     4      4   \documentclass{article}
     5      5   \begin{document}
     6      6   \author{@USR@}
     7      7   \title{.MODULE. / TEST --  : }
     8      8   \maketitle
     9      9   \section{Description}\label{section1}
    10     10   Argument	::\underline{Argument}::

Changes to modules/doctools/tests/latex/02.

     1      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     2      2   % Copyright (c) .COPYRIGHT.
     3         -% CVS: @ID@ TEST.z
            3  +% TEST.z
     4      4   \documentclass{article}
     5      5   \begin{document}
     6      6   \author{@USR@}
     7      7   \title{.MODULE. / TEST -- ..THE\_MODULE.. : ..THE\_TITLE..}
     8      8   \maketitle
     9      9   \section{Synopsis}\label{synopsis}
    10     10   \begin{flushleft}

Changes to modules/doctools/tests/latex/03.

     1      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     2      2   % Copyright (c) .COPYRIGHT.
     3         -% CVS: @ID@ TEST.z
            3  +% TEST.z
     4      4   \documentclass{article}
     5      5   \begin{document}
     6      6   \author{@USR@}
     7      7   \title{.MODULE. / TEST --  : }
     8      8   \maketitle
     9      9   \section{Description}\label{section1}
    10     10   \section{AaA}\label{section2}
................................................................................
    13     13   22
    14     14   \subsection{BbB.cCc}\label{subsection1}
    15     15   333
    16     16   \subsection{BbB.dDd}\label{subsection2}
    17     17   4444
    18     18   \section{EeE}\label{section4}
    19     19   5555
           20  +
    20     21   At {\bf AaA (\ref{section2})}.
           22  +
    21     23   At {\bf \_\_undefined\_\_ (\ref{\_\_undefined\_\_})}.
    22     24   \section{Copyright}\label{copyright}
    23     25   \begin{flushleft}
    24     26   Copyright (c) .COPYRIGHT.\linebreak
    25     27   \end{flushleft}
    26     28   \end{document}

Changes to modules/doctools/tests/latex/04.

     1      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     2      2   % Copyright (c) .COPYRIGHT.
     3         -% CVS: @ID@ TEST.z
            3  +% TEST.z
     4      4   \documentclass{article}
     5      5   \begin{document}
     6      6   \author{@USR@}
     7      7   \title{.MODULE. / TEST --  : }
     8      8   \maketitle
     9      9   \section{Description}\label{section1}
    10     10   BEGINNE HIER
    11     11   \begin{verbatim}
    12     12   	 Example Block  More Lines
    13     13   \end{verbatim}
           14  +
    14     15   \begin{verbatim}
    15     16   Inlined Example \
    16     17   Next Line
    17     18   \end{verbatim}
    18     19   FERTIG
    19     20   \section{Copyright}\label{copyright}
    20     21   \begin{flushleft}
    21     22   Copyright (c) .COPYRIGHT.\linebreak
    22     23   \end{flushleft}
    23     24   \end{document}

Changes to modules/doctools/tests/latex/05.

     1         -
     2      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     3      2   % Copyright (c) .COPYRIGHT.
     4         -% CVS: @ID@ BASIC.a
            3  +% BASIC.a
     5      4   \documentclass{article}
     6      5   \begin{document}
     7      6   \author{@USR@}
     8      7   \title{.MODULE. / BASIC --  : }
     9      8   \maketitle
    10      9   \section{Synopsis}\label{synopsis}
    11     10   \begin{itemize}
    12         -\item[] a-command 
           11  +\item[] a-command
    13     12   \end{itemize}
    14     13   \section{Description}\label{section1}
    15     14   OK
           15  +
    16     16   \begin{itemize}
    17     17   %
    18     18   \item[] \underline{argument-1} integer
    19     19   %
    20     20   verification
    21     21   %
    22     22   \item[] \underline{argument-2} string (out)
    23     23   %
    24     24    mogrification
    25     25   \end{itemize}
           26  +
    26     27   \begin{itemize}
    27     28   %
    28     29   \item[] {\bf command-a}
    29     30   %
    30     31    explanation
    31     32   %
    32     33   \item[] {\bf command-b}
    33     34   %
    34     35   elucidation
    35     36   \end{itemize}
           37  +
    36     38   \begin{itemize}
    37     39   %
    38     40   \item[] term
    39     41   %
    40     42    definition
    41     43   %
    42         -\item[] a-command 
           44  +\item[] a-command
    43     45   %
    44     46   semantic
    45     47   \end{itemize}
           48  +
    46     49   \begin{enumerate}
    47     50   %
    48     51   \item
    49     52   %
    50     53   A
    51     54   %
    52     55   \item
    53     56   %
    54     57    B
           58  +
    55     59   C
           60  +
    56     61   D
    57     62   \end{enumerate}
           63  +
    58     64   \begin{itemize}
    59     65   %
    60     66   \item
    61     67   %
    62     68   1
    63     69   %
    64     70   \item
    65     71   %
    66     72    2
           73  +
    67     74   2a
           75  +
    68     76   2b
    69     77   \end{itemize}
           78  +
    70     79   \begin{itemize}
    71     80   %
    72     81   \item[] {\bf option-1}
    73     82   %
    74     83    meaning
    75     84   %
    76     85   \item[] {\bf option-2} value
    77     86   %
    78     87   elaboration
    79     88   \end{itemize}
           89  +
    80     90   \begin{itemize}
    81     91   %
    82     92   \item[] Command-Line Switch:	{\bf background}\\
    83     93   Database Name:	{\bf Background}\\
    84     94   Database Class:	{\bf Color}\\
    85     95   %
    86     96    candy
................................................................................
    87     97   %
    88     98   \item[] Command-Line Switch:	{\bf foreground}\\
    89     99   Database Name:	{\bf Foreground}\\
    90    100   Database Class:	{\bf Color}\\
    91    101   %
    92    102   caramel
    93    103   \end{itemize}
          104  +
    94    105   KO
    95    106   \section{Copyright}\label{copyright}
    96    107   \begin{flushleft}
    97    108   Copyright (c) .COPYRIGHT.\linebreak
    98    109   \end{flushleft}
    99    110   \end{document}

Changes to modules/doctools/tests/latex/06.

     1      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     2      2   % Copyright (c) .COPYRIGHT.
     3         -% CVS: @ID@ TEST.z
            3  +% TEST.z
     4      4   \documentclass{article}
     5      5   \begin{document}
     6      6   \author{@USR@}
     7      7   \title{.MODULE. / TEST --  : }
     8      8   \maketitle
     9      9   \section{Description}\label{section1}
    10     10   \begin{itemize}
    11     11   %
    12     12   \item
    13     13   %
    14         - 1  2  3
           14  + 1
           15  +
           16  +2
           17  +
           18  +3
    15     19   %
    16     20   \item
    17     21   %
    18     22   \begin{enumerate}
    19     23   %
    20     24   \item
    21     25   %
    22         - a  b  c
           26  + a
           27  +
           28  +b
           29  +
           30  +c
    23     31   %
    24     32   \item
    25     33   %
    26     34   \begin{itemize}
    27     35   %
    28     36   \item[] foo
    29     37   %
................................................................................
    36     44   \item[] roo
    37     45   %
    38     46    gork
    39     47   \end{itemize}
    40     48   %
    41     49   \item
    42     50   %
    43         - a  b  c
           51  + a
           52  +
           53  +b
           54  +
           55  +c
    44     56   \end{enumerate}
    45     57   %
    46     58   \item
    47     59   %
    48         - 4  5  6
           60  + 4
           61  +
           62  +5
           63  +
           64  +6
    49     65   \end{itemize}
    50     66   \section{Copyright}\label{copyright}
    51     67   \begin{flushleft}
    52     68   Copyright (c) .COPYRIGHT.\linebreak
    53     69   \end{flushleft}
    54     70   \end{document}

Changes to modules/doctools/tests/latex/07.

     1      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     2      2   % Copyright (c) .COPYRIGHT.
     3         -% CVS: @ID@ TEST.z
            3  +% TEST.z
     4      4   \documentclass{article}
     5      5   \begin{document}
     6      6   \author{@USR@}
     7      7   \title{.MODULE. / TEST --  : }
     8      8   \maketitle
     9      9   \section{Description}\label{section1}
    10     10   \begin{itemize}

Changes to modules/doctools/tests/latex/08.

     1         -
     2      1   % Generated from file '.FILE.' by tcllib/doctools with format 'latex'
     3      2   % Copyright (c) **Copyright**
     4         -% CVS: @ID@ ALL.a
            3  +% ALL.a
     5      4   \documentclass{article}
     6      5   \begin{document}
     7      6   \author{@USR@}
     8      7   \title{.MODULE. / ALL -- ..THE\_MODULE.. : ..THE\_TITLE..}
     9      8   \maketitle
    10      9   \section{Synopsis}\label{synopsis}
    11     10   \begin{flushleft}

Added modules/doctools/tests/latex/09.

            1  +% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
            2  +% Copyright (c) .COPYRIGHT.
            3  +% TEST.z
            4  +\documentclass{article}
            5  +\begin{document}
            6  +\author{aku}
            7  +\title{.MODULE. / TEST --  : }
            8  +\maketitle
            9  +\section{Description}\label{section1}
           10  +lorem
           11  +\begin{verbatim}
           12  +1 lorem ipsum dolores
           13  +\end{verbatim}
           14  +ipsum
           15  +\begin{verbatim} 2 lorem ipsum dolores \end{verbatim}
           16  +dolores
           17  +\begin{verbatim}
           18  +3 lorem ipsum dolores
           19  +\end{verbatim}
           20  +lorem
           21  +\begin{verbatim} 4 lorem ipsum dolores
           22  +\end{verbatim}
           23  +ipsum
           24  +\begin{verbatim}
           25  +5 lorem ipsum dolores \end{verbatim}
           26  +dolores
           27  +\section{Copyright}\label{copyright}
           28  +\begin{flushleft}
           29  +Copyright (c) .COPYRIGHT.\linebreak
           30  +\end{flushleft}
           31  +\end{document}

Added modules/doctools/tests/latex/10.

            1  +% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
            2  +% Copyright (c) .COPYRIGHT.
            3  +% test-itemized.1
            4  +\documentclass{article}
            5  +\begin{document}
            6  +\author{aku}
            7  +\title{.MODULE. / test-itemized --  : }
            8  +\maketitle
            9  +\section{Description}\label{section1}
           10  +lorem ipsum dolores
           11  +\begin{itemize}
           12  +%
           13  +\item
           14  +%
           15  + lorem ipsum dolores
           16  +%
           17  +\item
           18  +%
           19  + lorem ipsum dolores
           20  +
           21  +lorem ipsum dolores
           22  +%
           23  +\item
           24  +%
           25  + lorem ipsum dolores
           26  +
           27  +lorem ipsum dolores
           28  +
           29  +lorem ipsum dolores
           30  +\end{itemize}
           31  +\section{Copyright}\label{copyright}
           32  +\begin{flushleft}
           33  +Copyright (c) .COPYRIGHT.\linebreak
           34  +\end{flushleft}
           35  +\end{document}

Added modules/doctools/tests/latex/11.

            1  +% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
            2  +% Copyright (c) .COPYRIGHT.
            3  +% test-enumerated.1
            4  +\documentclass{article}
            5  +\begin{document}
            6  +\author{aku}
            7  +\title{.MODULE. / test-enumerated --  : }
            8  +\maketitle
            9  +\section{Description}\label{section1}
           10  +lorem ipsum dolores
           11  +\begin{enumerate}
           12  +%
           13  +\item
           14  +%
           15  + lorem ipsum dolores
           16  +%
           17  +\item
           18  +%
           19  + lorem ipsum dolores
           20  +
           21  +lorem ipsum dolores
           22  +%
           23  +\item
           24  +%
           25  + lorem ipsum dolores
           26  +
           27  +lorem ipsum dolores
           28  +
           29  +lorem ipsum dolores
           30  +\end{enumerate}
           31  +\section{Copyright}\label{copyright}
           32  +\begin{flushleft}
           33  +Copyright (c) .COPYRIGHT.\linebreak
           34  +\end{flushleft}
           35  +\end{document}

Added modules/doctools/tests/latex/12.

            1  +% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
            2  +% Copyright (c) .COPYRIGHT.
            3  +% test-definitions.1
            4  +\documentclass{article}
            5  +\begin{document}
            6  +\author{aku}
            7  +\title{.MODULE. / test-definitions --  : }
            8  +\maketitle
            9  +\section{Description}\label{section1}
           10  +lorem ipsum dolores
           11  +\begin{itemize}
           12  +%
           13  +\item[] lorem
           14  +%
           15  + ipsum dolores
           16  +%
           17  +\item[] lorem
           18  +%
           19  + ipsum dolores
           20  +
           21  +lorem ipsum dolores
           22  +%
           23  +\item[] lorem
           24  +%
           25  + ipsum dolores
           26  +
           27  +lorem ipsum dolores
           28  +
           29  +lorem ipsum dolores
           30  +\end{itemize}
           31  +\section{Copyright}\label{copyright}
           32  +\begin{flushleft}
           33  +Copyright (c) .COPYRIGHT.\linebreak
           34  +\end{flushleft}
           35  +\end{document}

Added modules/doctools/tests/latex/13.

            1  +% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
            2  +% Copyright (c) .COPYRIGHT.
            3  +% test-itemized-examples.1
            4  +\documentclass{article}
            5  +\begin{document}
            6  +\author{aku}
            7  +\title{.MODULE. / test-itemized-examples --  : }
            8  +\maketitle
            9  +\section{Description}\label{section1}
           10  +lorem ipsum dolores
           11  +\begin{itemize}
           12  +%
           13  +\item
           14  +%
           15  +\begin{verbatim} A lorem ipsum dolores \end{verbatim}
           16  +%
           17  +\item
           18  +%
           19  + lorem ipsum dolores
           20  +\begin{verbatim} B lorem ipsum dolores \end{verbatim}
           21  +lorem ipsum dolores
           22  +%
           23  +\item
           24  +%
           25  + lorem ipsum dolores
           26  +\begin{verbatim} C lorem ipsum dolores \end{verbatim}
           27  +%
           28  +\item
           29  +%
           30  + lorem ipsum dolores
           31  +\end{itemize}
           32  +\section{Copyright}\label{copyright}
           33  +\begin{flushleft}
           34  +Copyright (c) .COPYRIGHT.\linebreak
           35  +\end{flushleft}
           36  +\end{document}

Added modules/doctools/tests/latex/14.

            1  +% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
            2  +% Copyright (c) .COPYRIGHT.
            3  +% test-enumerated-examples.1
            4  +\documentclass{article}
            5  +\begin{document}
            6  +\author{aku}
            7  +\title{.MODULE. / test-enumerated-examples --  : }
            8  +\maketitle
            9  +\section{Description}\label{section1}
           10  +lorem ipsum dolores
           11  +\begin{enumerate}
           12  +%
           13  +\item
           14  +%
           15  +\begin{verbatim} A1 lorem ipsum dolores \end{verbatim}
           16  +%
           17  +\item
           18  +%
           19  + lorem ipsum dolores
           20  +\begin{verbatim} B2 lorem ipsum dolores \end{verbatim}
           21  +lorem ipsum dolores
           22  +%
           23  +\item
           24  +%
           25  + lorem ipsum dolores
           26  +\begin{verbatim} C3 lorem ipsum dolores \end{verbatim}
           27  +%
           28  +\item
           29  +%
           30  + lorem ipsum dolores
           31  +\end{enumerate}
           32  +\section{Copyright}\label{copyright}
           33  +\begin{flushleft}
           34  +Copyright (c) .COPYRIGHT.\linebreak
           35  +\end{flushleft}
           36  +\end{document}

Added modules/doctools/tests/latex/15.

            1  +% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
            2  +% Copyright (c) .COPYRIGHT.
            3  +% test-definition-examples.1
            4  +\documentclass{article}
            5  +\begin{document}
            6  +\author{aku}
            7  +\title{.MODULE. / test-definition-examples --  : }
            8  +\maketitle
            9  +\section{Description}\label{section1}
           10  +lorem ipsum dolores
           11  +\begin{itemize}
           12  +%
           13  +\item[] lorem
           14  +%
           15  +\begin{verbatim} A1 lorem ipsum dolores \end{verbatim}
           16  +%
           17  +\item[] lorem
           18  +%
           19  + ipsum dolores
           20  +\begin{verbatim} B2 lorem ipsum dolores \end{verbatim}
           21  +lorem ipsum dolores
           22  +%
           23  +\item[] lorem
           24  +%
           25  + ipsum dolores
           26  +\begin{verbatim} C3 lorem ipsum dolores \end{verbatim}
           27  +%
           28  +\item[] lorem
           29  +%
           30  + ipsum dolores
           31  +\end{itemize}
           32  +\section{Copyright}\label{copyright}
           33  +\begin{flushleft}
           34  +Copyright (c) .COPYRIGHT.\linebreak
           35  +\end{flushleft}
           36  +\end{document}

Added modules/doctools/tests/list/09.

            1  +manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/10.

            1  +manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-itemized shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/11.

            1  +manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-enumerated shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/12.

            1  +manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-definitions shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/13.

            1  +manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-itemized-examples shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/14.

            1  +manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-enumerated-examples shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/15.

            1  +manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-definition-examples shortdesc {} desc {} fid .FILE}

Changes to modules/doctools/tests/man/00.

            1  +[comment { -- Basic structure }]
     1      2   [manpage_begin TEST z 3.14.15.926]
     2      3   [description]
     3      4   [manpage_end]

Changes to modules/doctools/tests/man/01.

            1  +[comment { -- Inline markup }]
     1      2   [manpage_begin TEST z 3.14.15.926]
     2      3   [copyright **Copyright**]
     3      4   [description]
     4      5   Argument	::[arg Argument]::
     5      6   Class		::[class Class]::
     6      7   Command		::[cmd Command]::
     7      8   Comment		::[comment Comment]::

Changes to modules/doctools/tests/man/02.

            1  +[comment { -- Meta markup }]
     1      2   [manpage_begin TEST z 3.14.15.926]
     2      3   [moddesc ..THE_MODULE..]
     3      4   [titledesc ..THE_TITLE..]
     4      5   [require AAA]
     5      6   [require BBB VVV]
     6      7   [keywords KEYA KEYZ]
     7      8   [see_also OTHER ELSE]
     8      9   [description]
     9     10   [manpage_end]

Changes to modules/doctools/tests/man/03.

            1  +[comment { -- Sectioning }]
     1      2   [manpage_begin TEST z 3.14.15.926]
     2      3   [description]
     3      4   [section AaA]
     4      5   1
     5      6   [section BbB]
     6      7   22
     7      8   [subsection BbB.cCc]

Changes to modules/doctools/tests/man/04.

            1  +[comment { -- Example 1 }]
     1      2   [manpage_begin TEST z 3.14.15.926]
     2      3   [description]
     3      4   BEGINNE HIER
     4      5   [example {
     5      6   	 Example Block \
     6      7   	 More Lines
     7      8   }]
................................................................................
     9     10   [para]
    10     11   [example_begin]
    11     12   Inlined Example \
    12     13   Next Line
    13     14   [example_end]
    14     15   FERTIG
    15     16   [manpage_end]
    16         -

Changes to modules/doctools/tests/man/05.

     1         -[comment {LISTS, BASIC}]
            1  +[comment { -- Lists 1 }]
     2      2   [manpage_begin BASIC a 5]
     3      3   [description]
     4      4   OK
     5      5   [para]
     6      6   [list_begin arguments]
     7      7   [arg_def integer argument-1]
     8      8   verification

Changes to modules/doctools/tests/man/06.

            1  +[comment { -- Lists 2 }]
     1      2   [manpage_begin TEST z 3.14.15.926]
     2      3   [description]
     3      4   [comment {
     4      5       nested lists, same and different types, examples have examples at
     5      6       least three levels deep, for a proper inner level, i.e. not only
     6      7       first/last level, but something truly in the middle. Also three
     7      8       list items of the relevant on each level, see the proper handling

Added modules/doctools/tests/man/09.

            1  +[comment { -- Example 2 }]
            2  +[manpage_begin TEST z 3.14.15.926]
            3  +[description]
            4  +lorem
            5  +[example {
            6  +1 lorem ipsum dolores
            7  +}]
            8  +ipsum
            9  +[example { 2 lorem ipsum dolores }]
           10  +dolores
           11  +[example_begin]
           12  +3 lorem ipsum dolores
           13  +[example_end]
           14  +lorem
           15  +[example { 4 lorem ipsum dolores
           16  +}]
           17  +ipsum
           18  +[example {
           19  +5 lorem ipsum dolores }]
           20  +dolores
           21  +[manpage_end]
           22  +

Added modules/doctools/tests/man/10.

            1  +[comment { -- List 3 - itemized }]
            2  +[manpage_begin test-itemized 1 n]
            3  +[description]
            4  +lorem ipsum dolores
            5  +[list_begin itemized]
            6  +[item] lorem ipsum dolores
            7  +[item] lorem ipsum dolores
            8  +[para] lorem ipsum dolores
            9  +[item] lorem ipsum dolores
           10  +[para] lorem ipsum dolores
           11  +[para] lorem ipsum dolores
           12  +[list_end]
           13  +[manpage_end]

Added modules/doctools/tests/man/11.

            1  +[comment { -- List 4 - enumerated }]
            2  +[manpage_begin test-enumerated 1 n]
            3  +[description]
            4  +lorem ipsum dolores
            5  +[list_begin enumerated]
            6  +[enum] lorem ipsum dolores
            7  +[enum] lorem ipsum dolores
            8  +[para] lorem ipsum dolores
            9  +[enum] lorem ipsum dolores
           10  +[para] lorem ipsum dolores
           11  +[para] lorem ipsum dolores
           12  +[list_end]
           13  +[manpage_end]

Added modules/doctools/tests/man/12.

            1  +[comment { -- List 5 - definitions }]
            2  +[manpage_begin test-definitions 1 n]
            3  +[description]
            4  +lorem ipsum dolores
            5  +[list_begin definitions]
            6  +[def lorem] ipsum dolores
            7  +[def lorem] ipsum dolores
            8  +[para] lorem ipsum dolores
            9  +[def lorem] ipsum dolores
           10  +[para] lorem ipsum dolores
           11  +[para] lorem ipsum dolores
           12  +[list_end]
           13  +[manpage_end]

Added modules/doctools/tests/man/13.

            1  +[comment { -- List 6 - itemized examples }]
            2  +[manpage_begin test-itemized-examples 1 n]
            3  +[description]
            4  +lorem ipsum dolores
            5  +[list_begin itemized]
            6  +[item]
            7  +[example { A lorem ipsum dolores }]
            8  +[item] lorem ipsum dolores
            9  +[example { B lorem ipsum dolores }]
           10  +lorem ipsum dolores
           11  +[item] lorem ipsum dolores
           12  +[example { C lorem ipsum dolores }]
           13  +[item] lorem ipsum dolores
           14  +[list_end]
           15  +[manpage_end]

Added modules/doctools/tests/man/14.

            1  +[comment { -- List 7 - enumerated examples }]
            2  +[manpage_begin test-enumerated-examples 1 n]
            3  +[description]
            4  +lorem ipsum dolores
            5  +[list_begin enumerated]
            6  +[enum]
            7  +[example { A1 lorem ipsum dolores }]
            8  +[enum] lorem ipsum dolores
            9  +[example { B2 lorem ipsum dolores }]
           10  +lorem ipsum dolores
           11  +[enum] lorem ipsum dolores
           12  +[example { C3 lorem ipsum dolores }]
           13  +[enum] lorem ipsum dolores
           14  +[list_end]
           15  +[manpage_end]

Added modules/doctools/tests/man/15.

            1  +[comment { -- List 8 - definition examples }]
            2  +[manpage_begin test-definition-examples 1 n]
            3  +[description]
            4  +lorem ipsum dolores
            5  +[list_begin definitions]
            6  +[def lorem]
            7  +[example { A1 lorem ipsum dolores }]
            8  +[def lorem] ipsum dolores
            9  +[example { B2 lorem ipsum dolores }]
           10  +lorem ipsum dolores
           11  +[def lorem] ipsum dolores
           12  +[example { C3 lorem ipsum dolores }]
           13  +[def lorem] ipsum dolores
           14  +[list_end]
           15  +[manpage_end]

Changes to modules/doctools/tests/nroff/00.


Changes to modules/doctools/tests/nroff/01.


Changes to modules/doctools/tests/nroff/02.


Changes to modules/doctools/tests/nroff/03.


Changes to modules/doctools/tests/nroff/04.


Changes to modules/doctools/tests/nroff/05.


Changes to modules/doctools/tests/nroff/06.


Changes to modules/doctools/tests/nroff/07.


Changes to modules/doctools/tests/nroff/08.


Added modules/doctools/tests/nroff/09.

            1  +'\"
            2  +'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
            3  +'\" Copyright (c) \&.COPYRIGHT\&.
            4  +'\"
            5  +.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
            6  +.so man.macros
            7  +.BS
            8  +.SH NAME
            9  +TEST \-
           10  +.SH DESCRIPTION
           11  +lorem
           12  +.CS
           13  +
           14  +
           15  +1 lorem ipsum dolores
           16  +
           17  +.CE
           18  +ipsum
           19  +.CS
           20  +
           21  + 2 lorem ipsum dolores
           22  +.CE
           23  +dolores
           24  +.CS
           25  +
           26  +
           27  +3 lorem ipsum dolores
           28  +
           29  +.CE
           30  +lorem
           31  +.CS
           32  +
           33  + 4 lorem ipsum dolores
           34  +
           35  +.CE
           36  +ipsum
           37  +.CS
           38  +
           39  +
           40  +5 lorem ipsum dolores
           41  +.CE
           42  +dolores
           43  +.SH COPYRIGHT
           44  +.nf
           45  +Copyright (c) \&.COPYRIGHT\&.
           46  +
           47  +.fi

Added modules/doctools/tests/nroff/10.

            1  +'\"
            2  +'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
            3  +'\" Copyright (c) \&.COPYRIGHT\&.
            4  +'\"
            5  +.TH "test-itemized" 1 n \&.MODULE\&. ""
            6  +.so man.macros
            7  +.BS
            8  +.SH NAME
            9  +test-itemized \-
           10  +.SH DESCRIPTION
           11  +lorem ipsum dolores
           12  +.IP \(bu
           13  +lorem ipsum dolores
           14  +.IP \(bu
           15  +lorem ipsum dolores
           16  +.sp
           17  +lorem ipsum dolores
           18  +.IP \(bu
           19  +lorem ipsum dolores
           20  +.sp
           21  +lorem ipsum dolores
           22  +.sp
           23  +lorem ipsum dolores
           24  +.PP
           25  +.SH COPYRIGHT
           26  +.nf
           27  +Copyright (c) \&.COPYRIGHT\&.
           28  +
           29  +.fi

Added modules/doctools/tests/nroff/11.

            1  +'\"
            2  +'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
            3  +'\" Copyright (c) \&.COPYRIGHT\&.
            4  +'\"
            5  +.TH "test-enumerated" 1 n \&.MODULE\&. ""
            6  +.so man.macros
            7  +.BS
            8  +.SH NAME
            9  +test-enumerated \-
           10  +.SH DESCRIPTION
           11  +lorem ipsum dolores
           12  +.IP [1]
           13  +lorem ipsum dolores
           14  +.IP [2]
           15  +lorem ipsum dolores
           16  +.sp
           17  +lorem ipsum dolores
           18  +.IP [3]
           19  +lorem ipsum dolores
           20  +.sp
           21  +lorem ipsum dolores
           22  +.sp
           23  +lorem ipsum dolores
           24  +.PP
           25  +.SH COPYRIGHT
           26  +.nf
           27  +Copyright (c) \&.COPYRIGHT\&.
           28  +
           29  +.fi

Added modules/doctools/tests/nroff/12.

            1  +'\"
            2  +'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
            3  +'\" Copyright (c) \&.COPYRIGHT\&.
            4  +'\"
            5  +.TH "test-definitions" 1 n \&.MODULE\&. ""
            6  +.so man.macros
            7  +.BS
            8  +.SH NAME
            9  +test-definitions \-
           10  +.SH DESCRIPTION
           11  +lorem ipsum dolores
           12  +.TP
           13  +lorem
           14  +ipsum dolores
           15  +.TP
           16  +lorem
           17  +ipsum dolores
           18  +.sp
           19  +lorem ipsum dolores
           20  +.TP
           21  +lorem
           22  +ipsum dolores
           23  +.sp
           24  +lorem ipsum dolores
           25  +.sp
           26  +lorem ipsum dolores
           27  +.PP
           28  +.SH COPYRIGHT
           29  +.nf
           30  +Copyright (c) \&.COPYRIGHT\&.
           31  +
           32  +.fi

Added modules/doctools/tests/nroff/13.

            1  +'\"
            2  +'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
            3  +'\" Copyright (c) \&.COPYRIGHT\&.
            4  +'\"
            5  +.TH "test-itemized-examples" 1 n \&.MODULE\&. ""
            6  +.so man.macros
            7  +.BS
            8  +.SH NAME
            9  +test-itemized-examples \-
           10  +.SH DESCRIPTION
           11  +lorem ipsum dolores
           12  +.IP \(bu
           13  +.CS
           14  +
           15  + A lorem ipsum dolores
           16  +.CE
           17  +.IP \(bu
           18  +lorem ipsum dolores
           19  +.CS
           20  +
           21  + B lorem ipsum dolores
           22  +.CE
           23  +.IP
           24  +lorem ipsum dolores
           25  +.IP \(bu
           26  +lorem ipsum dolores
           27  +.CS
           28  +
           29  + C lorem ipsum dolores
           30  +.CE
           31  +.IP \(bu
           32  +lorem ipsum dolores
           33  +.PP
           34  +.SH COPYRIGHT
           35  +.nf
           36  +Copyright (c) \&.COPYRIGHT\&.
           37  +
           38  +.fi

Added modules/doctools/tests/nroff/14.

            1  +'\"
            2  +'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
            3  +'\" Copyright (c) \&.COPYRIGHT\&.
            4  +'\"
            5  +.TH "test-enumerated-examples" 1 n \&.MODULE\&. ""
            6  +.so man.macros
            7  +.BS
            8  +.SH NAME
            9  +test-enumerated-examples \-
           10  +.SH DESCRIPTION
           11  +lorem ipsum dolores
           12  +.IP [1]
           13  +.CS
           14  +
           15  + A1 lorem ipsum dolores
           16  +.CE
           17  +.IP [2]
           18  +lorem ipsum dolores
           19  +.CS
           20  +
           21  + B2 lorem ipsum dolores
           22  +.CE
           23  +.IP
           24  +lorem ipsum dolores
           25  +.IP [3]
           26  +lorem ipsum dolores
           27  +.CS
           28  +
           29  + C3 lorem ipsum dolores
           30  +.CE
           31  +.IP [4]
           32  +lorem ipsum dolores
           33  +.PP
           34  +.SH COPYRIGHT
           35  +.nf
           36  +Copyright (c) \&.COPYRIGHT\&.
           37  +
           38  +.fi

Added modules/doctools/tests/nroff/15.

            1  +'\"
            2  +'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
            3  +'\" Copyright (c) \&.COPYRIGHT\&.
            4  +'\"
            5  +.TH "test-definition-examples" 1 n \&.MODULE\&. ""
            6  +.so man.macros
            7  +.BS
            8  +.SH NAME
            9  +test-definition-examples \-
           10  +.SH DESCRIPTION
           11  +lorem ipsum dolores
           12  +.TP
           13  +lorem
           14  +.CS
           15  +
           16  + A1 lorem ipsum dolores
           17  +.CE
           18  +.TP
           19  +lorem
           20  +ipsum dolores
           21  +.CS
           22  +
           23  + B2 lorem ipsum dolores
           24  +.CE
           25  +.IP
           26  +lorem ipsum dolores
           27  +.TP
           28  +lorem
           29  +ipsum dolores
           30  +.CS
           31  +
           32  + C3 lorem ipsum dolores
           33  +.CE
           34  +.TP
           35  +lorem
           36  +ipsum dolores
           37  +.PP
           38  +.SH COPYRIGHT
           39  +.nf
           40  +Copyright (c) \&.COPYRIGHT\&.
           41  +
           42  +.fi

Added modules/doctools/tests/null/09.


Added modules/doctools/tests/null/10.


Added modules/doctools/tests/null/11.


Added modules/doctools/tests/null/12.


Added modules/doctools/tests/null/13.


Added modules/doctools/tests/null/14.


Added modules/doctools/tests/null/15.


Changes to modules/doctools/tests/text/00.


Changes to modules/doctools/tests/text/01.


Changes to modules/doctools/tests/text/02.


Changes to modules/doctools/tests/text/03.


Changes to modules/doctools/tests/text/04.

     9      9   TEST -
    10     10   
    11     11   DESCRIPTION
    12     12   ===========
    13     13   
    14     14   BEGINNE HIER
    15     15   
    16         -
    17     16   | Example Block  More Lines
    18         -
    19     17   
    20     18   | Inlined Example \
    21     19   | Next Line
    22     20   
    23     21   FERTIG
    24     22   
    25     23   COPYRIGHT
    26     24   =========
    27     25   
    28     26   Copyright (c) .COPYRIGHT.

Changes to modules/doctools/tests/text/05.


Changes to modules/doctools/tests/text/06.


Changes to modules/doctools/tests/text/07.


Changes to modules/doctools/tests/text/08.

    78     78           TYPE NAME
    79     79   
    80     80               DESCRIPTION ::Option::
    81     81   
    82     82           TYPE NAME (MODE)
    83     83   
    84     84               DESCRIPTION ::?Optional?::
    85         -
    86     85   
    87     86               | THE ARGUMENT IS USED IN THIS
    88     87               | AND/OR THAT MANNER
    89     88   
    90     89       CMDNAME ...
    91     90   
    92     91           DESCRIPTION ::*Package*::

Added modules/doctools/tests/text/09.

            1  +
            2  +TEST - 
            3  +Generated from file '.FILE.' by tcllib/doctools with format 'text'
            4  +TEST(z) 3.14.15.926 .MODULE. ""
            5  +
            6  +NAME
            7  +====
            8  +
            9  +TEST -
           10  +
           11  +DESCRIPTION
           12  +===========
           13  +
           14  +lorem
           15  +
           16  +| 1 lorem ipsum dolores
           17  +
           18  +ipsum
           19  +
           20  +| 2 lorem ipsum dolores
           21  +
           22  +dolores
           23  +
           24  +| 3 lorem ipsum dolores
           25  +
           26  +lorem
           27  +
           28  +| 4 lorem ipsum dolores
           29  +
           30  +ipsum
           31  +
           32  +| 5 lorem ipsum dolores
           33  +
           34  +dolores
           35  +
           36  +COPYRIGHT
           37  +=========
           38  +
           39  +Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/10.

            1  +
            2  +test-itemized - 
            3  +Generated from file '.FILE.' by tcllib/doctools with format 'text'
            4  +test-itemized(1) n .MODULE. ""
            5  +
            6  +NAME
            7  +====
            8  +
            9  +test-itemized -
           10  +
           11  +DESCRIPTION
           12  +===========
           13  +
           14  +lorem ipsum dolores
           15  +
           16  +    *   lorem ipsum dolores
           17  +
           18  +    *   lorem ipsum dolores
           19  +
           20  +        lorem ipsum dolores
           21  +
           22  +    *   lorem ipsum dolores
           23  +
           24  +        lorem ipsum dolores
           25  +
           26  +        lorem ipsum dolores
           27  +
           28  +COPYRIGHT
           29  +=========
           30  +
           31  +Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/11.

            1  +
            2  +test-enumerated - 
            3  +Generated from file '.FILE.' by tcllib/doctools with format 'text'
            4  +test-enumerated(1) n .MODULE. ""
            5  +
            6  +NAME
            7  +====
            8  +
            9  +test-enumerated -
           10  +
           11  +DESCRIPTION
           12  +===========
           13  +
           14  +lorem ipsum dolores
           15  +
           16  +    [1] lorem ipsum dolores
           17  +
           18  +    [2] lorem ipsum dolores
           19  +
           20  +        lorem ipsum dolores
           21  +
           22  +    [3] lorem ipsum dolores
           23  +
           24  +        lorem ipsum dolores
           25  +
           26  +        lorem ipsum dolores
           27  +
           28  +COPYRIGHT
           29  +=========
           30  +
           31  +Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/12.

            1  +
            2  +test-definitions - 
            3  +Generated from file '.FILE.' by tcllib/doctools with format 'text'
            4  +test-definitions(1) n .MODULE. ""
            5  +
            6  +NAME
            7  +====
            8  +
            9  +test-definitions -
           10  +
           11  +DESCRIPTION
           12  +===========
           13  +
           14  +lorem ipsum dolores
           15  +
           16  +    lorem
           17  +
           18  +        ipsum dolores
           19  +
           20  +    lorem
           21  +
           22  +        ipsum dolores
           23  +
           24  +        lorem ipsum dolores
           25  +
           26  +    lorem
           27  +
           28  +        ipsum dolores
           29  +
           30  +        lorem ipsum dolores
           31  +
           32  +        lorem ipsum dolores
           33  +
           34  +COPYRIGHT
           35  +=========
           36  +
           37  +Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/13.

            1  +
            2  +test-itemized-examples - 
            3  +Generated from file '.FILE.' by tcllib/doctools with format 'text'
            4  +test-itemized-examples(1) n .MODULE. ""
            5  +
            6  +NAME
            7  +====
            8  +
            9  +test-itemized-examples -
           10  +
           11  +DESCRIPTION
           12  +===========
           13  +
           14  +lorem ipsum dolores
           15  +
           16  +    *   | A lorem ipsum dolores
           17  +
           18  +    *   lorem ipsum dolores
           19  +
           20  +        | B lorem ipsum dolores
           21  +
           22  +    *   lorem ipsum dolores
           23  +
           24  +    *   lorem ipsum dolores
           25  +
           26  +        | C lorem ipsum dolores
           27  +
           28  +    *   lorem ipsum dolores
           29  +
           30  +COPYRIGHT
           31  +=========
           32  +
           33  +Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/14.

            1  +
            2  +test-enumerated-examples - 
            3  +Generated from file '.FILE.' by tcllib/doctools with format 'text'
            4  +test-enumerated-examples(1) n .MODULE. ""
            5  +
            6  +NAME
            7  +====
            8  +
            9  +test-enumerated-examples -
           10  +
           11  +DESCRIPTION
           12  +===========
           13  +
           14  +lorem ipsum dolores
           15  +
           16  +    [1] | A1 lorem ipsum dolores
           17  +
           18  +    [2] lorem ipsum dolores
           19  +
           20  +        | B2 lorem ipsum dolores
           21  +
           22  +    [3] lorem ipsum dolores
           23  +
           24  +    [4] lorem ipsum dolores
           25  +
           26  +        | C3 lorem ipsum dolores
           27  +
           28  +    [5] lorem ipsum dolores
           29  +
           30  +COPYRIGHT
           31  +=========
           32  +
           33  +Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/15.

            1  +
            2  +test-definition-examples - 
            3  +Generated from file '.FILE.' by tcllib/doctools with format 'text'
            4  +test-definition-examples(1) n .MODULE. ""
            5  +
            6  +NAME
            7  +====
            8  +
            9  +test-definition-examples -
           10  +
           11  +DESCRIPTION
           12  +===========
           13  +
           14  +lorem ipsum dolores
           15  +
           16  +    lorem
           17  +
           18  +        | A1 lorem ipsum dolores
           19  +
           20  +    lorem
           21  +
           22  +        ipsum dolores
           23  +
           24  +        | B2 lorem ipsum dolores
           25  +
           26  +        lorem ipsum dolores
           27  +
           28  +    lorem
           29  +
           30  +        ipsum dolores
           31  +
           32  +        | C3 lorem ipsum dolores
           33  +
           34  +    lorem
           35  +
           36  +        ipsum dolores
           37  +
           38  +COPYRIGHT
           39  +=========
           40  +
           41  +Copyright (c) .COPYRIGHT.

Changes to modules/doctools/tests/tmml/03.

    42     42   At <emph>__undefined__</emph>.
    43     43   </p>
    44     44   </section>
    45     45   
    46     46   
    47     47   
    48     48   </manpage>
    49         -

Changes to modules/doctools/tests/tmml/04.

    30     30   </example>
    31     31   FERTIG
    32     32   </section>
    33     33   
    34     34   
    35     35   
    36     36   </manpage>
    37         -

Changes to modules/doctools/tests/tmml/05.

     1         -
     2      1   <!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
     3      2   <manpage id='.FILE' cat='cmd' title='BASIC' version='5' package='.MODULE.'>
     4      3   <head>
     5      4   <info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
     6      5   </head>
     7      6   <namesection>
     8      7   <name>BASIC</name>

Changes to modules/doctools/tests/tmml/08.

     1         -
     2      1   <!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
     3      2   <manpage id='.FILE' cat='cmd' title='ALL' version='5' package='.MODULE.'>
     4      3   <head>
     5      4   <info key='copyright' value='Copyright (c) **Copyright**'/>
     6      5   </head>
     7      6   <namesection>
     8      7   <name>ALL</name>

Added modules/doctools/tests/tmml/09.

            1  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
            2  +<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
            3  +<head>
            4  +<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
            5  +</head>
            6  +<namesection>
            7  +<name>TEST</name>
            8  +<desc></desc>
            9  +
           10  +</namesection>
           11  +
           12  +
           13  +<section id='section1'>
           14  +<title>DESCRIPTION</title>
           15  +lorem
           16  +
           17  +<example>
           18  +1 lorem ipsum dolores
           19  +
           20  +</example>
           21  +ipsum
           22  +
           23  +<example> 2 lorem ipsum dolores 
           24  +</example>
           25  +dolores
           26  +
           27  +<example>
           28  +3 lorem ipsum dolores
           29  +
           30  +</example>
           31  +lorem
           32  +
           33  +<example> 4 lorem ipsum dolores
           34  +
           35  +</example>
           36  +ipsum
           37  +
           38  +<example>
           39  +5 lorem ipsum dolores 
           40  +</example>
           41  +dolores
           42  +</section>
           43  +
           44  +
           45  +
           46  +</manpage>

Added modules/doctools/tests/tmml/10.

            1  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
            2  +<manpage id='.FILE' cat='cmd' title='test-itemized' version='n' package='.MODULE.'>
            3  +<head>
            4  +<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
            5  +</head>
            6  +<namesection>
            7  +<name>test-itemized</name>
            8  +<desc></desc>
            9  +
           10  +</namesection>
           11  +
           12  +
           13  +<section id='section1'>
           14  +<title>DESCRIPTION</title>
           15  +lorem ipsum dolores
           16  +
           17  +<ul>
           18  +
           19  +<li> lorem ipsum dolores
           20  +</li>
           21  +<li> lorem ipsum dolores
           22  +<br/> lorem ipsum dolores
           23  +</li>
           24  +<li> lorem ipsum dolores
           25  +<br/> lorem ipsum dolores
           26  +<br/> lorem ipsum dolores
           27  +</li>
           28  +
           29  +</ul>
           30  +</section>
           31  +
           32  +
           33  +
           34  +</manpage>

Added modules/doctools/tests/tmml/11.

            1  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
            2  +<manpage id='.FILE' cat='cmd' title='test-enumerated' version='n' package='.MODULE.'>
            3  +<head>
            4  +<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
            5  +</head>
            6  +<namesection>
            7  +<name>test-enumerated</name>
            8  +<desc></desc>
            9  +
           10  +</namesection>
           11  +
           12  +
           13  +<section id='section1'>
           14  +<title>DESCRIPTION</title>
           15  +lorem ipsum dolores
           16  +
           17  +<ol>
           18  +
           19  +<li> lorem ipsum dolores
           20  +</li>
           21  +<li> lorem ipsum dolores
           22  +<br/> lorem ipsum dolores
           23  +</li>
           24  +<li> lorem ipsum dolores
           25  +<br/> lorem ipsum dolores
           26  +<br/> lorem ipsum dolores
           27  +</li>
           28  +
           29  +</ol>
           30  +</section>
           31  +
           32  +
           33  +
           34  +</manpage>

Added modules/doctools/tests/tmml/12.

            1  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
            2  +<manpage id='.FILE' cat='cmd' title='test-definitions' version='n' package='.MODULE.'>
            3  +<head>
            4  +<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
            5  +</head>
            6  +<namesection>
            7  +<name>test-definitions</name>
            8  +<desc></desc>
            9  +
           10  +</namesection>
           11  +
           12  +
           13  +<section id='section1'>
           14  +<title>DESCRIPTION</title>
           15  +lorem ipsum dolores
           16  +
           17  +<dl>
           18  +
           19  +<dle>
           20  +<dt>lorem</dt>
           21  +<dd> ipsum dolores
           22  +</dd>
           23  +</dle>
           24  +<dle>
           25  +<dt>lorem</dt>
           26  +<dd> ipsum dolores
           27  +<br/> lorem ipsum dolores
           28  +</dd>
           29  +</dle>
           30  +<dle>
           31  +<dt>lorem</dt>
           32  +<dd> ipsum dolores
           33  +<br/> lorem ipsum dolores
           34  +<br/> lorem ipsum dolores
           35  +</dd>
           36  +</dle>
           37  +
           38  +</dl>
           39  +</section>
           40  +
           41  +
           42  +
           43  +</manpage>

Added modules/doctools/tests/tmml/13.

            1  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
            2  +<manpage id='.FILE' cat='cmd' title='test-itemized-examples' version='n' package='.MODULE.'>
            3  +<head>
            4  +<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
            5  +</head>
            6  +<namesection>
            7  +<name>test-itemized-examples</name>
            8  +<desc></desc>
            9  +
           10  +</namesection>
           11  +
           12  +
           13  +<section id='section1'>
           14  +<title>DESCRIPTION</title>
           15  +lorem ipsum dolores
           16  +
           17  +<ul>
           18  +
           19  +<li>
           20  +
           21  +<example> A lorem ipsum dolores 
           22  +</example>
           23  +</li>
           24  +<li> lorem ipsum dolores
           25  +
           26  +<example> B lorem ipsum dolores 
           27  +</example>
           28  +lorem ipsum dolores
           29  +</li>
           30  +<li> lorem ipsum dolores
           31  +
           32  +<example> C lorem ipsum dolores 
           33  +</example>
           34  +</li>
           35  +<li> lorem ipsum dolores
           36  +</li>
           37  +
           38  +</ul>
           39  +</section>
           40  +
           41  +
           42  +
           43  +</manpage>

Added modules/doctools/tests/tmml/14.

            1  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
            2  +<manpage id='.FILE' cat='cmd' title='test-enumerated-examples' version='n' package='.MODULE.'>
            3  +<head>
            4  +<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
            5  +</head>
            6  +<namesection>
            7  +<name>test-enumerated-examples</name>
            8  +<desc></desc>
            9  +
           10  +</namesection>
           11  +
           12  +
           13  +<section id='section1'>
           14  +<title>DESCRIPTION</title>
           15  +lorem ipsum dolores
           16  +
           17  +<ol>
           18  +
           19  +<li>
           20  +
           21  +<example> A1 lorem ipsum dolores 
           22  +</example>
           23  +</li>
           24  +<li> lorem ipsum dolores
           25  +
           26  +<example> B2 lorem ipsum dolores 
           27  +</example>
           28  +lorem ipsum dolores
           29  +</li>
           30  +<li> lorem ipsum dolores
           31  +
           32  +<example> C3 lorem ipsum dolores 
           33  +</example>
           34  +</li>
           35  +<li> lorem ipsum dolores
           36  +</li>
           37  +
           38  +</ol>
           39  +</section>
           40  +
           41  +
           42  +
           43  +</manpage>

Added modules/doctools/tests/tmml/15.

            1  +<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
            2  +<manpage id='.FILE' cat='cmd' title='test-definition-examples' version='n' package='.MODULE.'>
            3  +<head>
            4  +<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
            5  +</head>
            6  +<namesection>
            7  +<name>test-definition-examples</name>
            8  +<desc></desc>
            9  +
           10  +</namesection>
           11  +
           12  +
           13  +<section id='section1'>
           14  +<title>DESCRIPTION</title>
           15  +lorem ipsum dolores
           16  +
           17  +<dl>
           18  +
           19  +<dle>
           20  +<dt>lorem</dt>
           21  +<dd>
           22  +
           23  +<example> A1 lorem ipsum dolores 
           24  +</example>
           25  +</dd>
           26  +</dle>
           27  +<dle>
           28  +<dt>lorem</dt>
           29  +<dd> ipsum dolores
           30  +
           31  +<example> B2 lorem ipsum dolores 
           32  +</example>
           33  +lorem ipsum dolores
           34  +</dd>
           35  +</dle>
           36  +<dle>
           37  +<dt>lorem</dt>
           38  +<dd> ipsum dolores
           39  +
           40  +<example> C3 lorem ipsum dolores 
           41  +</example>
           42  +</dd>
           43  +</dle>
           44  +<dle>
           45  +<dt>lorem</dt>
           46  +<dd> ipsum dolores
           47  +</dd>
           48  +</dle>
           49  +
           50  +</dl>
           51  +</section>
           52  +
           53  +
           54  +
           55  +</manpage>

Added modules/doctools/tests/toc/html/00.

            1  +<!DOCTYPE html><html><head>
            2  +<title> TOC </title>
            3  +</head>
            4  +<!-- Generated by tcllib/doctools/toc with format 'html'
            5  +   -->
            6  +<!-- TOC
            7  +   -->
            8  +<body>
            9  +<h3>TOC</h3>
           10  +<hr><dl><dt><h2>Test</h2></dt><dd>
           11  +</dd></dl><hr></body></html>

Added modules/doctools/tests/toc/html/01.

            1  +<!DOCTYPE html><html><head>
            2  +<title> TOC </title>
            3  +</head>
            4  +<!-- Generated by tcllib/doctools/toc with format 'html'
            5  +   -->
            6  +<!-- TOC
            7  +   -->
            8  +<body>
            9  +<h3>TOC</h3>
           10  +<hr><dl><dt><h2>Test</h2></dt><dd>
           11  +<table class="#doctools_toc">
           12  +<tr class="#doctools_toceven" >
           13  +<td class="#doctools_tocleft" ><a name='i1'><a href="I1f">i1</a></td>
           14  +<td class="#doctools_tocright">i1d</td>
           15  +</tr>
           16  +<tr class="#doctools_tocodd"  >
           17  +<td class="#doctools_tocleft" ><a name='i2'><a href="I2f">i2</a></td>
           18  +<td class="#doctools_tocright">i2d</td>
           19  +</tr>
           20  +</table>
           21  +</dd></dl><hr></body></html>

Added modules/doctools/tests/toc/html/02.

            1  +<!DOCTYPE html><html><head>
            2  +<title> TOC </title>
            3  +</head>
            4  +<!-- Generated by tcllib/doctools/toc with format 'html'
            5  +   -->
            6  +<!-- TOC
            7  +   -->
            8  +<body>
            9  +<h3>TOC</h3>
           10  +<hr><dl><dt><h2>Test</h2></dt><dd>
           11  +<table class="#doctools_toc">
           12  +<tr class="#doctools_toceven" >
           13  +<td class="#doctools_tocleft" ><a name='i1'><a href="I1f">i1</a></td>
           14  +<td class="#doctools_tocright">i1d</td>
           15  +</tr>
           16  +</table>
           17  +<dl><dt><a name='_1_a_href_1_df_1_1_d_1_a_1_'><a href="Df">D</a></dt><dd>
           18  +<table class="#doctools_toc">
           19  +<tr class="#doctools_tocodd"  >
           20  +<td class="#doctools_tocleft" ><a name='i2'><a href="I2f">i2</a></td>
           21  +<td class="#doctools_tocright">i2d</td>
           22  +</tr>
           23  +<tr class="#doctools_toceven" >
           24  +<td class="#doctools_tocleft" ><a name='i3'><a href="I3f">i3</a></td>
           25  +<td class="#doctools_tocright">i3d</td>
           26  +</tr>
           27  +</table></dl>
           28  +<table class="#doctools_toc">
           29  +<tr class="#doctools_toceven" >
           30  +<td class="#doctools_tocleft" ><a name='i4'><a href="I4f">i4</a></td>
           31  +<td class="#doctools_tocright">i4d</td>
           32  +</tr>
           33  +</table>
           34  +</dd></dl><hr></body></html>

Added modules/doctools/tests/toc/nroff/00.

            1  +'\"
            2  +'\" Generated by tcllib/doctools/toc with format 'nroff'
            3  +.TH "TOC" n
            4  +.so man.macros
            5  +.BS
            6  +.SH CONTENTS
            7  +Test
            8  +.RS

Added modules/doctools/tests/toc/nroff/01.

            1  +'\"
            2  +'\" Generated by tcllib/doctools/toc with format 'nroff'
            3  +.TH "TOC" n
            4  +.so man.macros
            5  +.BS
            6  +.SH CONTENTS
            7  +Test
            8  +.RS
            9  +.TP
           10  +\fBi1\fR
           11  +\fII1f\fR: i1d
           12  +.TP
           13  +\fBi2\fR
           14  +\fII2f\fR: i2d

Added modules/doctools/tests/toc/nroff/02.

            1  +'\"
            2  +'\" Generated by tcllib/doctools/toc with format 'nroff'
            3  +.TH "TOC" n
            4  +.so man.macros
            5  +.BS
            6  +.SH CONTENTS
            7  +Test
            8  +.RS
            9  +.TP
           10  +\fBi1\fR
           11  +\fII1f\fR: i1d
           12  +.TP
           13  +D
           14  +.RS
           15  +.TP
           16  +\fBi2\fR
           17  +\fII2f\fR: i2d
           18  +.TP
           19  +\fBi3\fR
           20  +\fII3f\fR: i3d
           21  +.RE
           22  +.TP
           23  +\fBi4\fR
           24  +\fII4f\fR: i4d

Added modules/doctools/tests/toc/null/00.


Added modules/doctools/tests/toc/null/01.


Added modules/doctools/tests/toc/null/02.


Added modules/doctools/tests/toc/text/00.

            1  +
            2  +Table of contents generated by tcllib/doctools/toc with format 'text'
            3  +
            4  +TOC -- Test
            5  +===========

Added modules/doctools/tests/toc/text/01.

            1  +
            2  +Table of contents generated by tcllib/doctools/toc with format 'text'
            3  +
            4  +TOC -- Test
            5  +===========
            6  +
            7  +I1f i1d
            8  +
            9  +I2f i2d

Added modules/doctools/tests/toc/text/02.

            1  +
            2  +Table of contents generated by tcllib/doctools/toc with format 'text'
            3  +
            4  +TOC -- Test
            5  +===========
            6  +
            7  +I1f i1d
            8  +
            9  +D
           10  +-
           11  +
           12  +    I2f i2d
           13  +
           14  +    I3f i3d
           15  +
           16  +I4f i4d

Added modules/doctools/tests/toc/tmml/00.

            1  +<manual package='TOC'>
            2  +<title>Test</title>
            3  +
            4  +</manual>

Added modules/doctools/tests/toc/tmml/01.

            1  +<manual package='TOC'>
            2  +<title>Test</title>
            3  +<subdoc href='I1f'/>
            4  +<subdoc href='I2f'/>
            5  +
            6  +</manual>

Added modules/doctools/tests/toc/tmml/02.

            1  +<manual package='TOC'>
            2  +<title>Test</title>
            3  +<subdoc href='I1f'/>
            4  +<division>
            5  +<title>D</title>
            6  +<subdoc href='I2f'/>
            7  +<subdoc href='I3f'/>
            8  +
            9  +</division>
           10  +<subdoc href='I4f'/>
           11  +
           12  +</manual>

Added modules/doctools/tests/toc/toc/00.

            1  +[comment { -- empty toc }]
            2  +[toc_begin TOC Test]
            3  +[toc_end]

Added modules/doctools/tests/toc/toc/01.

            1  +[comment { -- just items }]
            2  +[toc_begin TOC Test]
            3  +[item I1f i1 i1d]
            4  +[item I2f i2 i2d]
            5  +[toc_end]

Added modules/doctools/tests/toc/toc/02.

            1  +[comment { -- item + division mix }]
            2  +[toc_begin TOC Test]
            3  +[item I1f i1 i1d]
            4  +[division_start D Df]
            5  +[item I2f i2 i2d]
            6  +[item I3f i3 i3d]
            7  +[division_end]
            8  +[item I4f i4 i4d]
            9  +[toc_end]

Added modules/doctools/tests/toc/wiki/00.

            1  +
            2  +Table of Contents '''TOC'''
            3  +'''Test'''
            4  +
            5  +

Added modules/doctools/tests/toc/wiki/01.

            1  +
            2  +Table of Contents '''TOC'''
            3  +'''Test'''
            4  +   [[i1]]:   I1f -- i1d
            5  +   [[i2]]:   I2f -- i2d
            6  +
            7  +

Added modules/doctools/tests/toc/wiki/02.

            1  +
            2  +Table of Contents '''TOC'''
            3  +'''Test'''
            4  +   [[i1]]:   I1f -- i1d
            5  +'''D'''
            6  +   [[i2]]:   I2f -- i2d
            7  +   [[i3]]:   I3f -- i3d
            8  +
            9  +   [[i4]]:   I4f -- i4d
           10  +
           11  +

Changes to modules/doctools/tests/wiki/00.

     6      6   **DESCRIPTION**
     7      7   
     8      8   
     9      9   
    10     10   **COPYRIGHT**
    11     11   
    12     12    Copyright (c) .COPYRIGHT.
    13         -

Changes to modules/doctools/tests/wiki/01.

     6      6   **DESCRIPTION**
     7      7   
     8      8   Argument ::''Argument'':: Class ::'''Class''':: Command ::'''Command''':: Comment :::: Const ::'''Constant''':: Emphasis ::''Emphasis'':: File ::"''File/Path''":: Function ::'''Function''':: Method ::'''Method''':: Namespace ::'''Namespace''':: Option ::'''Option''':: Optional ::?Optional?:: Package ::'''Package''':: Syscmd ::'''SystemCommand''':: Term ::''Term'':: Type ::'''Type''':: Uri ::Uri:: Variable ::'''Variable''':: Widget ::'''Widget'''::
     9      9   
    10     10   **COPYRIGHT**
    11     11   
    12     12    Copyright (c) **Copyright**
    13         -

Changes to modules/doctools/tests/wiki/02.

    28     28   
    29     29   KEYA, KEYZ
    30     30   
    31     31   
    32     32   **COPYRIGHT**
    33     33   
    34     34    Copyright (c) .COPYRIGHT.
    35         -

Changes to modules/doctools/tests/wiki/03.

    28     28   5555
    29     29   At '''AaA'''.
    30     30   At '''__undefined__'''.
    31     31   
    32     32   **COPYRIGHT**
    33     33   
    34     34    Copyright (c) .COPYRIGHT.
    35         -

Changes to modules/doctools/tests/wiki/04.

    21     21   
    22     22   ======
    23     23   FERTIG
    24     24   
    25     25   **COPYRIGHT**
    26     26   
    27     27    Copyright (c) .COPYRIGHT.
    28         -

Changes to modules/doctools/tests/wiki/05.

    32     32      term:    definition 
    33     33   
    34     34      a-command :    semantic  
    35     35   
    36     36   
    37     37      1.  A
    38     38   
    39         -   1.  B  C  D
           39  +   1.  B
           40  +C
           41  +D
    40     42   
    41     43   
    42     44      *  1
    43     45   
    44         -   *  2  2a  2b
           46  +   *  2
           47  +2a
           48  +2b
    45     49   
    46     50   
    47     51      '''option-1''':    meaning 
    48     52   
    49     53      '''option-2''' value:    elaboration  
    50     54   
    51     55   
................................................................................
    59     63   Database Class:	'''Color'''
    60     64      *  caramel
    61     65   KO
    62     66   
    63     67   **COPYRIGHT**
    64     68   
    65     69    Copyright (c) .COPYRIGHT.
    66         -

Changes to modules/doctools/tests/wiki/06.

     3      3   
     4      4   
     5      5   
     6      6   **DESCRIPTION**
     7      7   
     8      8   
     9      9   
    10         -   *  1  2  3
           10  +   *  1
           11  +2
           12  +3
    11     13   
    12     14      *
    13     15   
    14         -   1.  a  b  c
           16  +   1.  a
           17  +b
           18  +c
    15     19   
    16     20      1.
    17     21   
    18     22      foo:    snafu 
    19     23   
    20     24      bar:    barf 
    21     25   
    22     26      roo:    gork  
    23     27   
    24         -   1.  a  b  c
           28  +   1.  a
           29  +b
           30  +c
    25     31   
    26         -   *  4  5  6
           32  +   *  4
           33  +5
           34  +6
    27     35   
    28     36   **COPYRIGHT**
    29     37   
    30     38    Copyright (c) .COPYRIGHT.
    31         -

Changes to modules/doctools/tests/wiki/07.

    24     24      1.  a  22
    25     25   
    26     26      *  3
    27     27   
    28     28   **COPYRIGHT**
    29     29   
    30     30    Copyright (c) .COPYRIGHT.
    31         -

Changes to modules/doctools/tests/wiki/08.

   110    110   
   111    111   KEYA, KEYZ
   112    112   
   113    113   
   114    114   **COPYRIGHT**
   115    115   
   116    116    Copyright (c) **Copyright**
   117         -

Added modules/doctools/tests/wiki/09.

            1  +'''TEST 3.14.15.926''' '''.MODULE.'''
            2  +
            3  +
            4  +
            5  +
            6  +**DESCRIPTION**
            7  +
            8  +lorem
            9  +======
           10  +
           11  +1 lorem ipsum dolores
           12  +
           13  +======
           14  +ipsum
           15  +======
           16  + 2 lorem ipsum dolores 
           17  +======
           18  +dolores
           19  +======
           20  +
           21  +3 lorem ipsum dolores
           22  +
           23  +======
           24  +lorem
           25  +======
           26  + 4 lorem ipsum dolores
           27  +
           28  +======
           29  +ipsum
           30  +======
           31  +
           32  +5 lorem ipsum dolores 
           33  +======
           34  +dolores
           35  +
           36  +**COPYRIGHT**
           37  +
           38  + Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/10.

            1  +'''test-itemized n''' '''.MODULE.'''
            2  +
            3  +
            4  +
            5  +
            6  +**DESCRIPTION**
            7  +
            8  +lorem ipsum dolores
            9  +
           10  +   *  lorem ipsum dolores
           11  +
           12  +   *  lorem ipsum dolores
           13  +lorem ipsum dolores
           14  +
           15  +   *  lorem ipsum dolores
           16  +lorem ipsum dolores
           17  +lorem ipsum dolores
           18  +
           19  +**COPYRIGHT**
           20  +
           21  + Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/11.

            1  +'''test-enumerated n''' '''.MODULE.'''
            2  +
            3  +
            4  +
            5  +
            6  +**DESCRIPTION**
            7  +
            8  +lorem ipsum dolores
            9  +
           10  +   1.  lorem ipsum dolores
           11  +
           12  +   1.  lorem ipsum dolores
           13  +lorem ipsum dolores
           14  +
           15  +   1.  lorem ipsum dolores
           16  +lorem ipsum dolores
           17  +lorem ipsum dolores
           18  +
           19  +**COPYRIGHT**
           20  +
           21  + Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/12.

            1  +'''test-definitions n''' '''.MODULE.'''
            2  +
            3  +
            4  +
            5  +
            6  +**DESCRIPTION**
            7  +
            8  +lorem ipsum dolores
            9  +
           10  +   lorem:    ipsum dolores 
           11  +
           12  +   lorem:    ipsum dolores 
           13  +lorem ipsum dolores
           14  +
           15  +   lorem:    ipsum dolores 
           16  +lorem ipsum dolores
           17  +lorem ipsum dolores
           18  +
           19  +**COPYRIGHT**
           20  +
           21  + Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/13.

            1  +'''test-itemized-examples n''' '''.MODULE.'''
            2  +
            3  +
            4  +
            5  +
            6  +**DESCRIPTION**
            7  +
            8  +lorem ipsum dolores
            9  +
           10  +   *
           11  +======
           12  + A lorem ipsum dolores 
           13  +======
           14  +
           15  +
           16  +   *  lorem ipsum dolores
           17  +======
           18  + B lorem ipsum dolores 
           19  +======
           20  +lorem ipsum dolores
           21  +
           22  +   *  lorem ipsum dolores
           23  +======
           24  + C lorem ipsum dolores 
           25  +======
           26  +
           27  +
           28  +   *  lorem ipsum dolores
           29  +
           30  +**COPYRIGHT**
           31  +
           32  + Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/14.

            1  +'''test-enumerated-examples n''' '''.MODULE.'''
            2  +
            3  +
            4  +
            5  +
            6  +**DESCRIPTION**
            7  +
            8  +lorem ipsum dolores
            9  +
           10  +   1.
           11  +======
           12  + A1 lorem ipsum dolores 
           13  +======
           14  +
           15  +
           16  +   1.  lorem ipsum dolores
           17  +======
           18  + B2 lorem ipsum dolores 
           19  +======
           20  +lorem ipsum dolores
           21  +
           22  +   1.  lorem ipsum dolores
           23  +======
           24  + C3 lorem ipsum dolores 
           25  +======
           26  +
           27  +
           28  +   1.  lorem ipsum dolores
           29  +
           30  +**COPYRIGHT**
           31  +
           32  + Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/15.

            1  +'''test-definition-examples n''' '''.MODULE.'''
            2  +
            3  +
            4  +
            5  +
            6  +**DESCRIPTION**
            7  +
            8  +lorem ipsum dolores
            9  +
           10  +   lorem:    
           11  +======
           12  + A1 lorem ipsum dolores 
           13  +======
           14  +
           15  +
           16  +   lorem:    ipsum dolores 
           17  +======
           18  + B2 lorem ipsum dolores 
           19  +======
           20  +lorem ipsum dolores
           21  +
           22  +   lorem:    ipsum dolores 
           23  +======
           24  + C3 lorem ipsum dolores 
           25  +======
           26  +
           27  +
           28  +   lorem:    ipsum dolores  
           29  +
           30  +**COPYRIGHT**
           31  +
           32  + Copyright (c) .COPYRIGHT.