summaryrefslogtreecommitdiffstats
path: root/tcllib/modules/doctools2idx/tests/data/ok
diff options
context:
space:
mode:
Diffstat (limited to 'tcllib/modules/doctools2idx/tests/data/ok')
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/1_nokeys2
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/2_justkeys46
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/3_kwic206
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/1_nokeys2
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/2_justkeys46
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/3_kwic206
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/1_nokeys2
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/2_justkeys46
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/3_kwic206
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/1_nokeys2
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/2_justkeys46
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/3_kwic206
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/1_nokeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/2_justkeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/3_kwic1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx/1_nokeys2
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx/2_justkeys51
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/docidx/3_kwic211
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-compact/1_nokeys20
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-compact/2_justkeys245
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-compact/3_kwic449
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-indented/1_nokeys20
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-indented/2_justkeys245
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-indented/3_kwic449
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/1_nokeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/2_justkeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/3_kwic1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-indalign/1_nokeys8
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-indalign/2_justkeys53
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-indalign/3_kwic80
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-indented/1_nokeys8
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-indented/2_justkeys53
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-indented/3_kwic80
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/1_nokeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/2_justkeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/3_kwic1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json/1_nokeys8
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json/2_justkeys53
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json/3_kwic80
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/json/README.txt3
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/nroff-external/1_nokeys5
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/nroff-external/2_justkeys136
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/nroff-external/3_kwic660
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/1_nokeys4
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/2_justkeys135
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/3_kwic659
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/serial-print/1_nokeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/serial-print/2_justkeys45
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/serial-print/3_kwic205
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/serial/1_nokeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/serial/2_justkeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/serial/3_kwic1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/text/1_nokeys2
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/text/2_justkeys136
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/text/3_kwic294
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/wiki-list/1_nokeys3
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/wiki-list/2_justkeys48
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/wiki-list/3_kwic251
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/wiki-table/1_nokeys1
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/wiki-table/2_justkeys46
-rw-r--r--tcllib/modules/doctools2idx/tests/data/ok/wiki-table/3_kwic206
61 files changed, 5983 insertions, 0 deletions
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/1_nokeys
new file mode 100644
index 0000000..14e3342
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/1_nokeys
@@ -0,0 +1,2 @@
+[index_begin KWIC INDEX]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/2_justkeys
new file mode 100644
index 0000000..343a102
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/2_justkeys
@@ -0,0 +1,46 @@
+[index_begin {Keyword Index} {}]
+[key changelog]
+[key conversion]
+[key cvs]
+[key {cvs log}]
+[key docidx]
+[key {docidx commands}]
+[key {docidx language}]
+[key {docidx markup}]
+[key {docidx syntax}]
+[key doctoc]
+[key {doctoc commands}]
+[key {doctoc language}]
+[key {doctoc markup}]
+[key {doctoc syntax}]
+[key doctools]
+[key {doctools commands}]
+[key {doctools language}]
+[key {doctools markup}]
+[key {doctools syntax}]
+[key document]
+[key documentation]
+[key emacs]
+[key examples]
+[key faq]
+[key formatter]
+[key {formatting engine}]
+[key HTML]
+[key index]
+[key {index formatter}]
+[key {keyword index}]
+[key keywords]
+[key latex]
+[key log]
+[key manpage]
+[key markup]
+[key nroff]
+[key plugin]
+[key {semantic markup}]
+[key {table of contents}]
+[key TMML]
+[key toc]
+[key {toc formatter}]
+[key web]
+[key wiki]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/3_kwic
new file mode 100644
index 0000000..8875313
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-aligned/3_kwic
@@ -0,0 +1,206 @@
+[index_begin {Keyword Index} {}]
+[key changelog]
+[manpage changelog.man doctools::changelog]
+[manpage cvs.man doctools::cvs]
+[key conversion]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key cvs]
+[manpage cvs.man doctools::cvs]
+[key {cvs log}]
+[manpage cvs.man doctools::cvs]
+[key docidx]
+[manpage docidx.man doctools::idx]
+[manpage apps/dtplite.man dtplite]
+[key {docidx commands}]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key {docidx language}]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key {docidx markup}]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key {docidx syntax}]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key doctoc]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[key {doctoc commands}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc language}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc markup}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc syntax}]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key doctools]
+[manpage changelog.man doctools::changelog]
+[manpage apps/dtplite.man dtplite]
+[key {doctools commands}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools language}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools markup}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools syntax}]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key document]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key documentation]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[key emacs]
+[manpage changelog.man doctools::changelog]
+[manpage cvs.man doctools::cvs]
+[key examples]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[key faq]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[key formatter]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key {formatting engine}]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key HTML]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key index]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage docidx.man doctools::idx]
+[key {index formatter}]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[key {keyword index}]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx.man doctools::idx]
+[key keywords]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[key latex]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[key log]
+[manpage cvs.man doctools::cvs]
+[key manpage]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key markup]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage doctools_intro.man doctools_intro]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key nroff]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key plugin]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[key {semantic markup}]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools_intro.man doctools_intro]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key {table of contents}]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctoc.man doctools::toc]
+[key TMML]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key toc]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctoc.man doctools::toc]
+[key {toc formatter}]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[key web]
+[url http://tcllib.sourceforge.net/doc/docidx_lang_intro.html {docidx language introduction}]
+[key wiki]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/1_nokeys
new file mode 100644
index 0000000..14e3342
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/1_nokeys
@@ -0,0 +1,2 @@
+[index_begin KWIC INDEX]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/2_justkeys
new file mode 100644
index 0000000..343a102
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/2_justkeys
@@ -0,0 +1,46 @@
+[index_begin {Keyword Index} {}]
+[key changelog]
+[key conversion]
+[key cvs]
+[key {cvs log}]
+[key docidx]
+[key {docidx commands}]
+[key {docidx language}]
+[key {docidx markup}]
+[key {docidx syntax}]
+[key doctoc]
+[key {doctoc commands}]
+[key {doctoc language}]
+[key {doctoc markup}]
+[key {doctoc syntax}]
+[key doctools]
+[key {doctools commands}]
+[key {doctools language}]
+[key {doctools markup}]
+[key {doctools syntax}]
+[key document]
+[key documentation]
+[key emacs]
+[key examples]
+[key faq]
+[key formatter]
+[key {formatting engine}]
+[key HTML]
+[key index]
+[key {index formatter}]
+[key {keyword index}]
+[key keywords]
+[key latex]
+[key log]
+[key manpage]
+[key markup]
+[key nroff]
+[key plugin]
+[key {semantic markup}]
+[key {table of contents}]
+[key TMML]
+[key toc]
+[key {toc formatter}]
+[key web]
+[key wiki]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/3_kwic
new file mode 100644
index 0000000..6a27b44
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-compact/3_kwic
@@ -0,0 +1,206 @@
+[index_begin {Keyword Index} {}]
+[key changelog]
+[manpage changelog.man doctools::changelog]
+[manpage cvs.man doctools::cvs]
+[key conversion]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key cvs]
+[manpage cvs.man doctools::cvs]
+[key {cvs log}]
+[manpage cvs.man doctools::cvs]
+[key docidx]
+[manpage docidx.man doctools::idx]
+[manpage apps/dtplite.man dtplite]
+[key {docidx commands}]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key {docidx language}]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key {docidx markup}]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key {docidx syntax}]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key doctoc]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[key {doctoc commands}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc language}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc markup}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc syntax}]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key doctools]
+[manpage changelog.man doctools::changelog]
+[manpage apps/dtplite.man dtplite]
+[key {doctools commands}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools language}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools markup}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools syntax}]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key document]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key documentation]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[key emacs]
+[manpage changelog.man doctools::changelog]
+[manpage cvs.man doctools::cvs]
+[key examples]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[key faq]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[key formatter]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key {formatting engine}]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key HTML]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key index]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage docidx.man doctools::idx]
+[key {index formatter}]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[key {keyword index}]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx.man doctools::idx]
+[key keywords]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[key latex]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[key log]
+[manpage cvs.man doctools::cvs]
+[key manpage]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key markup]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage doctools_intro.man doctools_intro]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key nroff]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key plugin]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[key {semantic markup}]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools_intro.man doctools_intro]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key {table of contents}]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctoc.man doctools::toc]
+[key TMML]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key toc]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctoc.man doctools::toc]
+[key {toc formatter}]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[key web]
+[url http://tcllib.sourceforge.net/doc/docidx_lang_intro.html {docidx language introduction}]
+[key wiki]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/1_nokeys
new file mode 100644
index 0000000..5b2857d
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/1_nokeys
@@ -0,0 +1,2 @@
+[index_begin KWIC INDEX]
+[index_end] \ No newline at end of file
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/2_justkeys
new file mode 100644
index 0000000..5267b23
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/2_justkeys
@@ -0,0 +1,46 @@
+[index_begin {Keyword Index} {}]
+ [key changelog]
+ [key conversion]
+ [key cvs]
+ [key {cvs log}]
+ [key docidx]
+ [key {docidx commands}]
+ [key {docidx language}]
+ [key {docidx markup}]
+ [key {docidx syntax}]
+ [key doctoc]
+ [key {doctoc commands}]
+ [key {doctoc language}]
+ [key {doctoc markup}]
+ [key {doctoc syntax}]
+ [key doctools]
+ [key {doctools commands}]
+ [key {doctools language}]
+ [key {doctools markup}]
+ [key {doctools syntax}]
+ [key document]
+ [key documentation]
+ [key emacs]
+ [key examples]
+ [key faq]
+ [key formatter]
+ [key {formatting engine}]
+ [key HTML]
+ [key index]
+ [key {index formatter}]
+ [key {keyword index}]
+ [key keywords]
+ [key latex]
+ [key log]
+ [key manpage]
+ [key markup]
+ [key nroff]
+ [key plugin]
+ [key {semantic markup}]
+ [key {table of contents}]
+ [key TMML]
+ [key toc]
+ [key {toc formatter}]
+ [key web]
+ [key wiki]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/3_kwic
new file mode 100644
index 0000000..4882a2f
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indalign/3_kwic
@@ -0,0 +1,206 @@
+[index_begin {Keyword Index} {}]
+ [key changelog]
+ [manpage changelog.man doctools::changelog]
+ [manpage cvs.man doctools::cvs]
+ [key conversion]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key cvs]
+ [manpage cvs.man doctools::cvs]
+ [key {cvs log}]
+ [manpage cvs.man doctools::cvs]
+ [key docidx]
+ [manpage docidx.man doctools::idx]
+ [manpage apps/dtplite.man dtplite]
+ [key {docidx commands}]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [key {docidx language}]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [key {docidx markup}]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [key {docidx syntax}]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [key doctoc]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [key {doctoc commands}]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [key {doctoc language}]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [key {doctoc markup}]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [key {doctoc syntax}]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [key doctools]
+ [manpage changelog.man doctools::changelog]
+ [manpage apps/dtplite.man dtplite]
+ [key {doctools commands}]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [key {doctools language}]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [key {doctools markup}]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [key {doctools syntax}]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [key document]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [key documentation]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [key emacs]
+ [manpage changelog.man doctools::changelog]
+ [manpage cvs.man doctools::cvs]
+ [key examples]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [key faq]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [key formatter]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [key {formatting engine}]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [key HTML]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key index]
+ [manpage docidx_intro.man docidx_intro]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage docidx.man doctools::idx]
+ [key {index formatter}]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [key {keyword index}]
+ [manpage docidx_intro.man docidx_intro]
+ [manpage docidx.man doctools::idx]
+ [key keywords]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [key latex]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [key log]
+ [manpage cvs.man doctools::cvs]
+ [key manpage]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key markup]
+ [manpage docidx_intro.man docidx_intro]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage doctoc_intro.man doctoc_intro]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage doctools_intro.man doctools_intro]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key nroff]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key plugin]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [key {semantic markup}]
+ [manpage docidx_intro.man docidx_intro]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage doctoc_intro.man doctoc_intro]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctools_intro.man doctools_intro]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [key {table of contents}]
+ [manpage doctoc_intro.man doctoc_intro]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctoc.man doctools::toc]
+ [key TMML]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key toc]
+ [manpage doctoc_intro.man doctoc_intro]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctoc.man doctools::toc]
+ [key {toc formatter}]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [key web]
+ [url http://tcllib.sourceforge.net/doc/docidx_lang_intro.html {docidx language introduction}]
+ [key wiki]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/1_nokeys
new file mode 100644
index 0000000..14e3342
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/1_nokeys
@@ -0,0 +1,2 @@
+[index_begin KWIC INDEX]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/2_justkeys
new file mode 100644
index 0000000..5267b23
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/2_justkeys
@@ -0,0 +1,46 @@
+[index_begin {Keyword Index} {}]
+ [key changelog]
+ [key conversion]
+ [key cvs]
+ [key {cvs log}]
+ [key docidx]
+ [key {docidx commands}]
+ [key {docidx language}]
+ [key {docidx markup}]
+ [key {docidx syntax}]
+ [key doctoc]
+ [key {doctoc commands}]
+ [key {doctoc language}]
+ [key {doctoc markup}]
+ [key {doctoc syntax}]
+ [key doctools]
+ [key {doctools commands}]
+ [key {doctools language}]
+ [key {doctools markup}]
+ [key {doctools syntax}]
+ [key document]
+ [key documentation]
+ [key emacs]
+ [key examples]
+ [key faq]
+ [key formatter]
+ [key {formatting engine}]
+ [key HTML]
+ [key index]
+ [key {index formatter}]
+ [key {keyword index}]
+ [key keywords]
+ [key latex]
+ [key log]
+ [key manpage]
+ [key markup]
+ [key nroff]
+ [key plugin]
+ [key {semantic markup}]
+ [key {table of contents}]
+ [key TMML]
+ [key toc]
+ [key {toc formatter}]
+ [key web]
+ [key wiki]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/3_kwic
new file mode 100644
index 0000000..8234537
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-indented/3_kwic
@@ -0,0 +1,206 @@
+[index_begin {Keyword Index} {}]
+ [key changelog]
+ [manpage changelog.man doctools::changelog]
+ [manpage cvs.man doctools::cvs]
+ [key conversion]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key cvs]
+ [manpage cvs.man doctools::cvs]
+ [key {cvs log}]
+ [manpage cvs.man doctools::cvs]
+ [key docidx]
+ [manpage docidx.man doctools::idx]
+ [manpage apps/dtplite.man dtplite]
+ [key {docidx commands}]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [key {docidx language}]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [key {docidx markup}]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [key {docidx syntax}]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [key doctoc]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [key {doctoc commands}]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [key {doctoc language}]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [key {doctoc markup}]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [key {doctoc syntax}]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [key doctools]
+ [manpage changelog.man doctools::changelog]
+ [manpage apps/dtplite.man dtplite]
+ [key {doctools commands}]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [key {doctools language}]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [key {doctools markup}]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [key {doctools syntax}]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [key document]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [key documentation]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [key emacs]
+ [manpage changelog.man doctools::changelog]
+ [manpage cvs.man doctools::cvs]
+ [key examples]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [key faq]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [key formatter]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [key {formatting engine}]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [key HTML]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key index]
+ [manpage docidx_intro.man docidx_intro]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage docidx.man doctools::idx]
+ [key {index formatter}]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [key {keyword index}]
+ [manpage docidx_intro.man docidx_intro]
+ [manpage docidx.man doctools::idx]
+ [key keywords]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [key latex]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [key log]
+ [manpage cvs.man doctools::cvs]
+ [key manpage]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key markup]
+ [manpage docidx_intro.man docidx_intro]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage doctoc_intro.man doctoc_intro]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage doctools_intro.man doctools_intro]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key nroff]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key plugin]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [key {semantic markup}]
+ [manpage docidx_intro.man docidx_intro]
+ [manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+ [manpage docidx_lang_faq.man docidx_lang_faq]
+ [manpage docidx_lang_intro.man docidx_lang_intro]
+ [manpage docidx_lang_syntax.man docidx_lang_syntax]
+ [manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+ [manpage doctoc_intro.man doctoc_intro]
+ [manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+ [manpage doctoc_lang_faq.man doctoc_lang_faq]
+ [manpage doctoc_lang_intro.man doctoc_lang_intro]
+ [manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctools_intro.man doctools_intro]
+ [manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+ [manpage doctools_lang_faq.man doctools_lang_faq]
+ [manpage doctools_lang_intro.man doctools_lang_intro]
+ [manpage doctools_lang_syntax.man doctools_lang_syntax]
+ [manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+ [key {table of contents}]
+ [manpage doctoc_intro.man doctoc_intro]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctoc.man doctools::toc]
+ [key TMML]
+ [manpage doctools.man doctools]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+ [manpage apps/dtplite.man dtplite]
+ [manpage mpexpand.man mpexpand]
+ [key toc]
+ [manpage doctoc_intro.man doctoc_intro]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [manpage doctoc.man doctools::toc]
+ [key {toc formatter}]
+ [manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+ [key web]
+ [url http://tcllib.sourceforge.net/doc/docidx_lang_intro.html {docidx language introduction}]
+ [key wiki]
+ [manpage docidx.man doctools::idx]
+ [manpage doctoc.man doctools::toc]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/1_nokeys
new file mode 100644
index 0000000..eb66b15
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/1_nokeys
@@ -0,0 +1 @@
+[index_begin KWIC INDEX][index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/2_justkeys
new file mode 100644
index 0000000..267b96b
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/2_justkeys
@@ -0,0 +1 @@
+[index_begin {Keyword Index} {}][key changelog][key conversion][key cvs][key {cvs log}][key docidx][key {docidx commands}][key {docidx language}][key {docidx markup}][key {docidx syntax}][key doctoc][key {doctoc commands}][key {doctoc language}][key {doctoc markup}][key {doctoc syntax}][key doctools][key {doctools commands}][key {doctools language}][key {doctools markup}][key {doctools syntax}][key document][key documentation][key emacs][key examples][key faq][key formatter][key {formatting engine}][key HTML][key index][key {index formatter}][key {keyword index}][key keywords][key latex][key log][key manpage][key markup][key nroff][key plugin][key {semantic markup}][key {table of contents}][key TMML][key toc][key {toc formatter}][key web][key wiki][index_end] \ No newline at end of file
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/3_kwic
new file mode 100644
index 0000000..784970c
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx-ultracompact/3_kwic
@@ -0,0 +1 @@
+[index_begin {Keyword Index} {}][key changelog][manpage changelog.man doctools::changelog][manpage cvs.man doctools::cvs][key conversion][manpage doctools.man doctools][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][manpage apps/dtplite.man dtplite][manpage mpexpand.man mpexpand][key cvs][manpage cvs.man doctools::cvs][key {cvs log}][manpage cvs.man doctools::cvs][key docidx][manpage docidx.man doctools::idx][manpage apps/dtplite.man dtplite][key {docidx commands}][manpage docidx_lang_cmdref.man docidx_lang_cmdref][manpage docidx_lang_faq.man docidx_lang_faq][manpage docidx_lang_intro.man docidx_lang_intro][manpage docidx_lang_syntax.man docidx_lang_syntax][key {docidx language}][manpage docidx_lang_cmdref.man docidx_lang_cmdref][manpage docidx_lang_faq.man docidx_lang_faq][manpage docidx_lang_intro.man docidx_lang_intro][manpage docidx_lang_syntax.man docidx_lang_syntax][key {docidx markup}][manpage docidx_lang_cmdref.man docidx_lang_cmdref][manpage docidx_lang_faq.man docidx_lang_faq][manpage docidx_lang_intro.man docidx_lang_intro][manpage docidx_lang_syntax.man docidx_lang_syntax][key {docidx syntax}][manpage docidx_lang_faq.man docidx_lang_faq][manpage docidx_lang_intro.man docidx_lang_intro][manpage docidx_lang_syntax.man docidx_lang_syntax][key doctoc][manpage doctoc.man doctools::toc][manpage apps/dtplite.man dtplite][key {doctoc commands}][manpage doctoc_lang_cmdref.man doctoc_lang_cmdref][manpage doctoc_lang_faq.man doctoc_lang_faq][manpage doctoc_lang_intro.man doctoc_lang_intro][manpage doctoc_lang_syntax.man doctoc_lang_syntax][key {doctoc language}][manpage doctoc_lang_cmdref.man doctoc_lang_cmdref][manpage doctoc_lang_faq.man doctoc_lang_faq][manpage doctoc_lang_intro.man doctoc_lang_intro][manpage doctoc_lang_syntax.man doctoc_lang_syntax][key {doctoc markup}][manpage doctoc_lang_cmdref.man doctoc_lang_cmdref][manpage doctoc_lang_faq.man doctoc_lang_faq][manpage doctoc_lang_intro.man doctoc_lang_intro][manpage doctoc_lang_syntax.man doctoc_lang_syntax][key {doctoc syntax}][manpage doctoc_lang_faq.man doctoc_lang_faq][manpage doctoc_lang_intro.man doctoc_lang_intro][manpage doctoc_lang_syntax.man doctoc_lang_syntax][key doctools][manpage changelog.man doctools::changelog][manpage apps/dtplite.man dtplite][key {doctools commands}][manpage doctools_lang_cmdref.man doctools_lang_cmdref][manpage doctools_lang_faq.man doctools_lang_faq][manpage doctools_lang_intro.man doctools_lang_intro][manpage doctools_lang_syntax.man doctools_lang_syntax][key {doctools language}][manpage doctools_lang_cmdref.man doctools_lang_cmdref][manpage doctools_lang_faq.man doctools_lang_faq][manpage doctools_lang_intro.man doctools_lang_intro][manpage doctools_lang_syntax.man doctools_lang_syntax][key {doctools markup}][manpage doctools_lang_cmdref.man doctools_lang_cmdref][manpage doctools_lang_faq.man doctools_lang_faq][manpage doctools_lang_intro.man doctools_lang_intro][manpage doctools_lang_syntax.man doctools_lang_syntax][key {doctools syntax}][manpage doctools_lang_faq.man doctools_lang_faq][manpage doctools_lang_intro.man doctools_lang_intro][manpage doctools_lang_syntax.man doctools_lang_syntax][key document][manpage doctools_plugin_apiref.man doctools_plugin_apiref][key documentation][manpage doctools.man doctools][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][key emacs][manpage changelog.man doctools::changelog][manpage cvs.man doctools::cvs][key examples][manpage docidx_lang_faq.man docidx_lang_faq][manpage doctoc_lang_faq.man doctoc_lang_faq][manpage doctools_lang_faq.man doctools_lang_faq][key faq][manpage docidx_lang_faq.man docidx_lang_faq][manpage doctoc_lang_faq.man doctoc_lang_faq][manpage doctools_lang_faq.man doctools_lang_faq][key formatter][manpage doctools_plugin_apiref.man doctools_plugin_apiref][key {formatting engine}][manpage docidx_plugin_apiref.man docidx_plugin_apiref][manpage doctoc_plugin_apiref.man doctoc_plugin_apiref][manpage doctools_plugin_apiref.man doctools_plugin_apiref][key HTML][manpage doctools.man doctools][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][manpage apps/dtplite.man dtplite][manpage mpexpand.man mpexpand][key index][manpage docidx_intro.man docidx_intro][manpage docidx_plugin_apiref.man docidx_plugin_apiref][manpage docidx.man doctools::idx][key {index formatter}][manpage docidx_plugin_apiref.man docidx_plugin_apiref][key {keyword index}][manpage docidx_intro.man docidx_intro][manpage docidx.man doctools::idx][key keywords][manpage docidx_plugin_apiref.man docidx_plugin_apiref][key latex][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][key log][manpage cvs.man doctools::cvs][key manpage][manpage doctools.man doctools][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][manpage doctools_plugin_apiref.man doctools_plugin_apiref][manpage apps/dtplite.man dtplite][manpage mpexpand.man mpexpand][key markup][manpage docidx_intro.man docidx_intro][manpage docidx_lang_cmdref.man docidx_lang_cmdref][manpage docidx_lang_faq.man docidx_lang_faq][manpage docidx_lang_intro.man docidx_lang_intro][manpage docidx_lang_syntax.man docidx_lang_syntax][manpage docidx_plugin_apiref.man docidx_plugin_apiref][manpage doctoc_intro.man doctoc_intro][manpage doctoc_lang_cmdref.man doctoc_lang_cmdref][manpage doctoc_lang_faq.man doctoc_lang_faq][manpage doctoc_lang_intro.man doctoc_lang_intro][manpage doctoc_lang_syntax.man doctoc_lang_syntax][manpage doctoc_plugin_apiref.man doctoc_plugin_apiref][manpage doctools.man doctools][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][manpage doctools_intro.man doctools_intro][manpage doctools_lang_cmdref.man doctools_lang_cmdref][manpage doctools_lang_faq.man doctools_lang_faq][manpage doctools_lang_intro.man doctools_lang_intro][manpage doctools_lang_syntax.man doctools_lang_syntax][manpage doctools_plugin_apiref.man doctools_plugin_apiref][manpage apps/dtplite.man dtplite][manpage mpexpand.man mpexpand][key nroff][manpage doctools.man doctools][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][manpage apps/dtplite.man dtplite][manpage mpexpand.man mpexpand][key plugin][manpage docidx_plugin_apiref.man docidx_plugin_apiref][manpage doctoc_plugin_apiref.man doctoc_plugin_apiref][key {semantic markup}][manpage docidx_intro.man docidx_intro][manpage docidx_lang_cmdref.man docidx_lang_cmdref][manpage docidx_lang_faq.man docidx_lang_faq][manpage docidx_lang_intro.man docidx_lang_intro][manpage docidx_lang_syntax.man docidx_lang_syntax][manpage docidx_plugin_apiref.man docidx_plugin_apiref][manpage doctoc_intro.man doctoc_intro][manpage doctoc_lang_cmdref.man doctoc_lang_cmdref][manpage doctoc_lang_faq.man doctoc_lang_faq][manpage doctoc_lang_intro.man doctoc_lang_intro][manpage doctoc_lang_syntax.man doctoc_lang_syntax][manpage doctoc_plugin_apiref.man doctoc_plugin_apiref][manpage doctools_intro.man doctools_intro][manpage doctools_lang_cmdref.man doctools_lang_cmdref][manpage doctools_lang_faq.man doctools_lang_faq][manpage doctools_lang_intro.man doctools_lang_intro][manpage doctools_lang_syntax.man doctools_lang_syntax][manpage doctools_plugin_apiref.man doctools_plugin_apiref][key {table of contents}][manpage doctoc_intro.man doctoc_intro][manpage doctoc_plugin_apiref.man doctoc_plugin_apiref][manpage doctoc.man doctools::toc][key TMML][manpage doctools.man doctools][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][manpage apps/dtplite.man dtplite][manpage mpexpand.man mpexpand][key toc][manpage doctoc_intro.man doctoc_intro][manpage doctoc_plugin_apiref.man doctoc_plugin_apiref][manpage doctoc.man doctools::toc][key {toc formatter}][manpage doctoc_plugin_apiref.man doctoc_plugin_apiref][key web][url http://tcllib.sourceforge.net/doc/docidx_lang_intro.html {docidx language introduction}][key wiki][manpage docidx.man doctools::idx][manpage doctoc.man doctools::toc][index_end] \ No newline at end of file
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx/1_nokeys
new file mode 100644
index 0000000..14e3342
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx/1_nokeys
@@ -0,0 +1,2 @@
+[index_begin KWIC INDEX]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/docidx/2_justkeys
new file mode 100644
index 0000000..7be2640
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx/2_justkeys
@@ -0,0 +1,51 @@
+[comment {
+ Note: The keys are purposefully not completely sorted
+ (alphabetically), to catch if parts of the system are not
+ generating canonical serializations.
+}]
+[index_begin {Keyword Index} {}]
+[key {semantic markup}]
+[key {table of contents}]
+[key TMML]
+[key toc]
+[key {toc formatter}]
+[key wiki]
+[key {web}]
+[key changelog]
+[key conversion]
+[key cvs]
+[key {cvs log}]
+[key docidx]
+[key {docidx commands}]
+[key {docidx language}]
+[key {docidx markup}]
+[key {docidx syntax}]
+[key doctoc]
+[key {doctoc commands}]
+[key {doctoc language}]
+[key {doctoc markup}]
+[key {doctoc syntax}]
+[key doctools]
+[key {doctools commands}]
+[key {doctools language}]
+[key {doctools markup}]
+[key {doctools syntax}]
+[key document]
+[key documentation]
+[key emacs]
+[key examples]
+[key faq]
+[key formatter]
+[key {formatting engine}]
+[key HTML]
+[key index]
+[key {index formatter}]
+[key {keyword index}]
+[key keywords]
+[key latex]
+[key log]
+[key manpage]
+[key markup]
+[key nroff]
+[key plugin]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/docidx/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/docidx/3_kwic
new file mode 100644
index 0000000..5f9bb9b
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/docidx/3_kwic
@@ -0,0 +1,211 @@
+[comment {
+ Note: The keys and references are purposefully not completely
+ sorted (alphabetically), to catch if parts of the system are
+ not generating canonical serializations.
+}]
+[index_begin {Keyword Index} {}]
+[key {table of contents}]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctoc.man doctools::toc]
+[key TMML]
+[manpage apps/dtplite.man dtplite]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage mpexpand.man mpexpand]
+[key toc]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctoc.man doctools::toc]
+[key {toc formatter}]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[key wiki]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[key {web}]
+[url http://tcllib.sourceforge.net/doc/docidx_lang_intro.html {docidx language introduction}]
+[key changelog]
+[manpage changelog.man doctools::changelog]
+[manpage cvs.man doctools::cvs]
+[key conversion]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key cvs]
+[manpage cvs.man doctools::cvs]
+[key {cvs log}]
+[manpage cvs.man doctools::cvs]
+[key docidx]
+[manpage docidx.man doctools::idx]
+[manpage apps/dtplite.man dtplite]
+[key {docidx commands}]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[key {docidx language}]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key {docidx markup}]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key {docidx syntax}]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[key doctoc]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[key {doctoc commands}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc language}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc markup}]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key {doctoc syntax}]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[key doctools]
+[manpage changelog.man doctools::changelog]
+[manpage apps/dtplite.man dtplite]
+[key {doctools commands}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools language}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools markup}]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key {doctools syntax}]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[key document]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key documentation]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[key emacs]
+[manpage changelog.man doctools::changelog]
+[manpage cvs.man doctools::cvs]
+[key examples]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[key faq]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[key formatter]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key {formatting engine}]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[key HTML]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key index]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage docidx.man doctools::idx]
+[key {index formatter}]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[key {keyword index}]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx.man doctools::idx]
+[key keywords]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[key latex]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[key log]
+[manpage cvs.man doctools::cvs]
+[key manpage]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key markup]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage doctools_intro.man doctools_intro]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key nroff]
+[manpage doctools.man doctools]
+[manpage docidx.man doctools::idx]
+[manpage doctoc.man doctools::toc]
+[manpage apps/dtplite.man dtplite]
+[manpage mpexpand.man mpexpand]
+[key plugin]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[key {semantic markup}]
+[manpage docidx_intro.man docidx_intro]
+[manpage docidx_lang_cmdref.man docidx_lang_cmdref]
+[manpage docidx_lang_faq.man docidx_lang_faq]
+[manpage docidx_lang_intro.man docidx_lang_intro]
+[manpage docidx_lang_syntax.man docidx_lang_syntax]
+[manpage docidx_plugin_apiref.man docidx_plugin_apiref]
+[manpage doctoc_intro.man doctoc_intro]
+[manpage doctoc_lang_cmdref.man doctoc_lang_cmdref]
+[manpage doctoc_lang_faq.man doctoc_lang_faq]
+[manpage doctoc_lang_intro.man doctoc_lang_intro]
+[manpage doctoc_lang_syntax.man doctoc_lang_syntax]
+[manpage doctoc_plugin_apiref.man doctoc_plugin_apiref]
+[manpage doctools_intro.man doctools_intro]
+[manpage doctools_lang_cmdref.man doctools_lang_cmdref]
+[manpage doctools_lang_faq.man doctools_lang_faq]
+[manpage doctools_lang_intro.man doctools_lang_intro]
+[manpage doctools_lang_syntax.man doctools_lang_syntax]
+[manpage doctools_plugin_apiref.man doctools_plugin_apiref]
+[index_end]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-compact/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/html-compact/1_nokeys
new file mode 100644
index 0000000..084c61f
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-compact/1_nokeys
@@ -0,0 +1,20 @@
+<html>
+<head>
+<title>KWIC -- INDEX</title>
+<style></style>
+</head>
+
+<body>
+<div class="doctools">
+<div class="idx-header">
+<h1 class="idx-title">KWIC -- INDEX</h1>
+<!-- Customization Point: header -->
+<hr class="idx-navsep">
+</div>
+<div class="idx-footer">
+<hr class="idx-navsep">
+<!-- Customization Point: footer -->
+</div>
+</div>
+</body>
+</html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-compact/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/html-compact/2_justkeys
new file mode 100644
index 0000000..ea92f51
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-compact/2_justkeys
@@ -0,0 +1,245 @@
+<html>
+<head>
+<title>Keyword Index</title>
+<style></style>
+</head>
+
+<body>
+<div class="doctools">
+<div class="idx-header">
+<h1 class="idx-title">Keyword Index</h1>
+<!-- Customization Point: header -->
+<hr class="idx-navsep">
+<!-- - Navigation Bar ------------------------------------------- -->
+<div class="idx-kwnav">
+<a href="#KEYWORDS-C">C</a> &#183;
+<a href="#KEYWORDS-D">D</a> &#183;
+<a href="#KEYWORDS-E">E</a> &#183;
+<a href="#KEYWORDS-F">F</a> &#183;
+<a href="#KEYWORDS-H">H</a> &#183;
+<a href="#KEYWORDS-I">I</a> &#183;
+<a href="#KEYWORDS-K">K</a> &#183;
+<a href="#KEYWORDS-L">L</a> &#183;
+<a href="#KEYWORDS-M">M</a> &#183;
+<a href="#KEYWORDS-N">N</a> &#183;
+<a href="#KEYWORDS-P">P</a> &#183;
+<a href="#KEYWORDS-S">S</a> &#183;
+<a href="#KEYWORDS-T">T</a> &#183;
+<a href="#KEYWORDS-W">W</a>
+</div>
+</div>
+<!-- - Contents ------------------------------------------------- -->
+<table class="idx-contents" width="100%">
+<!-- - (C) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-C">Keywords: C</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-changelog">changelog</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-conversion">conversion</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-cvs">cvs</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-cvs log">cvs log</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (D) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-D">Keywords: D</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-docidx">docidx</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-docidx commands">docidx commands</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-docidx language">docidx language</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-docidx markup">docidx markup</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-docidx syntax">docidx syntax</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc">doctoc</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc commands">doctoc commands</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc language">doctoc language</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc markup">doctoc markup</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc syntax">doctoc syntax</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctools">doctools</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctools commands">doctools commands</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctools language">doctools language</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctools markup">doctools markup</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctools syntax">doctools syntax</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-document">document</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-documentation">documentation</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (E) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-E">Keywords: E</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-emacs">emacs</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-examples">examples</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (F) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-F">Keywords: F</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-faq">faq</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-formatter">formatter</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-formatting engine">formatting engine</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (H) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-H">Keywords: H</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-HTML">HTML</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (I) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-I">Keywords: I</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-index">index</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-index formatter">index formatter</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (K) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-K">Keywords: K</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-keyword index">keyword index</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-keywords">keywords</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (L) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-L">Keywords: L</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-latex">latex</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-log">log</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (M) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-M">Keywords: M</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-manpage">manpage</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-markup">markup</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (N) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-N">Keywords: N</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-nroff">nroff</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (P) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-P">Keywords: P</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-plugin">plugin</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (S) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-S">Keywords: S</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-semantic markup">semantic markup</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (T) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-T">Keywords: T</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-table of contents">table of contents</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-TMML">TMML</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-toc">toc</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-toc formatter">toc formatter</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- - (W) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-W">Keywords: W</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-web">web</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-wiki">wiki</a></td>
+<td width="65%" class="idx-refs"></td>
+</tr>
+<!-- ------------------------------------------------------------ -->
+</table>
+<div class="idx-footer">
+<hr class="idx-navsep">
+<!-- Customization Point: footer -->
+</div>
+</div>
+</body>
+</html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-compact/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/html-compact/3_kwic
new file mode 100644
index 0000000..f85bb90
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-compact/3_kwic
@@ -0,0 +1,449 @@
+<html>
+<head>
+<title>Keyword Index</title>
+<style></style>
+</head>
+
+<body>
+<div class="doctools">
+<div class="idx-header">
+<h1 class="idx-title">Keyword Index</h1>
+<!-- Customization Point: header -->
+<hr class="idx-navsep">
+<!-- - Navigation Bar ------------------------------------------- -->
+<div class="idx-kwnav">
+<a href="#KEYWORDS-C">C</a> &#183;
+<a href="#KEYWORDS-D">D</a> &#183;
+<a href="#KEYWORDS-E">E</a> &#183;
+<a href="#KEYWORDS-F">F</a> &#183;
+<a href="#KEYWORDS-H">H</a> &#183;
+<a href="#KEYWORDS-I">I</a> &#183;
+<a href="#KEYWORDS-K">K</a> &#183;
+<a href="#KEYWORDS-L">L</a> &#183;
+<a href="#KEYWORDS-M">M</a> &#183;
+<a href="#KEYWORDS-N">N</a> &#183;
+<a href="#KEYWORDS-P">P</a> &#183;
+<a href="#KEYWORDS-S">S</a> &#183;
+<a href="#KEYWORDS-T">T</a> &#183;
+<a href="#KEYWORDS-W">W</a>
+</div>
+</div>
+<!-- - Contents ------------------------------------------------- -->
+<table class="idx-contents" width="100%">
+<!-- - (C) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-C">Keywords: C</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-changelog">changelog</a></td>
+<td width="65%" class="idx-refs">
+<a href="changelog.man">doctools::changelog</a> &#183;
+<a href="cvs.man">doctools::cvs</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-conversion">conversion</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools.man">doctools</a> &#183;
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a> &#183;
+<a href="apps/dtplite.man">dtplite</a> &#183;
+<a href="mpexpand.man">mpexpand</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-cvs">cvs</a></td>
+<td width="65%" class="idx-refs">
+<a href="cvs.man">doctools::cvs</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-cvs log">cvs log</a></td>
+<td width="65%" class="idx-refs">
+<a href="cvs.man">doctools::cvs</a>
+</td>
+</tr>
+<!-- - (D) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-D">Keywords: D</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-docidx">docidx</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="apps/dtplite.man">dtplite</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-docidx commands">docidx commands</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+<a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+<a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+<a href="docidx_lang_syntax.man">docidx_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-docidx language">docidx language</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+<a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+<a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+<a href="docidx_lang_syntax.man">docidx_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-docidx markup">docidx markup</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+<a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+<a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+<a href="docidx_lang_syntax.man">docidx_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-docidx syntax">docidx syntax</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+<a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+<a href="docidx_lang_syntax.man">docidx_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc">doctoc</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctoc.man">doctools::toc</a> &#183;
+<a href="apps/dtplite.man">dtplite</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc commands">doctoc commands</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+<a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+<a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+<a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc language">doctoc language</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+<a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+<a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+<a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc markup">doctoc markup</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+<a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+<a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+<a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctoc syntax">doctoc syntax</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+<a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+<a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctools">doctools</a></td>
+<td width="65%" class="idx-refs">
+<a href="changelog.man">doctools::changelog</a> &#183;
+<a href="apps/dtplite.man">dtplite</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctools commands">doctools commands</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+<a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+<a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+<a href="doctools_lang_syntax.man">doctools_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctools language">doctools language</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+<a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+<a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+<a href="doctools_lang_syntax.man">doctools_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-doctools markup">doctools markup</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+<a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+<a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+<a href="doctools_lang_syntax.man">doctools_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-doctools syntax">doctools syntax</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+<a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+<a href="doctools_lang_syntax.man">doctools_lang_syntax</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-document">document</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-documentation">documentation</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools.man">doctools</a> &#183;
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a>
+</td>
+</tr>
+<!-- - (E) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-E">Keywords: E</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-emacs">emacs</a></td>
+<td width="65%" class="idx-refs">
+<a href="changelog.man">doctools::changelog</a> &#183;
+<a href="cvs.man">doctools::cvs</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-examples">examples</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+<a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+<a href="doctools_lang_faq.man">doctools_lang_faq</a>
+</td>
+</tr>
+<!-- - (F) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-F">Keywords: F</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-faq">faq</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+<a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+<a href="doctools_lang_faq.man">doctools_lang_faq</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-formatter">formatter</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-formatting engine">formatting engine</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+<a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+<a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a>
+</td>
+</tr>
+<!-- - (H) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-H">Keywords: H</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-HTML">HTML</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools.man">doctools</a> &#183;
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a> &#183;
+<a href="apps/dtplite.man">dtplite</a> &#183;
+<a href="mpexpand.man">mpexpand</a>
+</td>
+</tr>
+<!-- - (I) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-I">Keywords: I</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-index">index</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_intro.man">docidx_intro</a> &#183;
+<a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+<a href="docidx.man">doctools::idx</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-index formatter">index formatter</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a>
+</td>
+</tr>
+<!-- - (K) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-K">Keywords: K</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-keyword index">keyword index</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_intro.man">docidx_intro</a> &#183;
+<a href="docidx.man">doctools::idx</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-keywords">keywords</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a>
+</td>
+</tr>
+<!-- - (L) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-L">Keywords: L</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-latex">latex</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-log">log</a></td>
+<td width="65%" class="idx-refs">
+<a href="cvs.man">doctools::cvs</a>
+</td>
+</tr>
+<!-- - (M) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-M">Keywords: M</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-manpage">manpage</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools.man">doctools</a> &#183;
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a> &#183;
+<a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a> &#183;
+<a href="apps/dtplite.man">dtplite</a> &#183;
+<a href="mpexpand.man">mpexpand</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-markup">markup</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_intro.man">docidx_intro</a> &#183;
+<a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+<a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+<a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+<a href="docidx_lang_syntax.man">docidx_lang_syntax</a> &#183;
+<a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+<a href="doctoc_intro.man">doctoc_intro</a> &#183;
+<a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+<a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+<a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+<a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a> &#183;
+<a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+<a href="doctools.man">doctools</a> &#183;
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a> &#183;
+<a href="doctools_intro.man">doctools_intro</a> &#183;
+<a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+<a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+<a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+<a href="doctools_lang_syntax.man">doctools_lang_syntax</a> &#183;
+<a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a> &#183;
+<a href="apps/dtplite.man">dtplite</a> &#183;
+<a href="mpexpand.man">mpexpand</a>
+</td>
+</tr>
+<!-- - (N) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-N">Keywords: N</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-nroff">nroff</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools.man">doctools</a> &#183;
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a> &#183;
+<a href="apps/dtplite.man">dtplite</a> &#183;
+<a href="mpexpand.man">mpexpand</a>
+</td>
+</tr>
+<!-- - (P) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-P">Keywords: P</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-plugin">plugin</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+<a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a>
+</td>
+</tr>
+<!-- - (S) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-S">Keywords: S</a></th></tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-semantic markup">semantic markup</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx_intro.man">docidx_intro</a> &#183;
+<a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+<a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+<a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+<a href="docidx_lang_syntax.man">docidx_lang_syntax</a> &#183;
+<a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+<a href="doctoc_intro.man">doctoc_intro</a> &#183;
+<a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+<a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+<a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+<a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a> &#183;
+<a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+<a href="doctools_intro.man">doctools_intro</a> &#183;
+<a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+<a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+<a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+<a href="doctools_lang_syntax.man">doctools_lang_syntax</a> &#183;
+<a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a>
+</td>
+</tr>
+<!-- - (T) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-T">Keywords: T</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-table of contents">table of contents</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctoc_intro.man">doctoc_intro</a> &#183;
+<a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+<a href="doctoc.man">doctools::toc</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-TMML">TMML</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctools.man">doctools</a> &#183;
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a> &#183;
+<a href="apps/dtplite.man">dtplite</a> &#183;
+<a href="mpexpand.man">mpexpand</a>
+</td>
+</tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-toc">toc</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctoc_intro.man">doctoc_intro</a> &#183;
+<a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+<a href="doctoc.man">doctools::toc</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-toc formatter">toc formatter</a></td>
+<td width="65%" class="idx-refs">
+<a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a>
+</td>
+</tr>
+<!-- - (W) ------------------------------------------------------ -->
+<tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-W">Keywords: W</a></th></tr>
+<tr class="idx-even">
+<td width="35%" class="idx-keyword"><a name="KW-web">web</a></td>
+<td width="65%" class="idx-refs">
+<a href="http://tcllib.sourceforge.net/doc/docidx_lang_intro.html">docidx language introduction</a>
+</td>
+</tr>
+<tr class="idx-odd">
+<td width="35%" class="idx-keyword"><a name="KW-wiki">wiki</a></td>
+<td width="65%" class="idx-refs">
+<a href="docidx.man">doctools::idx</a> &#183;
+<a href="doctoc.man">doctools::toc</a>
+</td>
+</tr>
+<!-- ------------------------------------------------------------ -->
+</table>
+<div class="idx-footer">
+<hr class="idx-navsep">
+<!-- Customization Point: footer -->
+</div>
+</div>
+</body>
+</html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-indented/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/html-indented/1_nokeys
new file mode 100644
index 0000000..9c5e23a
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-indented/1_nokeys
@@ -0,0 +1,20 @@
+<html>
+ <head>
+ <title>KWIC -- INDEX</title>
+ <style></style>
+ </head>
+
+ <body>
+ <div class="doctools">
+ <div class="idx-header">
+ <h1 class="idx-title">KWIC -- INDEX</h1>
+ <!-- Customization Point: header -->
+ <hr class="idx-navsep">
+ </div>
+ <div class="idx-footer">
+ <hr class="idx-navsep">
+ <!-- Customization Point: footer -->
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-indented/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/html-indented/2_justkeys
new file mode 100644
index 0000000..a5de5c8
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-indented/2_justkeys
@@ -0,0 +1,245 @@
+<html>
+ <head>
+ <title>Keyword Index</title>
+ <style></style>
+ </head>
+
+ <body>
+ <div class="doctools">
+ <div class="idx-header">
+ <h1 class="idx-title">Keyword Index</h1>
+ <!-- Customization Point: header -->
+ <hr class="idx-navsep">
+ <!-- - Navigation Bar ------------------------------------------- -->
+ <div class="idx-kwnav">
+ <a href="#KEYWORDS-C">C</a> &#183;
+ <a href="#KEYWORDS-D">D</a> &#183;
+ <a href="#KEYWORDS-E">E</a> &#183;
+ <a href="#KEYWORDS-F">F</a> &#183;
+ <a href="#KEYWORDS-H">H</a> &#183;
+ <a href="#KEYWORDS-I">I</a> &#183;
+ <a href="#KEYWORDS-K">K</a> &#183;
+ <a href="#KEYWORDS-L">L</a> &#183;
+ <a href="#KEYWORDS-M">M</a> &#183;
+ <a href="#KEYWORDS-N">N</a> &#183;
+ <a href="#KEYWORDS-P">P</a> &#183;
+ <a href="#KEYWORDS-S">S</a> &#183;
+ <a href="#KEYWORDS-T">T</a> &#183;
+ <a href="#KEYWORDS-W">W</a>
+ </div>
+ </div>
+ <!-- - Contents ------------------------------------------------- -->
+ <table class="idx-contents" width="100%">
+ <!-- - (C) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-C">Keywords: C</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-changelog">changelog</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-conversion">conversion</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-cvs">cvs</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-cvs log">cvs log</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (D) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-D">Keywords: D</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx">docidx</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx commands">docidx commands</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx language">docidx language</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx markup">docidx markup</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx syntax">docidx syntax</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc">doctoc</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc commands">doctoc commands</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc language">doctoc language</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc markup">doctoc markup</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc syntax">doctoc syntax</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools">doctools</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools commands">doctools commands</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools language">doctools language</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools markup">doctools markup</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools syntax">doctools syntax</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-document">document</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-documentation">documentation</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (E) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-E">Keywords: E</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-emacs">emacs</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-examples">examples</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (F) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-F">Keywords: F</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-faq">faq</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-formatter">formatter</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-formatting engine">formatting engine</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (H) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-H">Keywords: H</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-HTML">HTML</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (I) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-I">Keywords: I</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-index">index</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-index formatter">index formatter</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (K) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-K">Keywords: K</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-keyword index">keyword index</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-keywords">keywords</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (L) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-L">Keywords: L</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-latex">latex</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-log">log</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (M) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-M">Keywords: M</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-manpage">manpage</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-markup">markup</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (N) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-N">Keywords: N</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-nroff">nroff</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (P) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-P">Keywords: P</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-plugin">plugin</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (S) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-S">Keywords: S</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-semantic markup">semantic markup</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (T) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-T">Keywords: T</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-table of contents">table of contents</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-TMML">TMML</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-toc">toc</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-toc formatter">toc formatter</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- - (W) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-W">Keywords: W</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-web">web</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-wiki">wiki</a></td>
+ <td width="65%" class="idx-refs"></td>
+ </tr>
+ <!-- ------------------------------------------------------------ -->
+ </table>
+ <div class="idx-footer">
+ <hr class="idx-navsep">
+ <!-- Customization Point: footer -->
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-indented/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/html-indented/3_kwic
new file mode 100644
index 0000000..4cb9b03
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-indented/3_kwic
@@ -0,0 +1,449 @@
+<html>
+ <head>
+ <title>Keyword Index</title>
+ <style></style>
+ </head>
+
+ <body>
+ <div class="doctools">
+ <div class="idx-header">
+ <h1 class="idx-title">Keyword Index</h1>
+ <!-- Customization Point: header -->
+ <hr class="idx-navsep">
+ <!-- - Navigation Bar ------------------------------------------- -->
+ <div class="idx-kwnav">
+ <a href="#KEYWORDS-C">C</a> &#183;
+ <a href="#KEYWORDS-D">D</a> &#183;
+ <a href="#KEYWORDS-E">E</a> &#183;
+ <a href="#KEYWORDS-F">F</a> &#183;
+ <a href="#KEYWORDS-H">H</a> &#183;
+ <a href="#KEYWORDS-I">I</a> &#183;
+ <a href="#KEYWORDS-K">K</a> &#183;
+ <a href="#KEYWORDS-L">L</a> &#183;
+ <a href="#KEYWORDS-M">M</a> &#183;
+ <a href="#KEYWORDS-N">N</a> &#183;
+ <a href="#KEYWORDS-P">P</a> &#183;
+ <a href="#KEYWORDS-S">S</a> &#183;
+ <a href="#KEYWORDS-T">T</a> &#183;
+ <a href="#KEYWORDS-W">W</a>
+ </div>
+ </div>
+ <!-- - Contents ------------------------------------------------- -->
+ <table class="idx-contents" width="100%">
+ <!-- - (C) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-C">Keywords: C</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-changelog">changelog</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="changelog.man">doctools::changelog</a> &#183;
+ <a href="cvs.man">doctools::cvs</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-conversion">conversion</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools.man">doctools</a> &#183;
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a> &#183;
+ <a href="mpexpand.man">mpexpand</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-cvs">cvs</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="cvs.man">doctools::cvs</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-cvs log">cvs log</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="cvs.man">doctools::cvs</a>
+ </td>
+ </tr>
+ <!-- - (D) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-D">Keywords: D</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx">docidx</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx commands">docidx commands</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+ <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+ <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+ <a href="docidx_lang_syntax.man">docidx_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx language">docidx language</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+ <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+ <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+ <a href="docidx_lang_syntax.man">docidx_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx markup">docidx markup</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+ <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+ <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+ <a href="docidx_lang_syntax.man">docidx_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-docidx syntax">docidx syntax</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+ <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+ <a href="docidx_lang_syntax.man">docidx_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc">doctoc</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctoc.man">doctools::toc</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc commands">doctoc commands</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+ <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+ <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+ <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc language">doctoc language</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+ <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+ <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+ <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc markup">doctoc markup</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+ <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+ <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+ <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctoc syntax">doctoc syntax</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+ <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+ <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools">doctools</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="changelog.man">doctools::changelog</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools commands">doctools commands</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+ <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+ <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+ <a href="doctools_lang_syntax.man">doctools_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools language">doctools language</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+ <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+ <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+ <a href="doctools_lang_syntax.man">doctools_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools markup">doctools markup</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+ <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+ <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+ <a href="doctools_lang_syntax.man">doctools_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-doctools syntax">doctools syntax</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+ <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+ <a href="doctools_lang_syntax.man">doctools_lang_syntax</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-document">document</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-documentation">documentation</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools.man">doctools</a> &#183;
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a>
+ </td>
+ </tr>
+ <!-- - (E) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-E">Keywords: E</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-emacs">emacs</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="changelog.man">doctools::changelog</a> &#183;
+ <a href="cvs.man">doctools::cvs</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-examples">examples</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+ <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+ <a href="doctools_lang_faq.man">doctools_lang_faq</a>
+ </td>
+ </tr>
+ <!-- - (F) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-F">Keywords: F</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-faq">faq</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+ <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+ <a href="doctools_lang_faq.man">doctools_lang_faq</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-formatter">formatter</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-formatting engine">formatting engine</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+ <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+ <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a>
+ </td>
+ </tr>
+ <!-- - (H) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-H">Keywords: H</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-HTML">HTML</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools.man">doctools</a> &#183;
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a> &#183;
+ <a href="mpexpand.man">mpexpand</a>
+ </td>
+ </tr>
+ <!-- - (I) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-I">Keywords: I</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-index">index</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_intro.man">docidx_intro</a> &#183;
+ <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+ <a href="docidx.man">doctools::idx</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-index formatter">index formatter</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a>
+ </td>
+ </tr>
+ <!-- - (K) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-K">Keywords: K</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-keyword index">keyword index</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_intro.man">docidx_intro</a> &#183;
+ <a href="docidx.man">doctools::idx</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-keywords">keywords</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a>
+ </td>
+ </tr>
+ <!-- - (L) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-L">Keywords: L</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-latex">latex</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-log">log</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="cvs.man">doctools::cvs</a>
+ </td>
+ </tr>
+ <!-- - (M) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-M">Keywords: M</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-manpage">manpage</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools.man">doctools</a> &#183;
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a> &#183;
+ <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a> &#183;
+ <a href="mpexpand.man">mpexpand</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-markup">markup</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_intro.man">docidx_intro</a> &#183;
+ <a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+ <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+ <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+ <a href="docidx_lang_syntax.man">docidx_lang_syntax</a> &#183;
+ <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+ <a href="doctoc_intro.man">doctoc_intro</a> &#183;
+ <a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+ <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+ <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+ <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a> &#183;
+ <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+ <a href="doctools.man">doctools</a> &#183;
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a> &#183;
+ <a href="doctools_intro.man">doctools_intro</a> &#183;
+ <a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+ <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+ <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+ <a href="doctools_lang_syntax.man">doctools_lang_syntax</a> &#183;
+ <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a> &#183;
+ <a href="mpexpand.man">mpexpand</a>
+ </td>
+ </tr>
+ <!-- - (N) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-N">Keywords: N</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-nroff">nroff</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools.man">doctools</a> &#183;
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a> &#183;
+ <a href="mpexpand.man">mpexpand</a>
+ </td>
+ </tr>
+ <!-- - (P) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-P">Keywords: P</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-plugin">plugin</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+ <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a>
+ </td>
+ </tr>
+ <!-- - (S) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-S">Keywords: S</a></th></tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-semantic markup">semantic markup</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx_intro.man">docidx_intro</a> &#183;
+ <a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183;
+ <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183;
+ <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183;
+ <a href="docidx_lang_syntax.man">docidx_lang_syntax</a> &#183;
+ <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183;
+ <a href="doctoc_intro.man">doctoc_intro</a> &#183;
+ <a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183;
+ <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183;
+ <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183;
+ <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a> &#183;
+ <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+ <a href="doctools_intro.man">doctools_intro</a> &#183;
+ <a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183;
+ <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183;
+ <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183;
+ <a href="doctools_lang_syntax.man">doctools_lang_syntax</a> &#183;
+ <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a>
+ </td>
+ </tr>
+ <!-- - (T) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-T">Keywords: T</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-table of contents">table of contents</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctoc_intro.man">doctoc_intro</a> &#183;
+ <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+ <a href="doctoc.man">doctools::toc</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-TMML">TMML</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctools.man">doctools</a> &#183;
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a> &#183;
+ <a href="apps/dtplite.man">dtplite</a> &#183;
+ <a href="mpexpand.man">mpexpand</a>
+ </td>
+ </tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-toc">toc</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctoc_intro.man">doctoc_intro</a> &#183;
+ <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183;
+ <a href="doctoc.man">doctools::toc</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-toc formatter">toc formatter</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a>
+ </td>
+ </tr>
+ <!-- - (W) ------------------------------------------------------ -->
+ <tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-W">Keywords: W</a></th></tr>
+ <tr class="idx-even">
+ <td width="35%" class="idx-keyword"><a name="KW-web">web</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="http://tcllib.sourceforge.net/doc/docidx_lang_intro.html">docidx language introduction</a>
+ </td>
+ </tr>
+ <tr class="idx-odd">
+ <td width="35%" class="idx-keyword"><a name="KW-wiki">wiki</a></td>
+ <td width="65%" class="idx-refs">
+ <a href="docidx.man">doctools::idx</a> &#183;
+ <a href="doctoc.man">doctools::toc</a>
+ </td>
+ </tr>
+ <!-- ------------------------------------------------------------ -->
+ </table>
+ <div class="idx-footer">
+ <hr class="idx-navsep">
+ <!-- Customization Point: footer -->
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/1_nokeys
new file mode 100644
index 0000000..5539a6c
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/1_nokeys
@@ -0,0 +1 @@
+<html><head><title>KWIC -- INDEX</title><style></style></head><body><div class="doctools"><div class="idx-header"><h1 class="idx-title">KWIC -- INDEX</h1><hr class="idx-navsep"></div><div class="idx-footer"><hr class="idx-navsep"></div></div></body></html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/2_justkeys
new file mode 100644
index 0000000..c2dfa8c
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/2_justkeys
@@ -0,0 +1 @@
+<html><head><title>Keyword Index</title><style></style></head><body><div class="doctools"><div class="idx-header"><h1 class="idx-title">Keyword Index</h1><hr class="idx-navsep"><div class="idx-kwnav"><a href="#KEYWORDS-C">C</a> &#183; <a href="#KEYWORDS-D">D</a> &#183; <a href="#KEYWORDS-E">E</a> &#183; <a href="#KEYWORDS-F">F</a> &#183; <a href="#KEYWORDS-H">H</a> &#183; <a href="#KEYWORDS-I">I</a> &#183; <a href="#KEYWORDS-K">K</a> &#183; <a href="#KEYWORDS-L">L</a> &#183; <a href="#KEYWORDS-M">M</a> &#183; <a href="#KEYWORDS-N">N</a> &#183; <a href="#KEYWORDS-P">P</a> &#183; <a href="#KEYWORDS-S">S</a> &#183; <a href="#KEYWORDS-T">T</a> &#183; <a href="#KEYWORDS-W">W</a></div></div><table class="idx-contents" width="100%"><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-C">Keywords: C</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-changelog">changelog</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-conversion">conversion</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-cvs">cvs</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-cvs log">cvs log</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-D">Keywords: D</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-docidx">docidx</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-docidx commands">docidx commands</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-docidx language">docidx language</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-docidx markup">docidx markup</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-docidx syntax">docidx syntax</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctoc">doctoc</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctoc commands">doctoc commands</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctoc language">doctoc language</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctoc markup">doctoc markup</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctoc syntax">doctoc syntax</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctools">doctools</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctools commands">doctools commands</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctools language">doctools language</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctools markup">doctools markup</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctools syntax">doctools syntax</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-document">document</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-documentation">documentation</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-E">Keywords: E</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-emacs">emacs</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-examples">examples</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-F">Keywords: F</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-faq">faq</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-formatter">formatter</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-formatting engine">formatting engine</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-H">Keywords: H</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-HTML">HTML</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-I">Keywords: I</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-index">index</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-index formatter">index formatter</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-K">Keywords: K</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-keyword index">keyword index</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-keywords">keywords</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-L">Keywords: L</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-latex">latex</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-log">log</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-M">Keywords: M</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-manpage">manpage</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-markup">markup</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-N">Keywords: N</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-nroff">nroff</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-P">Keywords: P</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-plugin">plugin</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-S">Keywords: S</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-semantic markup">semantic markup</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-T">Keywords: T</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-table of contents">table of contents</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-TMML">TMML</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-toc">toc</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-toc formatter">toc formatter</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-W">Keywords: W</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-web">web</a></td><td width="65%" class="idx-refs"></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-wiki">wiki</a></td><td width="65%" class="idx-refs"></td></tr></table><div class="idx-footer"><hr class="idx-navsep"></div></div></body></html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/3_kwic
new file mode 100644
index 0000000..df53309
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/html-ultracompact/3_kwic
@@ -0,0 +1 @@
+<html><head><title>Keyword Index</title><style></style></head><body><div class="doctools"><div class="idx-header"><h1 class="idx-title">Keyword Index</h1><hr class="idx-navsep"><div class="idx-kwnav"><a href="#KEYWORDS-C">C</a> &#183; <a href="#KEYWORDS-D">D</a> &#183; <a href="#KEYWORDS-E">E</a> &#183; <a href="#KEYWORDS-F">F</a> &#183; <a href="#KEYWORDS-H">H</a> &#183; <a href="#KEYWORDS-I">I</a> &#183; <a href="#KEYWORDS-K">K</a> &#183; <a href="#KEYWORDS-L">L</a> &#183; <a href="#KEYWORDS-M">M</a> &#183; <a href="#KEYWORDS-N">N</a> &#183; <a href="#KEYWORDS-P">P</a> &#183; <a href="#KEYWORDS-S">S</a> &#183; <a href="#KEYWORDS-T">T</a> &#183; <a href="#KEYWORDS-W">W</a></div></div><table class="idx-contents" width="100%"><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-C">Keywords: C</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-changelog">changelog</a></td><td width="65%" class="idx-refs"><a href="changelog.man">doctools::changelog</a> &#183; <a href="cvs.man">doctools::cvs</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-conversion">conversion</a></td><td width="65%" class="idx-refs"><a href="doctools.man">doctools</a> &#183; <a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a> &#183; <a href="apps/dtplite.man">dtplite</a> &#183; <a href="mpexpand.man">mpexpand</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-cvs">cvs</a></td><td width="65%" class="idx-refs"><a href="cvs.man">doctools::cvs</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-cvs log">cvs log</a></td><td width="65%" class="idx-refs"><a href="cvs.man">doctools::cvs</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-D">Keywords: D</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-docidx">docidx</a></td><td width="65%" class="idx-refs"><a href="docidx.man">doctools::idx</a> &#183; <a href="apps/dtplite.man">dtplite</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-docidx commands">docidx commands</a></td><td width="65%" class="idx-refs"><a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183; <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183; <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183; <a href="docidx_lang_syntax.man">docidx_lang_syntax</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-docidx language">docidx language</a></td><td width="65%" class="idx-refs"><a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183; <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183; <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183; <a href="docidx_lang_syntax.man">docidx_lang_syntax</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-docidx markup">docidx markup</a></td><td width="65%" class="idx-refs"><a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183; <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183; <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183; <a href="docidx_lang_syntax.man">docidx_lang_syntax</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-docidx syntax">docidx syntax</a></td><td width="65%" class="idx-refs"><a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183; <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183; <a href="docidx_lang_syntax.man">docidx_lang_syntax</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctoc">doctoc</a></td><td width="65%" class="idx-refs"><a href="doctoc.man">doctools::toc</a> &#183; <a href="apps/dtplite.man">dtplite</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctoc commands">doctoc commands</a></td><td width="65%" class="idx-refs"><a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183; <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183; <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183; <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctoc language">doctoc language</a></td><td width="65%" class="idx-refs"><a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183; <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183; <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183; <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctoc markup">doctoc markup</a></td><td width="65%" class="idx-refs"><a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183; <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183; <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183; <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctoc syntax">doctoc syntax</a></td><td width="65%" class="idx-refs"><a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183; <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183; <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctools">doctools</a></td><td width="65%" class="idx-refs"><a href="changelog.man">doctools::changelog</a> &#183; <a href="apps/dtplite.man">dtplite</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctools commands">doctools commands</a></td><td width="65%" class="idx-refs"><a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183; <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183; <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183; <a href="doctools_lang_syntax.man">doctools_lang_syntax</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctools language">doctools language</a></td><td width="65%" class="idx-refs"><a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183; <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183; <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183; <a href="doctools_lang_syntax.man">doctools_lang_syntax</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-doctools markup">doctools markup</a></td><td width="65%" class="idx-refs"><a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183; <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183; <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183; <a href="doctools_lang_syntax.man">doctools_lang_syntax</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-doctools syntax">doctools syntax</a></td><td width="65%" class="idx-refs"><a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183; <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183; <a href="doctools_lang_syntax.man">doctools_lang_syntax</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-document">document</a></td><td width="65%" class="idx-refs"><a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-documentation">documentation</a></td><td width="65%" class="idx-refs"><a href="doctools.man">doctools</a> &#183; <a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-E">Keywords: E</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-emacs">emacs</a></td><td width="65%" class="idx-refs"><a href="changelog.man">doctools::changelog</a> &#183; <a href="cvs.man">doctools::cvs</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-examples">examples</a></td><td width="65%" class="idx-refs"><a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183; <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183; <a href="doctools_lang_faq.man">doctools_lang_faq</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-F">Keywords: F</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-faq">faq</a></td><td width="65%" class="idx-refs"><a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183; <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183; <a href="doctools_lang_faq.man">doctools_lang_faq</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-formatter">formatter</a></td><td width="65%" class="idx-refs"><a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-formatting engine">formatting engine</a></td><td width="65%" class="idx-refs"><a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183; <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183; <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-H">Keywords: H</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-HTML">HTML</a></td><td width="65%" class="idx-refs"><a href="doctools.man">doctools</a> &#183; <a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a> &#183; <a href="apps/dtplite.man">dtplite</a> &#183; <a href="mpexpand.man">mpexpand</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-I">Keywords: I</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-index">index</a></td><td width="65%" class="idx-refs"><a href="docidx_intro.man">docidx_intro</a> &#183; <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183; <a href="docidx.man">doctools::idx</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-index formatter">index formatter</a></td><td width="65%" class="idx-refs"><a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-K">Keywords: K</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-keyword index">keyword index</a></td><td width="65%" class="idx-refs"><a href="docidx_intro.man">docidx_intro</a> &#183; <a href="docidx.man">doctools::idx</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-keywords">keywords</a></td><td width="65%" class="idx-refs"><a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-L">Keywords: L</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-latex">latex</a></td><td width="65%" class="idx-refs"><a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-log">log</a></td><td width="65%" class="idx-refs"><a href="cvs.man">doctools::cvs</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-M">Keywords: M</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-manpage">manpage</a></td><td width="65%" class="idx-refs"><a href="doctools.man">doctools</a> &#183; <a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a> &#183; <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a> &#183; <a href="apps/dtplite.man">dtplite</a> &#183; <a href="mpexpand.man">mpexpand</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-markup">markup</a></td><td width="65%" class="idx-refs"><a href="docidx_intro.man">docidx_intro</a> &#183; <a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183; <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183; <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183; <a href="docidx_lang_syntax.man">docidx_lang_syntax</a> &#183; <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183; <a href="doctoc_intro.man">doctoc_intro</a> &#183; <a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183; <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183; <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183; <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a> &#183; <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183; <a href="doctools.man">doctools</a> &#183; <a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a> &#183; <a href="doctools_intro.man">doctools_intro</a> &#183; <a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183; <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183; <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183; <a href="doctools_lang_syntax.man">doctools_lang_syntax</a> &#183; <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a> &#183; <a href="apps/dtplite.man">dtplite</a> &#183; <a href="mpexpand.man">mpexpand</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-N">Keywords: N</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-nroff">nroff</a></td><td width="65%" class="idx-refs"><a href="doctools.man">doctools</a> &#183; <a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a> &#183; <a href="apps/dtplite.man">dtplite</a> &#183; <a href="mpexpand.man">mpexpand</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-P">Keywords: P</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-plugin">plugin</a></td><td width="65%" class="idx-refs"><a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183; <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-S">Keywords: S</a></th></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-semantic markup">semantic markup</a></td><td width="65%" class="idx-refs"><a href="docidx_intro.man">docidx_intro</a> &#183; <a href="docidx_lang_cmdref.man">docidx_lang_cmdref</a> &#183; <a href="docidx_lang_faq.man">docidx_lang_faq</a> &#183; <a href="docidx_lang_intro.man">docidx_lang_intro</a> &#183; <a href="docidx_lang_syntax.man">docidx_lang_syntax</a> &#183; <a href="docidx_plugin_apiref.man">docidx_plugin_apiref</a> &#183; <a href="doctoc_intro.man">doctoc_intro</a> &#183; <a href="doctoc_lang_cmdref.man">doctoc_lang_cmdref</a> &#183; <a href="doctoc_lang_faq.man">doctoc_lang_faq</a> &#183; <a href="doctoc_lang_intro.man">doctoc_lang_intro</a> &#183; <a href="doctoc_lang_syntax.man">doctoc_lang_syntax</a> &#183; <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183; <a href="doctools_intro.man">doctools_intro</a> &#183; <a href="doctools_lang_cmdref.man">doctools_lang_cmdref</a> &#183; <a href="doctools_lang_faq.man">doctools_lang_faq</a> &#183; <a href="doctools_lang_intro.man">doctools_lang_intro</a> &#183; <a href="doctools_lang_syntax.man">doctools_lang_syntax</a> &#183; <a href="doctools_plugin_apiref.man">doctools_plugin_apiref</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-T">Keywords: T</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-table of contents">table of contents</a></td><td width="65%" class="idx-refs"><a href="doctoc_intro.man">doctoc_intro</a> &#183; <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183; <a href="doctoc.man">doctools::toc</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-TMML">TMML</a></td><td width="65%" class="idx-refs"><a href="doctools.man">doctools</a> &#183; <a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a> &#183; <a href="apps/dtplite.man">dtplite</a> &#183; <a href="mpexpand.man">mpexpand</a></td></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-toc">toc</a></td><td width="65%" class="idx-refs"><a href="doctoc_intro.man">doctoc_intro</a> &#183; <a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a> &#183; <a href="doctoc.man">doctools::toc</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-toc formatter">toc formatter</a></td><td width="65%" class="idx-refs"><a href="doctoc_plugin_apiref.man">doctoc_plugin_apiref</a></td></tr><tr class="idx-leader"><th colspan="2"><a name="KEYWORDS-W">Keywords: W</a></th></tr><tr class="idx-even"><td width="35%" class="idx-keyword"><a name="KW-web">web</a></td><td width="65%" class="idx-refs"><a href="http://tcllib.sourceforge.net/doc/docidx_lang_intro.html">docidx language introduction</a></td></tr><tr class="idx-odd"><td width="35%" class="idx-keyword"><a name="KW-wiki">wiki</a></td><td width="65%" class="idx-refs"><a href="docidx.man">doctools::idx</a> &#183; <a href="doctoc.man">doctools::toc</a></td></tr></table><div class="idx-footer"><hr class="idx-navsep"></div></div></body></html>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/1_nokeys
new file mode 100644
index 0000000..1a957dd
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/1_nokeys
@@ -0,0 +1,8 @@
+{
+ "doctools::idx" : {
+ "label" : "KWIC",
+ "keywords" : {},
+ "references" : {},
+ "title" : "INDEX"
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/2_justkeys
new file mode 100644
index 0000000..67a7e19
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/2_justkeys
@@ -0,0 +1,53 @@
+{
+ "doctools::idx" : {
+ "label" : "Keyword Index",
+ "keywords" : {
+ "changelog" : [],
+ "conversion" : [],
+ "cvs" : [],
+ "cvs log" : [],
+ "docidx" : [],
+ "docidx commands" : [],
+ "docidx language" : [],
+ "docidx markup" : [],
+ "docidx syntax" : [],
+ "doctoc" : [],
+ "doctoc commands" : [],
+ "doctoc language" : [],
+ "doctoc markup" : [],
+ "doctoc syntax" : [],
+ "doctools" : [],
+ "doctools commands" : [],
+ "doctools language" : [],
+ "doctools markup" : [],
+ "doctools syntax" : [],
+ "document" : [],
+ "documentation" : [],
+ "emacs" : [],
+ "examples" : [],
+ "faq" : [],
+ "formatter" : [],
+ "formatting engine" : [],
+ "HTML" : [],
+ "index" : [],
+ "index formatter" : [],
+ "keyword index" : [],
+ "keywords" : [],
+ "latex" : [],
+ "log" : [],
+ "manpage" : [],
+ "markup" : [],
+ "nroff" : [],
+ "plugin" : [],
+ "semantic markup" : [],
+ "table of contents" : [],
+ "TMML" : [],
+ "toc" : [],
+ "toc formatter" : [],
+ "web" : [],
+ "wiki" : []
+ },
+ "references" : {},
+ "title" : ""
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/3_kwic
new file mode 100644
index 0000000..7083936
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-indalign/3_kwic
@@ -0,0 +1,80 @@
+{
+ "doctools::idx" : {
+ "label" : "Keyword Index",
+ "keywords" : {
+ "changelog" : ["changelog.man","cvs.man"],
+ "conversion" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "cvs" : ["cvs.man"],
+ "cvs log" : ["cvs.man"],
+ "docidx" : ["docidx.man","apps\/dtplite.man"],
+ "docidx commands" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "docidx language" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "docidx markup" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "docidx syntax" : ["docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "doctoc" : ["doctoc.man","apps\/dtplite.man"],
+ "doctoc commands" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "doctoc language" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "doctoc markup" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "doctoc syntax" : ["doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "doctools" : ["changelog.man","apps\/dtplite.man"],
+ "doctools commands" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "doctools language" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "doctools markup" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "doctools syntax" : ["doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "document" : ["doctools_plugin_apiref.man"],
+ "documentation" : ["doctools.man","docidx.man","doctoc.man"],
+ "emacs" : ["changelog.man","cvs.man"],
+ "examples" : ["docidx_lang_faq.man","doctoc_lang_faq.man","doctools_lang_faq.man"],
+ "faq" : ["docidx_lang_faq.man","doctoc_lang_faq.man","doctools_lang_faq.man"],
+ "formatter" : ["doctools_plugin_apiref.man"],
+ "formatting engine" : ["docidx_plugin_apiref.man","doctoc_plugin_apiref.man","doctools_plugin_apiref.man"],
+ "HTML" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "index" : ["docidx_intro.man","docidx_plugin_apiref.man","docidx.man"],
+ "index formatter" : ["docidx_plugin_apiref.man"],
+ "keyword index" : ["docidx_intro.man","docidx.man"],
+ "keywords" : ["docidx_plugin_apiref.man"],
+ "latex" : ["docidx.man","doctoc.man"],
+ "log" : ["cvs.man"],
+ "manpage" : ["doctools.man","docidx.man","doctoc.man","doctools_plugin_apiref.man","apps\/dtplite.man","mpexpand.man"],
+ "markup" : ["docidx_intro.man","docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man","docidx_plugin_apiref.man","doctoc_intro.man","doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man","doctoc_plugin_apiref.man","doctools.man","docidx.man","doctoc.man","doctools_intro.man","doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man","doctools_plugin_apiref.man","apps\/dtplite.man","mpexpand.man"],
+ "nroff" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "plugin" : ["docidx_plugin_apiref.man","doctoc_plugin_apiref.man"],
+ "semantic markup" : ["docidx_intro.man","docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man","docidx_plugin_apiref.man","doctoc_intro.man","doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man","doctoc_plugin_apiref.man","doctools_intro.man","doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man","doctools_plugin_apiref.man"],
+ "table of contents" : ["doctoc_intro.man","doctoc_plugin_apiref.man","doctoc.man"],
+ "TMML" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "toc" : ["doctoc_intro.man","doctoc_plugin_apiref.man","doctoc.man"],
+ "toc formatter" : ["doctoc_plugin_apiref.man"],
+ "web" : ["http:\/\/tcllib.sourceforge.net\/doc\/docidx_lang_intro.html"],
+ "wiki" : ["docidx.man","doctoc.man"]
+ },
+ "references" : {
+ "apps\/dtplite.man" : ["manpage","dtplite"],
+ "changelog.man" : ["manpage","doctools::changelog"],
+ "cvs.man" : ["manpage","doctools::cvs"],
+ "docidx.man" : ["manpage","doctools::idx"],
+ "docidx_intro.man" : ["manpage","docidx_intro"],
+ "docidx_lang_cmdref.man" : ["manpage","docidx_lang_cmdref"],
+ "docidx_lang_faq.man" : ["manpage","docidx_lang_faq"],
+ "docidx_lang_intro.man" : ["manpage","docidx_lang_intro"],
+ "docidx_lang_syntax.man" : ["manpage","docidx_lang_syntax"],
+ "docidx_plugin_apiref.man" : ["manpage","docidx_plugin_apiref"],
+ "doctoc.man" : ["manpage","doctools::toc"],
+ "doctoc_intro.man" : ["manpage","doctoc_intro"],
+ "doctoc_lang_cmdref.man" : ["manpage","doctoc_lang_cmdref"],
+ "doctoc_lang_faq.man" : ["manpage","doctoc_lang_faq"],
+ "doctoc_lang_intro.man" : ["manpage","doctoc_lang_intro"],
+ "doctoc_lang_syntax.man" : ["manpage","doctoc_lang_syntax"],
+ "doctoc_plugin_apiref.man" : ["manpage","doctoc_plugin_apiref"],
+ "doctools.man" : ["manpage","doctools"],
+ "doctools_intro.man" : ["manpage","doctools_intro"],
+ "doctools_lang_cmdref.man" : ["manpage","doctools_lang_cmdref"],
+ "doctools_lang_faq.man" : ["manpage","doctools_lang_faq"],
+ "doctools_lang_intro.man" : ["manpage","doctools_lang_intro"],
+ "doctools_lang_syntax.man" : ["manpage","doctools_lang_syntax"],
+ "doctools_plugin_apiref.man" : ["manpage","doctools_plugin_apiref"],
+ "http:\/\/tcllib.sourceforge.net\/doc\/docidx_lang_intro.html" : ["url" ,"docidx language introduction"],
+ "mpexpand.man" : ["manpage","mpexpand"]
+ },
+ "title" : ""
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-indented/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/json-indented/1_nokeys
new file mode 100644
index 0000000..bffac8c
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-indented/1_nokeys
@@ -0,0 +1,8 @@
+{
+ "doctools::idx" : {
+ "label" : "KWIC",
+ "keywords" : {},
+ "references" : {},
+ "title" : "INDEX"
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-indented/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/json-indented/2_justkeys
new file mode 100644
index 0000000..f256ab0
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-indented/2_justkeys
@@ -0,0 +1,53 @@
+{
+ "doctools::idx" : {
+ "label" : "Keyword Index",
+ "keywords" : {
+ "changelog" : [],
+ "conversion" : [],
+ "cvs" : [],
+ "cvs log" : [],
+ "docidx" : [],
+ "docidx commands" : [],
+ "docidx language" : [],
+ "docidx markup" : [],
+ "docidx syntax" : [],
+ "doctoc" : [],
+ "doctoc commands" : [],
+ "doctoc language" : [],
+ "doctoc markup" : [],
+ "doctoc syntax" : [],
+ "doctools" : [],
+ "doctools commands" : [],
+ "doctools language" : [],
+ "doctools markup" : [],
+ "doctools syntax" : [],
+ "document" : [],
+ "documentation" : [],
+ "emacs" : [],
+ "examples" : [],
+ "faq" : [],
+ "formatter" : [],
+ "formatting engine" : [],
+ "HTML" : [],
+ "index" : [],
+ "index formatter" : [],
+ "keyword index" : [],
+ "keywords" : [],
+ "latex" : [],
+ "log" : [],
+ "manpage" : [],
+ "markup" : [],
+ "nroff" : [],
+ "plugin" : [],
+ "semantic markup" : [],
+ "table of contents" : [],
+ "TMML" : [],
+ "toc" : [],
+ "toc formatter" : [],
+ "web" : [],
+ "wiki" : []
+ },
+ "references" : {},
+ "title" : ""
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-indented/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/json-indented/3_kwic
new file mode 100644
index 0000000..3083fec
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-indented/3_kwic
@@ -0,0 +1,80 @@
+{
+ "doctools::idx" : {
+ "label" : "Keyword Index",
+ "keywords" : {
+ "changelog" : ["changelog.man","cvs.man"],
+ "conversion" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "cvs" : ["cvs.man"],
+ "cvs log" : ["cvs.man"],
+ "docidx" : ["docidx.man","apps\/dtplite.man"],
+ "docidx commands" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "docidx language" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "docidx markup" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "docidx syntax" : ["docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "doctoc" : ["doctoc.man","apps\/dtplite.man"],
+ "doctoc commands" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "doctoc language" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "doctoc markup" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "doctoc syntax" : ["doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "doctools" : ["changelog.man","apps\/dtplite.man"],
+ "doctools commands" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "doctools language" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "doctools markup" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "doctools syntax" : ["doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "document" : ["doctools_plugin_apiref.man"],
+ "documentation" : ["doctools.man","docidx.man","doctoc.man"],
+ "emacs" : ["changelog.man","cvs.man"],
+ "examples" : ["docidx_lang_faq.man","doctoc_lang_faq.man","doctools_lang_faq.man"],
+ "faq" : ["docidx_lang_faq.man","doctoc_lang_faq.man","doctools_lang_faq.man"],
+ "formatter" : ["doctools_plugin_apiref.man"],
+ "formatting engine" : ["docidx_plugin_apiref.man","doctoc_plugin_apiref.man","doctools_plugin_apiref.man"],
+ "HTML" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "index" : ["docidx_intro.man","docidx_plugin_apiref.man","docidx.man"],
+ "index formatter" : ["docidx_plugin_apiref.man"],
+ "keyword index" : ["docidx_intro.man","docidx.man"],
+ "keywords" : ["docidx_plugin_apiref.man"],
+ "latex" : ["docidx.man","doctoc.man"],
+ "log" : ["cvs.man"],
+ "manpage" : ["doctools.man","docidx.man","doctoc.man","doctools_plugin_apiref.man","apps\/dtplite.man","mpexpand.man"],
+ "markup" : ["docidx_intro.man","docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man","docidx_plugin_apiref.man","doctoc_intro.man","doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man","doctoc_plugin_apiref.man","doctools.man","docidx.man","doctoc.man","doctools_intro.man","doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man","doctools_plugin_apiref.man","apps\/dtplite.man","mpexpand.man"],
+ "nroff" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "plugin" : ["docidx_plugin_apiref.man","doctoc_plugin_apiref.man"],
+ "semantic markup" : ["docidx_intro.man","docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man","docidx_plugin_apiref.man","doctoc_intro.man","doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man","doctoc_plugin_apiref.man","doctools_intro.man","doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man","doctools_plugin_apiref.man"],
+ "table of contents" : ["doctoc_intro.man","doctoc_plugin_apiref.man","doctoc.man"],
+ "TMML" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "toc" : ["doctoc_intro.man","doctoc_plugin_apiref.man","doctoc.man"],
+ "toc formatter" : ["doctoc_plugin_apiref.man"],
+ "web" : ["http:\/\/tcllib.sourceforge.net\/doc\/docidx_lang_intro.html"],
+ "wiki" : ["docidx.man","doctoc.man"]
+ },
+ "references" : {
+ "apps\/dtplite.man" : ["manpage","dtplite"],
+ "changelog.man" : ["manpage","doctools::changelog"],
+ "cvs.man" : ["manpage","doctools::cvs"],
+ "docidx.man" : ["manpage","doctools::idx"],
+ "docidx_intro.man" : ["manpage","docidx_intro"],
+ "docidx_lang_cmdref.man" : ["manpage","docidx_lang_cmdref"],
+ "docidx_lang_faq.man" : ["manpage","docidx_lang_faq"],
+ "docidx_lang_intro.man" : ["manpage","docidx_lang_intro"],
+ "docidx_lang_syntax.man" : ["manpage","docidx_lang_syntax"],
+ "docidx_plugin_apiref.man" : ["manpage","docidx_plugin_apiref"],
+ "doctoc.man" : ["manpage","doctools::toc"],
+ "doctoc_intro.man" : ["manpage","doctoc_intro"],
+ "doctoc_lang_cmdref.man" : ["manpage","doctoc_lang_cmdref"],
+ "doctoc_lang_faq.man" : ["manpage","doctoc_lang_faq"],
+ "doctoc_lang_intro.man" : ["manpage","doctoc_lang_intro"],
+ "doctoc_lang_syntax.man" : ["manpage","doctoc_lang_syntax"],
+ "doctoc_plugin_apiref.man" : ["manpage","doctoc_plugin_apiref"],
+ "doctools.man" : ["manpage","doctools"],
+ "doctools_intro.man" : ["manpage","doctools_intro"],
+ "doctools_lang_cmdref.man" : ["manpage","doctools_lang_cmdref"],
+ "doctools_lang_faq.man" : ["manpage","doctools_lang_faq"],
+ "doctools_lang_intro.man" : ["manpage","doctools_lang_intro"],
+ "doctools_lang_syntax.man" : ["manpage","doctools_lang_syntax"],
+ "doctools_plugin_apiref.man" : ["manpage","doctools_plugin_apiref"],
+ "http:\/\/tcllib.sourceforge.net\/doc\/docidx_lang_intro.html" : ["url","docidx language introduction"],
+ "mpexpand.man" : ["manpage","mpexpand"]
+ },
+ "title" : ""
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/1_nokeys
new file mode 100644
index 0000000..889bc50
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/1_nokeys
@@ -0,0 +1 @@
+{"doctools::idx":{"label":"KWIC","keywords":{},"references":{},"title":"INDEX"}}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/2_justkeys
new file mode 100644
index 0000000..7c65c99
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/2_justkeys
@@ -0,0 +1 @@
+{"doctools::idx":{"label":"Keyword Index","keywords":{"changelog":[],"conversion":[],"cvs":[],"cvs log":[],"docidx":[],"docidx commands":[],"docidx language":[],"docidx markup":[],"docidx syntax":[],"doctoc":[],"doctoc commands":[],"doctoc language":[],"doctoc markup":[],"doctoc syntax":[],"doctools":[],"doctools commands":[],"doctools language":[],"doctools markup":[],"doctools syntax":[],"document":[],"documentation":[],"emacs":[],"examples":[],"faq":[],"formatter":[],"formatting engine":[],"HTML":[],"index":[],"index formatter":[],"keyword index":[],"keywords":[],"latex":[],"log":[],"manpage":[],"markup":[],"nroff":[],"plugin":[],"semantic markup":[],"table of contents":[],"TMML":[],"toc":[],"toc formatter":[],"web":[],"wiki":[]},"references":{},"title":""}}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/3_kwic
new file mode 100644
index 0000000..bb7f35b
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json-ultracompact/3_kwic
@@ -0,0 +1 @@
+{"doctools::idx":{"label":"Keyword Index","keywords":{"changelog":["changelog.man","cvs.man"],"conversion":["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],"cvs":["cvs.man"],"cvs log":["cvs.man"],"docidx":["docidx.man","apps\/dtplite.man"],"docidx commands":["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],"docidx language":["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],"docidx markup":["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],"docidx syntax":["docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],"doctoc":["doctoc.man","apps\/dtplite.man"],"doctoc commands":["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],"doctoc language":["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],"doctoc markup":["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],"doctoc syntax":["doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],"doctools":["changelog.man","apps\/dtplite.man"],"doctools commands":["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],"doctools language":["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],"doctools markup":["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],"doctools syntax":["doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],"document":["doctools_plugin_apiref.man"],"documentation":["doctools.man","docidx.man","doctoc.man"],"emacs":["changelog.man","cvs.man"],"examples":["docidx_lang_faq.man","doctoc_lang_faq.man","doctools_lang_faq.man"],"faq":["docidx_lang_faq.man","doctoc_lang_faq.man","doctools_lang_faq.man"],"formatter":["doctools_plugin_apiref.man"],"formatting engine":["docidx_plugin_apiref.man","doctoc_plugin_apiref.man","doctools_plugin_apiref.man"],"HTML":["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],"index":["docidx_intro.man","docidx_plugin_apiref.man","docidx.man"],"index formatter":["docidx_plugin_apiref.man"],"keyword index":["docidx_intro.man","docidx.man"],"keywords":["docidx_plugin_apiref.man"],"latex":["docidx.man","doctoc.man"],"log":["cvs.man"],"manpage":["doctools.man","docidx.man","doctoc.man","doctools_plugin_apiref.man","apps\/dtplite.man","mpexpand.man"],"markup":["docidx_intro.man","docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man","docidx_plugin_apiref.man","doctoc_intro.man","doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man","doctoc_plugin_apiref.man","doctools.man","docidx.man","doctoc.man","doctools_intro.man","doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man","doctools_plugin_apiref.man","apps\/dtplite.man","mpexpand.man"],"nroff":["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],"plugin":["docidx_plugin_apiref.man","doctoc_plugin_apiref.man"],"semantic markup":["docidx_intro.man","docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man","docidx_plugin_apiref.man","doctoc_intro.man","doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man","doctoc_plugin_apiref.man","doctools_intro.man","doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man","doctools_plugin_apiref.man"],"table of contents":["doctoc_intro.man","doctoc_plugin_apiref.man","doctoc.man"],"TMML":["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],"toc":["doctoc_intro.man","doctoc_plugin_apiref.man","doctoc.man"],"toc formatter":["doctoc_plugin_apiref.man"],"web":["http:\/\/tcllib.sourceforge.net\/doc\/docidx_lang_intro.html"],"wiki":["docidx.man","doctoc.man"]},"references":{"apps\/dtplite.man":["manpage","dtplite"],"changelog.man":["manpage","doctools::changelog"],"cvs.man":["manpage","doctools::cvs"],"docidx.man":["manpage","doctools::idx"],"docidx_intro.man":["manpage","docidx_intro"],"docidx_lang_cmdref.man":["manpage","docidx_lang_cmdref"],"docidx_lang_faq.man":["manpage","docidx_lang_faq"],"docidx_lang_intro.man":["manpage","docidx_lang_intro"],"docidx_lang_syntax.man":["manpage","docidx_lang_syntax"],"docidx_plugin_apiref.man":["manpage","docidx_plugin_apiref"],"doctoc.man":["manpage","doctools::toc"],"doctoc_intro.man":["manpage","doctoc_intro"],"doctoc_lang_cmdref.man":["manpage","doctoc_lang_cmdref"],"doctoc_lang_faq.man":["manpage","doctoc_lang_faq"],"doctoc_lang_intro.man":["manpage","doctoc_lang_intro"],"doctoc_lang_syntax.man":["manpage","doctoc_lang_syntax"],"doctoc_plugin_apiref.man":["manpage","doctoc_plugin_apiref"],"doctools.man":["manpage","doctools"],"doctools_intro.man":["manpage","doctools_intro"],"doctools_lang_cmdref.man":["manpage","doctools_lang_cmdref"],"doctools_lang_faq.man":["manpage","doctools_lang_faq"],"doctools_lang_intro.man":["manpage","doctools_lang_intro"],"doctools_lang_syntax.man":["manpage","doctools_lang_syntax"],"doctools_plugin_apiref.man":["manpage","doctools_plugin_apiref"],"http:\/\/tcllib.sourceforge.net\/doc\/docidx_lang_intro.html":["url","docidx language introduction"],"mpexpand.man":["manpage","mpexpand"]},"title":""}}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/json/1_nokeys
new file mode 100644
index 0000000..754dd0d
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json/1_nokeys
@@ -0,0 +1,8 @@
+{
+ "doctools::idx" : {
+ "keywords" : {},
+ "label" : "KWIC",
+ "title" : "INDEX",
+ "references" : {}
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/json/2_justkeys
new file mode 100644
index 0000000..2494bb0
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json/2_justkeys
@@ -0,0 +1,53 @@
+{
+ "doctools::idx" : {
+ "keywords" : {
+ "docidx commands" : [],
+ "web" : [],
+ "doctools syntax" : [],
+ "conversion" : [],
+ "markup" : [],
+ "keywords" : [],
+ "index" : [],
+ "faq" : [],
+ "doctoc language" : [],
+ "formatting engine" : [],
+ "TMML" : [],
+ "docidx syntax" : [],
+ "table of contents" : [],
+ "doctools language" : [],
+ "doctoc syntax" : [],
+ "docidx" : [],
+ "wiki" : [],
+ "keyword index" : [],
+ "cvs log" : [],
+ "doctoc commands" : [],
+ "examples" : [],
+ "doctools" : [],
+ "changelog" : [],
+ "manpage" : [],
+ "emacs" : [],
+ "doctools commands" : [],
+ "toc formatter" : [],
+ "log" : [],
+ "documentation" : [],
+ "nroff" : [],
+ "docidx markup" : [],
+ "semantic markup" : [],
+ "index formatter" : [],
+ "formatter" : [],
+ "doctoc markup" : [],
+ "cvs" : [],
+ "doctoc" : [],
+ "HTML" : [],
+ "toc" : [],
+ "latex" : [],
+ "plugin" : [],
+ "document" : [],
+ "doctools markup" : [],
+ "docidx language" : []
+ },
+ "title" : "",
+ "label" : "Keyword Index",
+ "references" : {}
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/json/3_kwic
new file mode 100644
index 0000000..14db175
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json/3_kwic
@@ -0,0 +1,80 @@
+{
+ "doctools::idx" : {
+ "title" : "",
+ "keywords" : {
+ "web" : ["http:\/\/tcllib.sourceforge.net\/doc\/docidx_lang_intro.html"],
+ "doctools syntax" : ["doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "conversion" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "cvs log" : ["cvs.man"],
+ "doctoc commands" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "examples" : ["docidx_lang_faq.man","doctoc_lang_faq.man","doctools_lang_faq.man"],
+ "markup" : ["docidx_intro.man","docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man","docidx_plugin_apiref.man","doctoc_intro.man","doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man","doctoc_plugin_apiref.man","doctools.man","docidx.man","doctoc.man","doctools_intro.man","doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man","doctools_plugin_apiref.man","apps\/dtplite.man","mpexpand.man"],
+ "keywords" : ["docidx_plugin_apiref.man"],
+ "index" : ["docidx_intro.man","docidx_plugin_apiref.man","docidx.man"],
+ "faq" : ["docidx_lang_faq.man","doctoc_lang_faq.man","doctools_lang_faq.man"],
+ "doctoc language" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "formatting engine" : ["docidx_plugin_apiref.man","doctoc_plugin_apiref.man","doctools_plugin_apiref.man"],
+ "TMML" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "docidx syntax" : ["docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "table of contents" : ["doctoc_intro.man","doctoc_plugin_apiref.man","doctoc.man"],
+ "doctools language" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "doctoc syntax" : ["doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "docidx" : ["docidx.man","apps\/dtplite.man"],
+ "wiki" : ["docidx.man","doctoc.man"],
+ "keyword index" : ["docidx_intro.man","docidx.man"],
+ "docidx commands" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "doctools" : ["changelog.man","apps\/dtplite.man"],
+ "changelog" : ["changelog.man","cvs.man"],
+ "manpage" : ["doctools.man","docidx.man","doctoc.man","doctools_plugin_apiref.man","apps\/dtplite.man","mpexpand.man"],
+ "emacs" : ["changelog.man","cvs.man"],
+ "doctools commands" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "toc formatter" : ["doctoc_plugin_apiref.man"],
+ "log" : ["cvs.man"],
+ "documentation" : ["docidx.man","doctools.man","doctoc.man"],
+ "nroff" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "docidx markup" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"],
+ "semantic markup" : ["docidx_intro.man","docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man","docidx_plugin_apiref.man","doctoc_intro.man","doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man","doctoc_plugin_apiref.man","doctools_intro.man","doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man","doctools_plugin_apiref.man"],
+ "index formatter" : ["docidx_plugin_apiref.man"],
+ "formatter" : ["doctools_plugin_apiref.man"],
+ "doctoc markup" : ["doctoc_lang_cmdref.man","doctoc_lang_faq.man","doctoc_lang_intro.man","doctoc_lang_syntax.man"],
+ "cvs" : ["cvs.man"],
+ "doctoc" : ["doctoc.man","apps\/dtplite.man"],
+ "HTML" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
+ "toc" : ["doctoc_intro.man","doctoc_plugin_apiref.man","doctoc.man"],
+ "latex" : ["docidx.man","doctoc.man"],
+ "plugin" : ["docidx_plugin_apiref.man","doctoc_plugin_apiref.man"],
+ "document" : ["doctools_plugin_apiref.man"],
+ "doctools markup" : ["doctools_lang_cmdref.man","doctools_lang_faq.man","doctools_lang_intro.man","doctools_lang_syntax.man"],
+ "docidx language" : ["docidx_lang_cmdref.man","docidx_lang_faq.man","docidx_lang_intro.man","docidx_lang_syntax.man"]
+ },
+ "references" : {
+ "docidx_lang_intro.man" : ["manpage","docidx_lang_intro"],
+ "docidx_plugin_apiref.man" : ["manpage","docidx_plugin_apiref"],
+ "doctoc_intro.man" : ["manpage","doctoc_intro"],
+ "doctools_lang_cmdref.man" : ["manpage","doctools_lang_cmdref"],
+ "doctoc_lang_intro.man" : ["manpage","doctoc_lang_intro"],
+ "docidx_lang_syntax.man" : ["manpage","docidx_lang_syntax"],
+ "doctools_plugin_apiref.man" : ["manpage","doctools_plugin_apiref"],
+ "doctools_lang_intro.man" : ["manpage","doctools_lang_intro"],
+ "docidx.man" : ["manpage","doctools::idx"],
+ "docidx_lang_faq.man" : ["manpage","docidx_lang_faq"],
+ "doctoc_lang_faq.man" : ["manpage","doctoc_lang_faq"],
+ "http:\/\/tcllib.sourceforge.net\/doc\/docidx_lang_intro.html" : ["url" ,"docidx language introduction"],
+ "doctoc_lang_cmdref.man" : ["manpage","doctoc_lang_cmdref"],
+ "doctools_lang_syntax.man" : ["manpage","doctools_lang_syntax"],
+ "docidx_intro.man" : ["manpage","docidx_intro"],
+ "doctools_lang_faq.man" : ["manpage","doctools_lang_faq"],
+ "doctools.man" : ["manpage","doctools"],
+ "doctoc_plugin_apiref.man" : ["manpage","doctoc_plugin_apiref"],
+ "changelog.man" : ["manpage","doctools::changelog"],
+ "apps\/dtplite.man" : ["manpage","dtplite"],
+ "doctools_intro.man" : ["manpage","doctools_intro"],
+ "doctoc_lang_syntax.man" : ["manpage","doctoc_lang_syntax"],
+ "cvs.man" : ["manpage","doctools::cvs"],
+ "docidx_lang_cmdref.man" : ["manpage","docidx_lang_cmdref"],
+ "doctoc.man" : ["manpage","doctools::toc"],
+ "mpexpand.man" : ["manpage","mpexpand"]
+ },
+ "label" : "Keyword Index"
+ }
+}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/json/README.txt b/tcllib/modules/doctools2idx/tests/data/ok/json/README.txt
new file mode 100644
index 0000000..5db289a
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/json/README.txt
@@ -0,0 +1,3 @@
+This section holds json input which is non-canonical, i.e. in the
+proper format, with the keys not alphabetically. This is acceptable as
+input, and the importer makes it canonical for the higher layers.
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/1_nokeys
new file mode 100644
index 0000000..9336fa2
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/1_nokeys
@@ -0,0 +1,5 @@
+.so man.macros
+.TH KWIC
+.SH INDEX
+INDEX
+.RS
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/2_justkeys
new file mode 100644
index 0000000..438077f
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/2_justkeys
@@ -0,0 +1,136 @@
+.so man.macros
+.TH "KEYWORD INDEX"
+.SH INDEX
+.RS
+changelog
+.RS
+.RE
+conversion
+.RS
+.RE
+cvs
+.RS
+.RE
+cvs log
+.RS
+.RE
+docidx
+.RS
+.RE
+docidx commands
+.RS
+.RE
+docidx language
+.RS
+.RE
+docidx markup
+.RS
+.RE
+docidx syntax
+.RS
+.RE
+doctoc
+.RS
+.RE
+doctoc commands
+.RS
+.RE
+doctoc language
+.RS
+.RE
+doctoc markup
+.RS
+.RE
+doctoc syntax
+.RS
+.RE
+doctools
+.RS
+.RE
+doctools commands
+.RS
+.RE
+doctools language
+.RS
+.RE
+doctools markup
+.RS
+.RE
+doctools syntax
+.RS
+.RE
+document
+.RS
+.RE
+documentation
+.RS
+.RE
+emacs
+.RS
+.RE
+examples
+.RS
+.RE
+faq
+.RS
+.RE
+formatter
+.RS
+.RE
+formatting engine
+.RS
+.RE
+HTML
+.RS
+.RE
+index
+.RS
+.RE
+index formatter
+.RS
+.RE
+keyword index
+.RS
+.RE
+keywords
+.RS
+.RE
+latex
+.RS
+.RE
+log
+.RS
+.RE
+manpage
+.RS
+.RE
+markup
+.RS
+.RE
+nroff
+.RS
+.RE
+plugin
+.RS
+.RE
+semantic markup
+.RS
+.RE
+table of contents
+.RS
+.RE
+TMML
+.RS
+.RE
+toc
+.RS
+.RE
+toc formatter
+.RS
+.RE
+web
+.RS
+.RE
+wiki
+.RS
+.RE
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/3_kwic
new file mode 100644
index 0000000..e5d1cf5
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/nroff-external/3_kwic
@@ -0,0 +1,660 @@
+.so man.macros
+.TH "KEYWORD INDEX"
+.SH INDEX
+.RS
+changelog
+.RS
+.TP
+\fBchangelog.man\fR
+doctools::changelog
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+conversion
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+cvs
+.RS
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+cvs log
+.RS
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+docidx
+.RS
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.RE
+.PP
+docidx commands
+.RS
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.RE
+.PP
+docidx language
+.RS
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.RE
+.PP
+docidx markup
+.RS
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.RE
+.PP
+docidx syntax
+.RS
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.RE
+.PP
+doctoc
+.RS
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.RE
+.PP
+doctoc commands
+.RS
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.RE
+.PP
+doctoc language
+.RS
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.RE
+.PP
+doctoc markup
+.RS
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.RE
+.PP
+doctoc syntax
+.RS
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.RE
+.PP
+doctools
+.RS
+.TP
+\fBchangelog.man\fR
+doctools::changelog
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.RE
+.PP
+doctools commands
+.RS
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.RE
+.PP
+doctools language
+.RS
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.RE
+.PP
+doctools markup
+.RS
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.RE
+.PP
+doctools syntax
+.RS
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.RE
+.PP
+document
+.RS
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.RE
+.PP
+documentation
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
+emacs
+.RS
+.TP
+\fBchangelog.man\fR
+doctools::changelog
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+examples
+.RS
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.RE
+.PP
+faq
+.RS
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.RE
+.PP
+formatter
+.RS
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.RE
+.PP
+formatting engine
+.RS
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.RE
+.PP
+HTML
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+index
+.RS
+.TP
+\fBdocidx_intro.man\fR
+docidx_intro
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.RE
+.PP
+index formatter
+.RS
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.RE
+.PP
+keyword index
+.RS
+.TP
+\fBdocidx_intro.man\fR
+docidx_intro
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.RE
+.PP
+keywords
+.RS
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.RE
+.PP
+latex
+.RS
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
+log
+.RS
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+manpage
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+markup
+.RS
+.TP
+\fBdocidx_intro.man\fR
+docidx_intro
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdoctoc_intro.man\fR
+doctoc_intro
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBdoctools_intro.man\fR
+doctools_intro
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+nroff
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+plugin
+.RS
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.RE
+.PP
+semantic markup
+.RS
+.TP
+\fBdocidx_intro.man\fR
+docidx_intro
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdoctoc_intro.man\fR
+doctoc_intro
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctools_intro.man\fR
+doctools_intro
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.RE
+.PP
+table of contents
+.RS
+.TP
+\fBdoctoc_intro.man\fR
+doctoc_intro
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
+TMML
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+toc
+.RS
+.TP
+\fBdoctoc_intro.man\fR
+doctoc_intro
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
+toc formatter
+.RS
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.RE
+.PP
+web
+.RS
+.TP
+\fBhttp://tcllib.sourceforge.net/doc/docidx_lang_intro.html\fR
+docidx language introduction
+.RE
+.PP
+wiki
+.RS
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/1_nokeys
new file mode 100644
index 0000000..399a61e
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/1_nokeys
@@ -0,0 +1,4 @@
+.TH KWIC
+.SH INDEX
+INDEX
+.RS
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/2_justkeys
new file mode 100644
index 0000000..4e1899e
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/2_justkeys
@@ -0,0 +1,135 @@
+.TH "KEYWORD INDEX"
+.SH INDEX
+.RS
+changelog
+.RS
+.RE
+conversion
+.RS
+.RE
+cvs
+.RS
+.RE
+cvs log
+.RS
+.RE
+docidx
+.RS
+.RE
+docidx commands
+.RS
+.RE
+docidx language
+.RS
+.RE
+docidx markup
+.RS
+.RE
+docidx syntax
+.RS
+.RE
+doctoc
+.RS
+.RE
+doctoc commands
+.RS
+.RE
+doctoc language
+.RS
+.RE
+doctoc markup
+.RS
+.RE
+doctoc syntax
+.RS
+.RE
+doctools
+.RS
+.RE
+doctools commands
+.RS
+.RE
+doctools language
+.RS
+.RE
+doctools markup
+.RS
+.RE
+doctools syntax
+.RS
+.RE
+document
+.RS
+.RE
+documentation
+.RS
+.RE
+emacs
+.RS
+.RE
+examples
+.RS
+.RE
+faq
+.RS
+.RE
+formatter
+.RS
+.RE
+formatting engine
+.RS
+.RE
+HTML
+.RS
+.RE
+index
+.RS
+.RE
+index formatter
+.RS
+.RE
+keyword index
+.RS
+.RE
+keywords
+.RS
+.RE
+latex
+.RS
+.RE
+log
+.RS
+.RE
+manpage
+.RS
+.RE
+markup
+.RS
+.RE
+nroff
+.RS
+.RE
+plugin
+.RS
+.RE
+semantic markup
+.RS
+.RE
+table of contents
+.RS
+.RE
+TMML
+.RS
+.RE
+toc
+.RS
+.RE
+toc formatter
+.RS
+.RE
+web
+.RS
+.RE
+wiki
+.RS
+.RE
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/3_kwic
new file mode 100644
index 0000000..bfc5ebe
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/nroff-inlined/3_kwic
@@ -0,0 +1,659 @@
+.TH "KEYWORD INDEX"
+.SH INDEX
+.RS
+changelog
+.RS
+.TP
+\fBchangelog.man\fR
+doctools::changelog
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+conversion
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+cvs
+.RS
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+cvs log
+.RS
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+docidx
+.RS
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.RE
+.PP
+docidx commands
+.RS
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.RE
+.PP
+docidx language
+.RS
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.RE
+.PP
+docidx markup
+.RS
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.RE
+.PP
+docidx syntax
+.RS
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.RE
+.PP
+doctoc
+.RS
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.RE
+.PP
+doctoc commands
+.RS
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.RE
+.PP
+doctoc language
+.RS
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.RE
+.PP
+doctoc markup
+.RS
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.RE
+.PP
+doctoc syntax
+.RS
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.RE
+.PP
+doctools
+.RS
+.TP
+\fBchangelog.man\fR
+doctools::changelog
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.RE
+.PP
+doctools commands
+.RS
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.RE
+.PP
+doctools language
+.RS
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.RE
+.PP
+doctools markup
+.RS
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.RE
+.PP
+doctools syntax
+.RS
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.RE
+.PP
+document
+.RS
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.RE
+.PP
+documentation
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
+emacs
+.RS
+.TP
+\fBchangelog.man\fR
+doctools::changelog
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+examples
+.RS
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.RE
+.PP
+faq
+.RS
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.RE
+.PP
+formatter
+.RS
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.RE
+.PP
+formatting engine
+.RS
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.RE
+.PP
+HTML
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+index
+.RS
+.TP
+\fBdocidx_intro.man\fR
+docidx_intro
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.RE
+.PP
+index formatter
+.RS
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.RE
+.PP
+keyword index
+.RS
+.TP
+\fBdocidx_intro.man\fR
+docidx_intro
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.RE
+.PP
+keywords
+.RS
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.RE
+.PP
+latex
+.RS
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
+log
+.RS
+.TP
+\fBcvs.man\fR
+doctools::cvs
+.RE
+.PP
+manpage
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+markup
+.RS
+.TP
+\fBdocidx_intro.man\fR
+docidx_intro
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdoctoc_intro.man\fR
+doctoc_intro
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBdoctools_intro.man\fR
+doctools_intro
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+nroff
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+plugin
+.RS
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.RE
+.PP
+semantic markup
+.RS
+.TP
+\fBdocidx_intro.man\fR
+docidx_intro
+.TP
+\fBdocidx_lang_cmdref.man\fR
+docidx_lang_cmdref
+.TP
+\fBdocidx_lang_faq.man\fR
+docidx_lang_faq
+.TP
+\fBdocidx_lang_intro.man\fR
+docidx_lang_intro
+.TP
+\fBdocidx_lang_syntax.man\fR
+docidx_lang_syntax
+.TP
+\fBdocidx_plugin_apiref.man\fR
+docidx_plugin_apiref
+.TP
+\fBdoctoc_intro.man\fR
+doctoc_intro
+.TP
+\fBdoctoc_lang_cmdref.man\fR
+doctoc_lang_cmdref
+.TP
+\fBdoctoc_lang_faq.man\fR
+doctoc_lang_faq
+.TP
+\fBdoctoc_lang_intro.man\fR
+doctoc_lang_intro
+.TP
+\fBdoctoc_lang_syntax.man\fR
+doctoc_lang_syntax
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctools_intro.man\fR
+doctools_intro
+.TP
+\fBdoctools_lang_cmdref.man\fR
+doctools_lang_cmdref
+.TP
+\fBdoctools_lang_faq.man\fR
+doctools_lang_faq
+.TP
+\fBdoctools_lang_intro.man\fR
+doctools_lang_intro
+.TP
+\fBdoctools_lang_syntax.man\fR
+doctools_lang_syntax
+.TP
+\fBdoctools_plugin_apiref.man\fR
+doctools_plugin_apiref
+.RE
+.PP
+table of contents
+.RS
+.TP
+\fBdoctoc_intro.man\fR
+doctoc_intro
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
+TMML
+.RS
+.TP
+\fBdoctools.man\fR
+doctools
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.TP
+\fBapps/dtplite.man\fR
+dtplite
+.TP
+\fBmpexpand.man\fR
+mpexpand
+.RE
+.PP
+toc
+.RS
+.TP
+\fBdoctoc_intro.man\fR
+doctoc_intro
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
+toc formatter
+.RS
+.TP
+\fBdoctoc_plugin_apiref.man\fR
+doctoc_plugin_apiref
+.RE
+.PP
+web
+.RS
+.TP
+\fBhttp://tcllib.sourceforge.net/doc/docidx_lang_intro.html\fR
+docidx language introduction
+.RE
+.PP
+wiki
+.RS
+.TP
+\fBdocidx.man\fR
+doctools::idx
+.TP
+\fBdoctoc.man\fR
+doctools::toc
+.RE
+.PP
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/serial-print/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/serial-print/1_nokeys
new file mode 100644
index 0000000..2507117
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/serial-print/1_nokeys
@@ -0,0 +1 @@
+doctools::idx KWIC INDEX
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/serial-print/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/serial-print/2_justkeys
new file mode 100644
index 0000000..ae799f0
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/serial-print/2_justkeys
@@ -0,0 +1,45 @@
+doctools::idx {Keyword Index} {}
+....changelog
+....conversion
+....cvs
+....cvs log
+....docidx
+....docidx commands
+....docidx language
+....docidx markup
+....docidx syntax
+....doctoc
+....doctoc commands
+....doctoc language
+....doctoc markup
+....doctoc syntax
+....doctools
+....doctools commands
+....doctools language
+....doctools markup
+....doctools syntax
+....document
+....documentation
+....emacs
+....examples
+....faq
+....formatter
+....formatting engine
+....HTML
+....index
+....index formatter
+....keyword index
+....keywords
+....latex
+....log
+....manpage
+....markup
+....nroff
+....plugin
+....semantic markup
+....table of contents
+....TMML
+....toc
+....toc formatter
+....web
+....wiki
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/serial-print/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/serial-print/3_kwic
new file mode 100644
index 0000000..4000f07
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/serial-print/3_kwic
@@ -0,0 +1,205 @@
+doctools::idx {Keyword Index} {}
+....changelog
+........manpage doctools::changelog changelog.man
+........manpage doctools::cvs cvs.man
+....conversion
+........manpage doctools doctools.man
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
+........manpage dtplite apps/dtplite.man
+........manpage mpexpand mpexpand.man
+....cvs
+........manpage doctools::cvs cvs.man
+....cvs log
+........manpage doctools::cvs cvs.man
+....docidx
+........manpage doctools::idx docidx.man
+........manpage dtplite apps/dtplite.man
+....docidx commands
+........manpage docidx_lang_cmdref docidx_lang_cmdref.man
+........manpage docidx_lang_faq docidx_lang_faq.man
+........manpage docidx_lang_intro docidx_lang_intro.man
+........manpage docidx_lang_syntax docidx_lang_syntax.man
+....docidx language
+........manpage docidx_lang_cmdref docidx_lang_cmdref.man
+........manpage docidx_lang_faq docidx_lang_faq.man
+........manpage docidx_lang_intro docidx_lang_intro.man
+........manpage docidx_lang_syntax docidx_lang_syntax.man
+....docidx markup
+........manpage docidx_lang_cmdref docidx_lang_cmdref.man
+........manpage docidx_lang_faq docidx_lang_faq.man
+........manpage docidx_lang_intro docidx_lang_intro.man
+........manpage docidx_lang_syntax docidx_lang_syntax.man
+....docidx syntax
+........manpage docidx_lang_faq docidx_lang_faq.man
+........manpage docidx_lang_intro docidx_lang_intro.man
+........manpage docidx_lang_syntax docidx_lang_syntax.man
+....doctoc
+........manpage doctools::toc doctoc.man
+........manpage dtplite apps/dtplite.man
+....doctoc commands
+........manpage doctoc_lang_cmdref doctoc_lang_cmdref.man
+........manpage doctoc_lang_faq doctoc_lang_faq.man
+........manpage doctoc_lang_intro doctoc_lang_intro.man
+........manpage doctoc_lang_syntax doctoc_lang_syntax.man
+....doctoc language
+........manpage doctoc_lang_cmdref doctoc_lang_cmdref.man
+........manpage doctoc_lang_faq doctoc_lang_faq.man
+........manpage doctoc_lang_intro doctoc_lang_intro.man
+........manpage doctoc_lang_syntax doctoc_lang_syntax.man
+....doctoc markup
+........manpage doctoc_lang_cmdref doctoc_lang_cmdref.man
+........manpage doctoc_lang_faq doctoc_lang_faq.man
+........manpage doctoc_lang_intro doctoc_lang_intro.man
+........manpage doctoc_lang_syntax doctoc_lang_syntax.man
+....doctoc syntax
+........manpage doctoc_lang_faq doctoc_lang_faq.man
+........manpage doctoc_lang_intro doctoc_lang_intro.man
+........manpage doctoc_lang_syntax doctoc_lang_syntax.man
+....doctools
+........manpage doctools::changelog changelog.man
+........manpage dtplite apps/dtplite.man
+....doctools commands
+........manpage doctools_lang_cmdref doctools_lang_cmdref.man
+........manpage doctools_lang_faq doctools_lang_faq.man
+........manpage doctools_lang_intro doctools_lang_intro.man
+........manpage doctools_lang_syntax doctools_lang_syntax.man
+....doctools language
+........manpage doctools_lang_cmdref doctools_lang_cmdref.man
+........manpage doctools_lang_faq doctools_lang_faq.man
+........manpage doctools_lang_intro doctools_lang_intro.man
+........manpage doctools_lang_syntax doctools_lang_syntax.man
+....doctools markup
+........manpage doctools_lang_cmdref doctools_lang_cmdref.man
+........manpage doctools_lang_faq doctools_lang_faq.man
+........manpage doctools_lang_intro doctools_lang_intro.man
+........manpage doctools_lang_syntax doctools_lang_syntax.man
+....doctools syntax
+........manpage doctools_lang_faq doctools_lang_faq.man
+........manpage doctools_lang_intro doctools_lang_intro.man
+........manpage doctools_lang_syntax doctools_lang_syntax.man
+....document
+........manpage doctools_plugin_apiref doctools_plugin_apiref.man
+....documentation
+........manpage doctools doctools.man
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
+....emacs
+........manpage doctools::changelog changelog.man
+........manpage doctools::cvs cvs.man
+....examples
+........manpage docidx_lang_faq docidx_lang_faq.man
+........manpage doctoc_lang_faq doctoc_lang_faq.man
+........manpage doctools_lang_faq doctools_lang_faq.man
+....faq
+........manpage docidx_lang_faq docidx_lang_faq.man
+........manpage doctoc_lang_faq doctoc_lang_faq.man
+........manpage doctools_lang_faq doctools_lang_faq.man
+....formatter
+........manpage doctools_plugin_apiref doctools_plugin_apiref.man
+....formatting engine
+........manpage docidx_plugin_apiref docidx_plugin_apiref.man
+........manpage doctoc_plugin_apiref doctoc_plugin_apiref.man
+........manpage doctools_plugin_apiref doctools_plugin_apiref.man
+....HTML
+........manpage doctools doctools.man
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
+........manpage dtplite apps/dtplite.man
+........manpage mpexpand mpexpand.man
+....index
+........manpage docidx_intro docidx_intro.man
+........manpage docidx_plugin_apiref docidx_plugin_apiref.man
+........manpage doctools::idx docidx.man
+....index formatter
+........manpage docidx_plugin_apiref docidx_plugin_apiref.man
+....keyword index
+........manpage docidx_intro docidx_intro.man
+........manpage doctools::idx docidx.man
+....keywords
+........manpage docidx_plugin_apiref docidx_plugin_apiref.man
+....latex
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
+....log
+........manpage doctools::cvs cvs.man
+....manpage
+........manpage doctools doctools.man
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
+........manpage doctools_plugin_apiref doctools_plugin_apiref.man
+........manpage dtplite apps/dtplite.man
+........manpage mpexpand mpexpand.man
+....markup
+........manpage docidx_intro docidx_intro.man
+........manpage docidx_lang_cmdref docidx_lang_cmdref.man
+........manpage docidx_lang_faq docidx_lang_faq.man
+........manpage docidx_lang_intro docidx_lang_intro.man
+........manpage docidx_lang_syntax docidx_lang_syntax.man
+........manpage docidx_plugin_apiref docidx_plugin_apiref.man
+........manpage doctoc_intro doctoc_intro.man
+........manpage doctoc_lang_cmdref doctoc_lang_cmdref.man
+........manpage doctoc_lang_faq doctoc_lang_faq.man
+........manpage doctoc_lang_intro doctoc_lang_intro.man
+........manpage doctoc_lang_syntax doctoc_lang_syntax.man
+........manpage doctoc_plugin_apiref doctoc_plugin_apiref.man
+........manpage doctools doctools.man
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
+........manpage doctools_intro doctools_intro.man
+........manpage doctools_lang_cmdref doctools_lang_cmdref.man
+........manpage doctools_lang_faq doctools_lang_faq.man
+........manpage doctools_lang_intro doctools_lang_intro.man
+........manpage doctools_lang_syntax doctools_lang_syntax.man
+........manpage doctools_plugin_apiref doctools_plugin_apiref.man
+........manpage dtplite apps/dtplite.man
+........manpage mpexpand mpexpand.man
+....nroff
+........manpage doctools doctools.man
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
+........manpage dtplite apps/dtplite.man
+........manpage mpexpand mpexpand.man
+....plugin
+........manpage docidx_plugin_apiref docidx_plugin_apiref.man
+........manpage doctoc_plugin_apiref doctoc_plugin_apiref.man
+....semantic markup
+........manpage docidx_intro docidx_intro.man
+........manpage docidx_lang_cmdref docidx_lang_cmdref.man
+........manpage docidx_lang_faq docidx_lang_faq.man
+........manpage docidx_lang_intro docidx_lang_intro.man
+........manpage docidx_lang_syntax docidx_lang_syntax.man
+........manpage docidx_plugin_apiref docidx_plugin_apiref.man
+........manpage doctoc_intro doctoc_intro.man
+........manpage doctoc_lang_cmdref doctoc_lang_cmdref.man
+........manpage doctoc_lang_faq doctoc_lang_faq.man
+........manpage doctoc_lang_intro doctoc_lang_intro.man
+........manpage doctoc_lang_syntax doctoc_lang_syntax.man
+........manpage doctoc_plugin_apiref doctoc_plugin_apiref.man
+........manpage doctools_intro doctools_intro.man
+........manpage doctools_lang_cmdref doctools_lang_cmdref.man
+........manpage doctools_lang_faq doctools_lang_faq.man
+........manpage doctools_lang_intro doctools_lang_intro.man
+........manpage doctools_lang_syntax doctools_lang_syntax.man
+........manpage doctools_plugin_apiref doctools_plugin_apiref.man
+....table of contents
+........manpage doctoc_intro doctoc_intro.man
+........manpage doctoc_plugin_apiref doctoc_plugin_apiref.man
+........manpage doctools::toc doctoc.man
+....TMML
+........manpage doctools doctools.man
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
+........manpage dtplite apps/dtplite.man
+........manpage mpexpand mpexpand.man
+....toc
+........manpage doctoc_intro doctoc_intro.man
+........manpage doctoc_plugin_apiref doctoc_plugin_apiref.man
+........manpage doctools::toc doctoc.man
+....toc formatter
+........manpage doctoc_plugin_apiref doctoc_plugin_apiref.man
+....web
+........url {docidx language introduction} http://tcllib.sourceforge.net/doc/docidx_lang_intro.html
+....wiki
+........manpage doctools::idx docidx.man
+........manpage doctools::toc doctoc.man
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/serial/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/serial/1_nokeys
new file mode 100644
index 0000000..25370d0
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/serial/1_nokeys
@@ -0,0 +1 @@
+doctools::idx {label KWIC keywords {} references {} title INDEX}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/serial/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/serial/2_justkeys
new file mode 100644
index 0000000..81935e8
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/serial/2_justkeys
@@ -0,0 +1 @@
+doctools::idx {label {Keyword Index} keywords {changelog {} conversion {} cvs {} {cvs log} {} docidx {} {docidx commands} {} {docidx language} {} {docidx markup} {} {docidx syntax} {} doctoc {} {doctoc commands} {} {doctoc language} {} {doctoc markup} {} {doctoc syntax} {} doctools {} {doctools commands} {} {doctools language} {} {doctools markup} {} {doctools syntax} {} document {} documentation {} emacs {} examples {} faq {} formatter {} {formatting engine} {} HTML {} index {} {index formatter} {} {keyword index} {} keywords {} latex {} log {} manpage {} markup {} nroff {} plugin {} {semantic markup} {} {table of contents} {} TMML {} toc {} {toc formatter} {} web {} wiki {}} references {} title {}}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/serial/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/serial/3_kwic
new file mode 100644
index 0000000..110e92e
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/serial/3_kwic
@@ -0,0 +1 @@
+doctools::idx {label {Keyword Index} keywords {changelog {changelog.man cvs.man} conversion {doctools.man docidx.man doctoc.man apps/dtplite.man mpexpand.man} cvs cvs.man {cvs log} cvs.man docidx {docidx.man apps/dtplite.man} {docidx commands} {docidx_lang_cmdref.man docidx_lang_faq.man docidx_lang_intro.man docidx_lang_syntax.man} {docidx language} {docidx_lang_cmdref.man docidx_lang_faq.man docidx_lang_intro.man docidx_lang_syntax.man} {docidx markup} {docidx_lang_cmdref.man docidx_lang_faq.man docidx_lang_intro.man docidx_lang_syntax.man} {docidx syntax} {docidx_lang_faq.man docidx_lang_intro.man docidx_lang_syntax.man} doctoc {doctoc.man apps/dtplite.man} {doctoc commands} {doctoc_lang_cmdref.man doctoc_lang_faq.man doctoc_lang_intro.man doctoc_lang_syntax.man} {doctoc language} {doctoc_lang_cmdref.man doctoc_lang_faq.man doctoc_lang_intro.man doctoc_lang_syntax.man} {doctoc markup} {doctoc_lang_cmdref.man doctoc_lang_faq.man doctoc_lang_intro.man doctoc_lang_syntax.man} {doctoc syntax} {doctoc_lang_faq.man doctoc_lang_intro.man doctoc_lang_syntax.man} doctools {changelog.man apps/dtplite.man} {doctools commands} {doctools_lang_cmdref.man doctools_lang_faq.man doctools_lang_intro.man doctools_lang_syntax.man} {doctools language} {doctools_lang_cmdref.man doctools_lang_faq.man doctools_lang_intro.man doctools_lang_syntax.man} {doctools markup} {doctools_lang_cmdref.man doctools_lang_faq.man doctools_lang_intro.man doctools_lang_syntax.man} {doctools syntax} {doctools_lang_faq.man doctools_lang_intro.man doctools_lang_syntax.man} document doctools_plugin_apiref.man documentation {doctools.man docidx.man doctoc.man} emacs {changelog.man cvs.man} examples {docidx_lang_faq.man doctoc_lang_faq.man doctools_lang_faq.man} faq {docidx_lang_faq.man doctoc_lang_faq.man doctools_lang_faq.man} formatter doctools_plugin_apiref.man {formatting engine} {docidx_plugin_apiref.man doctoc_plugin_apiref.man doctools_plugin_apiref.man} HTML {doctools.man docidx.man doctoc.man apps/dtplite.man mpexpand.man} index {docidx_intro.man docidx_plugin_apiref.man docidx.man} {index formatter} docidx_plugin_apiref.man {keyword index} {docidx_intro.man docidx.man} keywords docidx_plugin_apiref.man latex {docidx.man doctoc.man} log cvs.man manpage {doctools.man docidx.man doctoc.man doctools_plugin_apiref.man apps/dtplite.man mpexpand.man} markup {docidx_intro.man docidx_lang_cmdref.man docidx_lang_faq.man docidx_lang_intro.man docidx_lang_syntax.man docidx_plugin_apiref.man doctoc_intro.man doctoc_lang_cmdref.man doctoc_lang_faq.man doctoc_lang_intro.man doctoc_lang_syntax.man doctoc_plugin_apiref.man doctools.man docidx.man doctoc.man doctools_intro.man doctools_lang_cmdref.man doctools_lang_faq.man doctools_lang_intro.man doctools_lang_syntax.man doctools_plugin_apiref.man apps/dtplite.man mpexpand.man} nroff {doctools.man docidx.man doctoc.man apps/dtplite.man mpexpand.man} plugin {docidx_plugin_apiref.man doctoc_plugin_apiref.man} {semantic markup} {docidx_intro.man docidx_lang_cmdref.man docidx_lang_faq.man docidx_lang_intro.man docidx_lang_syntax.man docidx_plugin_apiref.man doctoc_intro.man doctoc_lang_cmdref.man doctoc_lang_faq.man doctoc_lang_intro.man doctoc_lang_syntax.man doctoc_plugin_apiref.man doctools_intro.man doctools_lang_cmdref.man doctools_lang_faq.man doctools_lang_intro.man doctools_lang_syntax.man doctools_plugin_apiref.man} {table of contents} {doctoc_intro.man doctoc_plugin_apiref.man doctoc.man} TMML {doctools.man docidx.man doctoc.man apps/dtplite.man mpexpand.man} toc {doctoc_intro.man doctoc_plugin_apiref.man doctoc.man} {toc formatter} doctoc_plugin_apiref.man web http://tcllib.sourceforge.net/doc/docidx_lang_intro.html wiki {docidx.man doctoc.man}} references {apps/dtplite.man {manpage dtplite} changelog.man {manpage doctools::changelog} cvs.man {manpage doctools::cvs} docidx.man {manpage doctools::idx} docidx_intro.man {manpage docidx_intro} docidx_lang_cmdref.man {manpage docidx_lang_cmdref} docidx_lang_faq.man {manpage docidx_lang_faq} docidx_lang_intro.man {manpage docidx_lang_intro} docidx_lang_syntax.man {manpage docidx_lang_syntax} docidx_plugin_apiref.man {manpage docidx_plugin_apiref} doctoc.man {manpage doctools::toc} doctoc_intro.man {manpage doctoc_intro} doctoc_lang_cmdref.man {manpage doctoc_lang_cmdref} doctoc_lang_faq.man {manpage doctoc_lang_faq} doctoc_lang_intro.man {manpage doctoc_lang_intro} doctoc_lang_syntax.man {manpage doctoc_lang_syntax} doctoc_plugin_apiref.man {manpage doctoc_plugin_apiref} doctools.man {manpage doctools} doctools_intro.man {manpage doctools_intro} doctools_lang_cmdref.man {manpage doctools_lang_cmdref} doctools_lang_faq.man {manpage doctools_lang_faq} doctools_lang_intro.man {manpage doctools_lang_intro} doctools_lang_syntax.man {manpage doctools_lang_syntax} doctools_plugin_apiref.man {manpage doctools_plugin_apiref} http://tcllib.sourceforge.net/doc/docidx_lang_intro.html {url {docidx language introduction}} mpexpand.man {manpage mpexpand}} title {}}
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/text/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/text/1_nokeys
new file mode 100644
index 0000000..6c91911
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/text/1_nokeys
@@ -0,0 +1,2 @@
+KWIC -- INDEX
+============= \ No newline at end of file
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/text/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/text/2_justkeys
new file mode 100644
index 0000000..368dd1a
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/text/2_justkeys
@@ -0,0 +1,136 @@
+Keyword Index
+=============
+
+changelog
+---------
+
+conversion
+----------
+
+cvs
+---
+
+cvs log
+-------
+
+docidx
+------
+
+docidx commands
+---------------
+
+docidx language
+---------------
+
+docidx markup
+-------------
+
+docidx syntax
+-------------
+
+doctoc
+------
+
+doctoc commands
+---------------
+
+doctoc language
+---------------
+
+doctoc markup
+-------------
+
+doctoc syntax
+-------------
+
+doctools
+--------
+
+doctools commands
+-----------------
+
+doctools language
+-----------------
+
+doctools markup
+---------------
+
+doctools syntax
+---------------
+
+document
+--------
+
+documentation
+-------------
+
+emacs
+-----
+
+examples
+--------
+
+faq
+---
+
+formatter
+---------
+
+formatting engine
+-----------------
+
+HTML
+----
+
+index
+-----
+
+index formatter
+---------------
+
+keyword index
+-------------
+
+keywords
+--------
+
+latex
+-----
+
+log
+---
+
+manpage
+-------
+
+markup
+------
+
+nroff
+-----
+
+plugin
+------
+
+semantic markup
+---------------
+
+table of contents
+-----------------
+
+TMML
+----
+
+toc
+---
+
+toc formatter
+-------------
+
+web
+---
+
+wiki
+----
+
+
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/text/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/text/3_kwic
new file mode 100644
index 0000000..e94e8a0
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/text/3_kwic
@@ -0,0 +1,294 @@
+Keyword Index
+=============
+
+changelog
+---------
+ doctools::changelog (changelog.man)
+ doctools::cvs (cvs.man)
+
+conversion
+----------
+ doctools (doctools.man)
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
+ dtplite (apps/dtplite.man)
+ mpexpand (mpexpand.man)
+
+cvs
+---
+ doctools::cvs (cvs.man)
+
+cvs log
+-------
+ doctools::cvs (cvs.man)
+
+docidx
+------
+ doctools::idx (docidx.man)
+ dtplite (apps/dtplite.man)
+
+docidx commands
+---------------
+ docidx_lang_cmdref (docidx_lang_cmdref.man)
+ docidx_lang_faq (docidx_lang_faq.man)
+ docidx_lang_intro (docidx_lang_intro.man)
+ docidx_lang_syntax (docidx_lang_syntax.man)
+
+docidx language
+---------------
+ docidx_lang_cmdref (docidx_lang_cmdref.man)
+ docidx_lang_faq (docidx_lang_faq.man)
+ docidx_lang_intro (docidx_lang_intro.man)
+ docidx_lang_syntax (docidx_lang_syntax.man)
+
+docidx markup
+-------------
+ docidx_lang_cmdref (docidx_lang_cmdref.man)
+ docidx_lang_faq (docidx_lang_faq.man)
+ docidx_lang_intro (docidx_lang_intro.man)
+ docidx_lang_syntax (docidx_lang_syntax.man)
+
+docidx syntax
+-------------
+ docidx_lang_faq (docidx_lang_faq.man)
+ docidx_lang_intro (docidx_lang_intro.man)
+ docidx_lang_syntax (docidx_lang_syntax.man)
+
+doctoc
+------
+ doctools::toc (doctoc.man)
+ dtplite (apps/dtplite.man)
+
+doctoc commands
+---------------
+ doctoc_lang_cmdref (doctoc_lang_cmdref.man)
+ doctoc_lang_faq (doctoc_lang_faq.man)
+ doctoc_lang_intro (doctoc_lang_intro.man)
+ doctoc_lang_syntax (doctoc_lang_syntax.man)
+
+doctoc language
+---------------
+ doctoc_lang_cmdref (doctoc_lang_cmdref.man)
+ doctoc_lang_faq (doctoc_lang_faq.man)
+ doctoc_lang_intro (doctoc_lang_intro.man)
+ doctoc_lang_syntax (doctoc_lang_syntax.man)
+
+doctoc markup
+-------------
+ doctoc_lang_cmdref (doctoc_lang_cmdref.man)
+ doctoc_lang_faq (doctoc_lang_faq.man)
+ doctoc_lang_intro (doctoc_lang_intro.man)
+ doctoc_lang_syntax (doctoc_lang_syntax.man)
+
+doctoc syntax
+-------------
+ doctoc_lang_faq (doctoc_lang_faq.man)
+ doctoc_lang_intro (doctoc_lang_intro.man)
+ doctoc_lang_syntax (doctoc_lang_syntax.man)
+
+doctools
+--------
+ doctools::changelog (changelog.man)
+ dtplite (apps/dtplite.man)
+
+doctools commands
+-----------------
+ doctools_lang_cmdref (doctools_lang_cmdref.man)
+ doctools_lang_faq (doctools_lang_faq.man)
+ doctools_lang_intro (doctools_lang_intro.man)
+ doctools_lang_syntax (doctools_lang_syntax.man)
+
+doctools language
+-----------------
+ doctools_lang_cmdref (doctools_lang_cmdref.man)
+ doctools_lang_faq (doctools_lang_faq.man)
+ doctools_lang_intro (doctools_lang_intro.man)
+ doctools_lang_syntax (doctools_lang_syntax.man)
+
+doctools markup
+---------------
+ doctools_lang_cmdref (doctools_lang_cmdref.man)
+ doctools_lang_faq (doctools_lang_faq.man)
+ doctools_lang_intro (doctools_lang_intro.man)
+ doctools_lang_syntax (doctools_lang_syntax.man)
+
+doctools syntax
+---------------
+ doctools_lang_faq (doctools_lang_faq.man)
+ doctools_lang_intro (doctools_lang_intro.man)
+ doctools_lang_syntax (doctools_lang_syntax.man)
+
+document
+--------
+ doctools_plugin_apiref (doctools_plugin_apiref.man)
+
+documentation
+-------------
+ doctools (doctools.man)
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
+
+emacs
+-----
+ doctools::changelog (changelog.man)
+ doctools::cvs (cvs.man)
+
+examples
+--------
+ docidx_lang_faq (docidx_lang_faq.man)
+ doctoc_lang_faq (doctoc_lang_faq.man)
+ doctools_lang_faq (doctools_lang_faq.man)
+
+faq
+---
+ docidx_lang_faq (docidx_lang_faq.man)
+ doctoc_lang_faq (doctoc_lang_faq.man)
+ doctools_lang_faq (doctools_lang_faq.man)
+
+formatter
+---------
+ doctools_plugin_apiref (doctools_plugin_apiref.man)
+
+formatting engine
+-----------------
+ docidx_plugin_apiref (docidx_plugin_apiref.man)
+ doctoc_plugin_apiref (doctoc_plugin_apiref.man)
+ doctools_plugin_apiref (doctools_plugin_apiref.man)
+
+HTML
+----
+ doctools (doctools.man)
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
+ dtplite (apps/dtplite.man)
+ mpexpand (mpexpand.man)
+
+index
+-----
+ docidx_intro (docidx_intro.man)
+ docidx_plugin_apiref (docidx_plugin_apiref.man)
+ doctools::idx (docidx.man)
+
+index formatter
+---------------
+ docidx_plugin_apiref (docidx_plugin_apiref.man)
+
+keyword index
+-------------
+ docidx_intro (docidx_intro.man)
+ doctools::idx (docidx.man)
+
+keywords
+--------
+ docidx_plugin_apiref (docidx_plugin_apiref.man)
+
+latex
+-----
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
+
+log
+---
+ doctools::cvs (cvs.man)
+
+manpage
+-------
+ doctools (doctools.man)
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
+ doctools_plugin_apiref (doctools_plugin_apiref.man)
+ dtplite (apps/dtplite.man)
+ mpexpand (mpexpand.man)
+
+markup
+------
+ docidx_intro (docidx_intro.man)
+ docidx_lang_cmdref (docidx_lang_cmdref.man)
+ docidx_lang_faq (docidx_lang_faq.man)
+ docidx_lang_intro (docidx_lang_intro.man)
+ docidx_lang_syntax (docidx_lang_syntax.man)
+ docidx_plugin_apiref (docidx_plugin_apiref.man)
+ doctoc_intro (doctoc_intro.man)
+ doctoc_lang_cmdref (doctoc_lang_cmdref.man)
+ doctoc_lang_faq (doctoc_lang_faq.man)
+ doctoc_lang_intro (doctoc_lang_intro.man)
+ doctoc_lang_syntax (doctoc_lang_syntax.man)
+ doctoc_plugin_apiref (doctoc_plugin_apiref.man)
+ doctools (doctools.man)
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
+ doctools_intro (doctools_intro.man)
+ doctools_lang_cmdref (doctools_lang_cmdref.man)
+ doctools_lang_faq (doctools_lang_faq.man)
+ doctools_lang_intro (doctools_lang_intro.man)
+ doctools_lang_syntax (doctools_lang_syntax.man)
+ doctools_plugin_apiref (doctools_plugin_apiref.man)
+ dtplite (apps/dtplite.man)
+ mpexpand (mpexpand.man)
+
+nroff
+-----
+ doctools (doctools.man)
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
+ dtplite (apps/dtplite.man)
+ mpexpand (mpexpand.man)
+
+plugin
+------
+ docidx_plugin_apiref (docidx_plugin_apiref.man)
+ doctoc_plugin_apiref (doctoc_plugin_apiref.man)
+
+semantic markup
+---------------
+ docidx_intro (docidx_intro.man)
+ docidx_lang_cmdref (docidx_lang_cmdref.man)
+ docidx_lang_faq (docidx_lang_faq.man)
+ docidx_lang_intro (docidx_lang_intro.man)
+ docidx_lang_syntax (docidx_lang_syntax.man)
+ docidx_plugin_apiref (docidx_plugin_apiref.man)
+ doctoc_intro (doctoc_intro.man)
+ doctoc_lang_cmdref (doctoc_lang_cmdref.man)
+ doctoc_lang_faq (doctoc_lang_faq.man)
+ doctoc_lang_intro (doctoc_lang_intro.man)
+ doctoc_lang_syntax (doctoc_lang_syntax.man)
+ doctoc_plugin_apiref (doctoc_plugin_apiref.man)
+ doctools_intro (doctools_intro.man)
+ doctools_lang_cmdref (doctools_lang_cmdref.man)
+ doctools_lang_faq (doctools_lang_faq.man)
+ doctools_lang_intro (doctools_lang_intro.man)
+ doctools_lang_syntax (doctools_lang_syntax.man)
+ doctools_plugin_apiref (doctools_plugin_apiref.man)
+
+table of contents
+-----------------
+ doctoc_intro (doctoc_intro.man)
+ doctoc_plugin_apiref (doctoc_plugin_apiref.man)
+ doctools::toc (doctoc.man)
+
+TMML
+----
+ doctools (doctools.man)
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
+ dtplite (apps/dtplite.man)
+ mpexpand (mpexpand.man)
+
+toc
+---
+ doctoc_intro (doctoc_intro.man)
+ doctoc_plugin_apiref (doctoc_plugin_apiref.man)
+ doctools::toc (doctoc.man)
+
+toc formatter
+-------------
+ doctoc_plugin_apiref (doctoc_plugin_apiref.man)
+
+web
+---
+ docidx language introduction (http://tcllib.sourceforge.net/doc/docidx_lang_intro.html)
+
+wiki
+----
+ doctools::idx (docidx.man)
+ doctools::toc (doctoc.man)
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/1_nokeys
new file mode 100644
index 0000000..a0edf96
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/1_nokeys
@@ -0,0 +1,3 @@
+**KWIC -- INDEX**
+
+<<TOC>>
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/2_justkeys
new file mode 100644
index 0000000..7791942
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/2_justkeys
@@ -0,0 +1,48 @@
+**Keyword Index**
+
+<<TOC>>
+
+***changelog***
+***conversion***
+***cvs***
+***cvs log***
+***docidx***
+***docidx commands***
+***docidx language***
+***docidx markup***
+***docidx syntax***
+***doctoc***
+***doctoc commands***
+***doctoc language***
+***doctoc markup***
+***doctoc syntax***
+***doctools***
+***doctools commands***
+***doctools language***
+***doctools markup***
+***doctools syntax***
+***document***
+***documentation***
+***emacs***
+***examples***
+***faq***
+***formatter***
+***formatting engine***
+***HTML***
+***index***
+***index formatter***
+***keyword index***
+***keywords***
+***latex***
+***log***
+***manpage***
+***markup***
+***nroff***
+***plugin***
+***semantic markup***
+***table of contents***
+***TMML***
+***toc***
+***toc formatter***
+***web***
+***wiki***
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/3_kwic
new file mode 100644
index 0000000..dac7812
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/wiki-list/3_kwic
@@ -0,0 +1,251 @@
+**Keyword Index**
+
+<<TOC>>
+
+***changelog***
+ * [changelog.man%|%doctools::changelog]
+ * [cvs.man%|%doctools::cvs]
+
+***conversion***
+ * [doctools.man%|%doctools]
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
+ * [apps/dtplite.man%|%dtplite]
+ * [mpexpand.man%|%mpexpand]
+
+***cvs***
+ * [cvs.man%|%doctools::cvs]
+
+***cvs log***
+ * [cvs.man%|%doctools::cvs]
+
+***docidx***
+ * [docidx.man%|%doctools::idx]
+ * [apps/dtplite.man%|%dtplite]
+
+***docidx commands***
+ * [docidx_lang_cmdref.man%|%docidx_lang_cmdref]
+ * [docidx_lang_faq.man%|%docidx_lang_faq]
+ * [docidx_lang_intro.man%|%docidx_lang_intro]
+ * [docidx_lang_syntax.man%|%docidx_lang_syntax]
+
+***docidx language***
+ * [docidx_lang_cmdref.man%|%docidx_lang_cmdref]
+ * [docidx_lang_faq.man%|%docidx_lang_faq]
+ * [docidx_lang_intro.man%|%docidx_lang_intro]
+ * [docidx_lang_syntax.man%|%docidx_lang_syntax]
+
+***docidx markup***
+ * [docidx_lang_cmdref.man%|%docidx_lang_cmdref]
+ * [docidx_lang_faq.man%|%docidx_lang_faq]
+ * [docidx_lang_intro.man%|%docidx_lang_intro]
+ * [docidx_lang_syntax.man%|%docidx_lang_syntax]
+
+***docidx syntax***
+ * [docidx_lang_faq.man%|%docidx_lang_faq]
+ * [docidx_lang_intro.man%|%docidx_lang_intro]
+ * [docidx_lang_syntax.man%|%docidx_lang_syntax]
+
+***doctoc***
+ * [doctoc.man%|%doctools::toc]
+ * [apps/dtplite.man%|%dtplite]
+
+***doctoc commands***
+ * [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref]
+ * [doctoc_lang_faq.man%|%doctoc_lang_faq]
+ * [doctoc_lang_intro.man%|%doctoc_lang_intro]
+ * [doctoc_lang_syntax.man%|%doctoc_lang_syntax]
+
+***doctoc language***
+ * [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref]
+ * [doctoc_lang_faq.man%|%doctoc_lang_faq]
+ * [doctoc_lang_intro.man%|%doctoc_lang_intro]
+ * [doctoc_lang_syntax.man%|%doctoc_lang_syntax]
+
+***doctoc markup***
+ * [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref]
+ * [doctoc_lang_faq.man%|%doctoc_lang_faq]
+ * [doctoc_lang_intro.man%|%doctoc_lang_intro]
+ * [doctoc_lang_syntax.man%|%doctoc_lang_syntax]
+
+***doctoc syntax***
+ * [doctoc_lang_faq.man%|%doctoc_lang_faq]
+ * [doctoc_lang_intro.man%|%doctoc_lang_intro]
+ * [doctoc_lang_syntax.man%|%doctoc_lang_syntax]
+
+***doctools***
+ * [changelog.man%|%doctools::changelog]
+ * [apps/dtplite.man%|%dtplite]
+
+***doctools commands***
+ * [doctools_lang_cmdref.man%|%doctools_lang_cmdref]
+ * [doctools_lang_faq.man%|%doctools_lang_faq]
+ * [doctools_lang_intro.man%|%doctools_lang_intro]
+ * [doctools_lang_syntax.man%|%doctools_lang_syntax]
+
+***doctools language***
+ * [doctools_lang_cmdref.man%|%doctools_lang_cmdref]
+ * [doctools_lang_faq.man%|%doctools_lang_faq]
+ * [doctools_lang_intro.man%|%doctools_lang_intro]
+ * [doctools_lang_syntax.man%|%doctools_lang_syntax]
+
+***doctools markup***
+ * [doctools_lang_cmdref.man%|%doctools_lang_cmdref]
+ * [doctools_lang_faq.man%|%doctools_lang_faq]
+ * [doctools_lang_intro.man%|%doctools_lang_intro]
+ * [doctools_lang_syntax.man%|%doctools_lang_syntax]
+
+***doctools syntax***
+ * [doctools_lang_faq.man%|%doctools_lang_faq]
+ * [doctools_lang_intro.man%|%doctools_lang_intro]
+ * [doctools_lang_syntax.man%|%doctools_lang_syntax]
+
+***document***
+ * [doctools_plugin_apiref.man%|%doctools_plugin_apiref]
+
+***documentation***
+ * [doctools.man%|%doctools]
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
+
+***emacs***
+ * [changelog.man%|%doctools::changelog]
+ * [cvs.man%|%doctools::cvs]
+
+***examples***
+ * [docidx_lang_faq.man%|%docidx_lang_faq]
+ * [doctoc_lang_faq.man%|%doctoc_lang_faq]
+ * [doctools_lang_faq.man%|%doctools_lang_faq]
+
+***faq***
+ * [docidx_lang_faq.man%|%docidx_lang_faq]
+ * [doctoc_lang_faq.man%|%doctoc_lang_faq]
+ * [doctools_lang_faq.man%|%doctools_lang_faq]
+
+***formatter***
+ * [doctools_plugin_apiref.man%|%doctools_plugin_apiref]
+
+***formatting engine***
+ * [docidx_plugin_apiref.man%|%docidx_plugin_apiref]
+ * [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref]
+ * [doctools_plugin_apiref.man%|%doctools_plugin_apiref]
+
+***HTML***
+ * [doctools.man%|%doctools]
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
+ * [apps/dtplite.man%|%dtplite]
+ * [mpexpand.man%|%mpexpand]
+
+***index***
+ * [docidx_intro.man%|%docidx_intro]
+ * [docidx_plugin_apiref.man%|%docidx_plugin_apiref]
+ * [docidx.man%|%doctools::idx]
+
+***index formatter***
+ * [docidx_plugin_apiref.man%|%docidx_plugin_apiref]
+
+***keyword index***
+ * [docidx_intro.man%|%docidx_intro]
+ * [docidx.man%|%doctools::idx]
+
+***keywords***
+ * [docidx_plugin_apiref.man%|%docidx_plugin_apiref]
+
+***latex***
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
+
+***log***
+ * [cvs.man%|%doctools::cvs]
+
+***manpage***
+ * [doctools.man%|%doctools]
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
+ * [doctools_plugin_apiref.man%|%doctools_plugin_apiref]
+ * [apps/dtplite.man%|%dtplite]
+ * [mpexpand.man%|%mpexpand]
+
+***markup***
+ * [docidx_intro.man%|%docidx_intro]
+ * [docidx_lang_cmdref.man%|%docidx_lang_cmdref]
+ * [docidx_lang_faq.man%|%docidx_lang_faq]
+ * [docidx_lang_intro.man%|%docidx_lang_intro]
+ * [docidx_lang_syntax.man%|%docidx_lang_syntax]
+ * [docidx_plugin_apiref.man%|%docidx_plugin_apiref]
+ * [doctoc_intro.man%|%doctoc_intro]
+ * [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref]
+ * [doctoc_lang_faq.man%|%doctoc_lang_faq]
+ * [doctoc_lang_intro.man%|%doctoc_lang_intro]
+ * [doctoc_lang_syntax.man%|%doctoc_lang_syntax]
+ * [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref]
+ * [doctools.man%|%doctools]
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
+ * [doctools_intro.man%|%doctools_intro]
+ * [doctools_lang_cmdref.man%|%doctools_lang_cmdref]
+ * [doctools_lang_faq.man%|%doctools_lang_faq]
+ * [doctools_lang_intro.man%|%doctools_lang_intro]
+ * [doctools_lang_syntax.man%|%doctools_lang_syntax]
+ * [doctools_plugin_apiref.man%|%doctools_plugin_apiref]
+ * [apps/dtplite.man%|%dtplite]
+ * [mpexpand.man%|%mpexpand]
+
+***nroff***
+ * [doctools.man%|%doctools]
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
+ * [apps/dtplite.man%|%dtplite]
+ * [mpexpand.man%|%mpexpand]
+
+***plugin***
+ * [docidx_plugin_apiref.man%|%docidx_plugin_apiref]
+ * [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref]
+
+***semantic markup***
+ * [docidx_intro.man%|%docidx_intro]
+ * [docidx_lang_cmdref.man%|%docidx_lang_cmdref]
+ * [docidx_lang_faq.man%|%docidx_lang_faq]
+ * [docidx_lang_intro.man%|%docidx_lang_intro]
+ * [docidx_lang_syntax.man%|%docidx_lang_syntax]
+ * [docidx_plugin_apiref.man%|%docidx_plugin_apiref]
+ * [doctoc_intro.man%|%doctoc_intro]
+ * [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref]
+ * [doctoc_lang_faq.man%|%doctoc_lang_faq]
+ * [doctoc_lang_intro.man%|%doctoc_lang_intro]
+ * [doctoc_lang_syntax.man%|%doctoc_lang_syntax]
+ * [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref]
+ * [doctools_intro.man%|%doctools_intro]
+ * [doctools_lang_cmdref.man%|%doctools_lang_cmdref]
+ * [doctools_lang_faq.man%|%doctools_lang_faq]
+ * [doctools_lang_intro.man%|%doctools_lang_intro]
+ * [doctools_lang_syntax.man%|%doctools_lang_syntax]
+ * [doctools_plugin_apiref.man%|%doctools_plugin_apiref]
+
+***table of contents***
+ * [doctoc_intro.man%|%doctoc_intro]
+ * [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref]
+ * [doctoc.man%|%doctools::toc]
+
+***TMML***
+ * [doctools.man%|%doctools]
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
+ * [apps/dtplite.man%|%dtplite]
+ * [mpexpand.man%|%mpexpand]
+
+***toc***
+ * [doctoc_intro.man%|%doctoc_intro]
+ * [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref]
+ * [doctoc.man%|%doctools::toc]
+
+***toc formatter***
+ * [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref]
+
+***web***
+ * [http://tcllib.sourceforge.net/doc/docidx_lang_intro.html%|%docidx language introduction]
+
+***wiki***
+ * [docidx.man%|%doctools::idx]
+ * [doctoc.man%|%doctools::toc]
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/1_nokeys b/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/1_nokeys
new file mode 100644
index 0000000..48a3ea4
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/1_nokeys
@@ -0,0 +1 @@
+**KWIC -- INDEX**
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/2_justkeys b/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/2_justkeys
new file mode 100644
index 0000000..b2d516f
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/2_justkeys
@@ -0,0 +1,46 @@
+**Keyword Index**
+
+%|'''changelog'''| |%
+%|'''conversion'''| |%
+%|'''cvs'''| |%
+%|'''cvs log'''| |%
+%|'''docidx'''| |%
+%|'''docidx commands'''| |%
+%|'''docidx language'''| |%
+%|'''docidx markup'''| |%
+%|'''docidx syntax'''| |%
+%|'''doctoc'''| |%
+%|'''doctoc commands'''| |%
+%|'''doctoc language'''| |%
+%|'''doctoc markup'''| |%
+%|'''doctoc syntax'''| |%
+%|'''doctools'''| |%
+%|'''doctools commands'''| |%
+%|'''doctools language'''| |%
+%|'''doctools markup'''| |%
+%|'''doctools syntax'''| |%
+%|'''document'''| |%
+%|'''documentation'''| |%
+%|'''emacs'''| |%
+%|'''examples'''| |%
+%|'''faq'''| |%
+%|'''formatter'''| |%
+%|'''formatting engine'''| |%
+%|'''HTML'''| |%
+%|'''index'''| |%
+%|'''index formatter'''| |%
+%|'''keyword index'''| |%
+%|'''keywords'''| |%
+%|'''latex'''| |%
+%|'''log'''| |%
+%|'''manpage'''| |%
+%|'''markup'''| |%
+%|'''nroff'''| |%
+%|'''plugin'''| |%
+%|'''semantic markup'''| |%
+%|'''table of contents'''| |%
+%|'''TMML'''| |%
+%|'''toc'''| |%
+%|'''toc formatter'''| |%
+%|'''web'''| |%
+%|'''wiki'''| |%
diff --git a/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/3_kwic b/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/3_kwic
new file mode 100644
index 0000000..6b600af
--- /dev/null
+++ b/tcllib/modules/doctools2idx/tests/data/ok/wiki-table/3_kwic
@@ -0,0 +1,206 @@
+**Keyword Index**
+
+%|'''changelog'''| |%
+&| | [changelog.man%|%doctools::changelog] |&
+&| | [cvs.man%|%doctools::cvs] |&
+%|'''conversion'''| |%
+&| | [doctools.man%|%doctools] |&
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+&| | [mpexpand.man%|%mpexpand] |&
+%|'''cvs'''| |%
+&| | [cvs.man%|%doctools::cvs] |&
+%|'''cvs log'''| |%
+&| | [cvs.man%|%doctools::cvs] |&
+%|'''docidx'''| |%
+&| | [docidx.man%|%doctools::idx] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+%|'''docidx commands'''| |%
+&| | [docidx_lang_cmdref.man%|%docidx_lang_cmdref] |&
+&| | [docidx_lang_faq.man%|%docidx_lang_faq] |&
+&| | [docidx_lang_intro.man%|%docidx_lang_intro] |&
+&| | [docidx_lang_syntax.man%|%docidx_lang_syntax] |&
+%|'''docidx language'''| |%
+&| | [docidx_lang_cmdref.man%|%docidx_lang_cmdref] |&
+&| | [docidx_lang_faq.man%|%docidx_lang_faq] |&
+&| | [docidx_lang_intro.man%|%docidx_lang_intro] |&
+&| | [docidx_lang_syntax.man%|%docidx_lang_syntax] |&
+%|'''docidx markup'''| |%
+&| | [docidx_lang_cmdref.man%|%docidx_lang_cmdref] |&
+&| | [docidx_lang_faq.man%|%docidx_lang_faq] |&
+&| | [docidx_lang_intro.man%|%docidx_lang_intro] |&
+&| | [docidx_lang_syntax.man%|%docidx_lang_syntax] |&
+%|'''docidx syntax'''| |%
+&| | [docidx_lang_faq.man%|%docidx_lang_faq] |&
+&| | [docidx_lang_intro.man%|%docidx_lang_intro] |&
+&| | [docidx_lang_syntax.man%|%docidx_lang_syntax] |&
+%|'''doctoc'''| |%
+&| | [doctoc.man%|%doctools::toc] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+%|'''doctoc commands'''| |%
+&| | [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref] |&
+&| | [doctoc_lang_faq.man%|%doctoc_lang_faq] |&
+&| | [doctoc_lang_intro.man%|%doctoc_lang_intro] |&
+&| | [doctoc_lang_syntax.man%|%doctoc_lang_syntax] |&
+%|'''doctoc language'''| |%
+&| | [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref] |&
+&| | [doctoc_lang_faq.man%|%doctoc_lang_faq] |&
+&| | [doctoc_lang_intro.man%|%doctoc_lang_intro] |&
+&| | [doctoc_lang_syntax.man%|%doctoc_lang_syntax] |&
+%|'''doctoc markup'''| |%
+&| | [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref] |&
+&| | [doctoc_lang_faq.man%|%doctoc_lang_faq] |&
+&| | [doctoc_lang_intro.man%|%doctoc_lang_intro] |&
+&| | [doctoc_lang_syntax.man%|%doctoc_lang_syntax] |&
+%|'''doctoc syntax'''| |%
+&| | [doctoc_lang_faq.man%|%doctoc_lang_faq] |&
+&| | [doctoc_lang_intro.man%|%doctoc_lang_intro] |&
+&| | [doctoc_lang_syntax.man%|%doctoc_lang_syntax] |&
+%|'''doctools'''| |%
+&| | [changelog.man%|%doctools::changelog] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+%|'''doctools commands'''| |%
+&| | [doctools_lang_cmdref.man%|%doctools_lang_cmdref] |&
+&| | [doctools_lang_faq.man%|%doctools_lang_faq] |&
+&| | [doctools_lang_intro.man%|%doctools_lang_intro] |&
+&| | [doctools_lang_syntax.man%|%doctools_lang_syntax] |&
+%|'''doctools language'''| |%
+&| | [doctools_lang_cmdref.man%|%doctools_lang_cmdref] |&
+&| | [doctools_lang_faq.man%|%doctools_lang_faq] |&
+&| | [doctools_lang_intro.man%|%doctools_lang_intro] |&
+&| | [doctools_lang_syntax.man%|%doctools_lang_syntax] |&
+%|'''doctools markup'''| |%
+&| | [doctools_lang_cmdref.man%|%doctools_lang_cmdref] |&
+&| | [doctools_lang_faq.man%|%doctools_lang_faq] |&
+&| | [doctools_lang_intro.man%|%doctools_lang_intro] |&
+&| | [doctools_lang_syntax.man%|%doctools_lang_syntax] |&
+%|'''doctools syntax'''| |%
+&| | [doctools_lang_faq.man%|%doctools_lang_faq] |&
+&| | [doctools_lang_intro.man%|%doctools_lang_intro] |&
+&| | [doctools_lang_syntax.man%|%doctools_lang_syntax] |&
+%|'''document'''| |%
+&| | [doctools_plugin_apiref.man%|%doctools_plugin_apiref] |&
+%|'''documentation'''| |%
+&| | [doctools.man%|%doctools] |&
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&
+%|'''emacs'''| |%
+&| | [changelog.man%|%doctools::changelog] |&
+&| | [cvs.man%|%doctools::cvs] |&
+%|'''examples'''| |%
+&| | [docidx_lang_faq.man%|%docidx_lang_faq] |&
+&| | [doctoc_lang_faq.man%|%doctoc_lang_faq] |&
+&| | [doctools_lang_faq.man%|%doctools_lang_faq] |&
+%|'''faq'''| |%
+&| | [docidx_lang_faq.man%|%docidx_lang_faq] |&
+&| | [doctoc_lang_faq.man%|%doctoc_lang_faq] |&
+&| | [doctools_lang_faq.man%|%doctools_lang_faq] |&
+%|'''formatter'''| |%
+&| | [doctools_plugin_apiref.man%|%doctools_plugin_apiref] |&
+%|'''formatting engine'''| |%
+&| | [docidx_plugin_apiref.man%|%docidx_plugin_apiref] |&
+&| | [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref] |&
+&| | [doctools_plugin_apiref.man%|%doctools_plugin_apiref] |&
+%|'''HTML'''| |%
+&| | [doctools.man%|%doctools] |&
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+&| | [mpexpand.man%|%mpexpand] |&
+%|'''index'''| |%
+&| | [docidx_intro.man%|%docidx_intro] |&
+&| | [docidx_plugin_apiref.man%|%docidx_plugin_apiref] |&
+&| | [docidx.man%|%doctools::idx] |&
+%|'''index formatter'''| |%
+&| | [docidx_plugin_apiref.man%|%docidx_plugin_apiref] |&
+%|'''keyword index'''| |%
+&| | [docidx_intro.man%|%docidx_intro] |&
+&| | [docidx.man%|%doctools::idx] |&
+%|'''keywords'''| |%
+&| | [docidx_plugin_apiref.man%|%docidx_plugin_apiref] |&
+%|'''latex'''| |%
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&
+%|'''log'''| |%
+&| | [cvs.man%|%doctools::cvs] |&
+%|'''manpage'''| |%
+&| | [doctools.man%|%doctools] |&
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&
+&| | [doctools_plugin_apiref.man%|%doctools_plugin_apiref] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+&| | [mpexpand.man%|%mpexpand] |&
+%|'''markup'''| |%
+&| | [docidx_intro.man%|%docidx_intro] |&
+&| | [docidx_lang_cmdref.man%|%docidx_lang_cmdref] |&
+&| | [docidx_lang_faq.man%|%docidx_lang_faq] |&
+&| | [docidx_lang_intro.man%|%docidx_lang_intro] |&
+&| | [docidx_lang_syntax.man%|%docidx_lang_syntax] |&
+&| | [docidx_plugin_apiref.man%|%docidx_plugin_apiref] |&
+&| | [doctoc_intro.man%|%doctoc_intro] |&
+&| | [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref] |&
+&| | [doctoc_lang_faq.man%|%doctoc_lang_faq] |&
+&| | [doctoc_lang_intro.man%|%doctoc_lang_intro] |&
+&| | [doctoc_lang_syntax.man%|%doctoc_lang_syntax] |&
+&| | [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref] |&
+&| | [doctools.man%|%doctools] |&
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&
+&| | [doctools_intro.man%|%doctools_intro] |&
+&| | [doctools_lang_cmdref.man%|%doctools_lang_cmdref] |&
+&| | [doctools_lang_faq.man%|%doctools_lang_faq] |&
+&| | [doctools_lang_intro.man%|%doctools_lang_intro] |&
+&| | [doctools_lang_syntax.man%|%doctools_lang_syntax] |&
+&| | [doctools_plugin_apiref.man%|%doctools_plugin_apiref] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+&| | [mpexpand.man%|%mpexpand] |&
+%|'''nroff'''| |%
+&| | [doctools.man%|%doctools] |&
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+&| | [mpexpand.man%|%mpexpand] |&
+%|'''plugin'''| |%
+&| | [docidx_plugin_apiref.man%|%docidx_plugin_apiref] |&
+&| | [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref] |&
+%|'''semantic markup'''| |%
+&| | [docidx_intro.man%|%docidx_intro] |&
+&| | [docidx_lang_cmdref.man%|%docidx_lang_cmdref] |&
+&| | [docidx_lang_faq.man%|%docidx_lang_faq] |&
+&| | [docidx_lang_intro.man%|%docidx_lang_intro] |&
+&| | [docidx_lang_syntax.man%|%docidx_lang_syntax] |&
+&| | [docidx_plugin_apiref.man%|%docidx_plugin_apiref] |&
+&| | [doctoc_intro.man%|%doctoc_intro] |&
+&| | [doctoc_lang_cmdref.man%|%doctoc_lang_cmdref] |&
+&| | [doctoc_lang_faq.man%|%doctoc_lang_faq] |&
+&| | [doctoc_lang_intro.man%|%doctoc_lang_intro] |&
+&| | [doctoc_lang_syntax.man%|%doctoc_lang_syntax] |&
+&| | [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref] |&
+&| | [doctools_intro.man%|%doctools_intro] |&
+&| | [doctools_lang_cmdref.man%|%doctools_lang_cmdref] |&
+&| | [doctools_lang_faq.man%|%doctools_lang_faq] |&
+&| | [doctools_lang_intro.man%|%doctools_lang_intro] |&
+&| | [doctools_lang_syntax.man%|%doctools_lang_syntax] |&
+&| | [doctools_plugin_apiref.man%|%doctools_plugin_apiref] |&
+%|'''table of contents'''| |%
+&| | [doctoc_intro.man%|%doctoc_intro] |&
+&| | [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref] |&
+&| | [doctoc.man%|%doctools::toc] |&
+%|'''TMML'''| |%
+&| | [doctools.man%|%doctools] |&
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&
+&| | [apps/dtplite.man%|%dtplite] |&
+&| | [mpexpand.man%|%mpexpand] |&
+%|'''toc'''| |%
+&| | [doctoc_intro.man%|%doctoc_intro] |&
+&| | [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref] |&
+&| | [doctoc.man%|%doctools::toc] |&
+%|'''toc formatter'''| |%
+&| | [doctoc_plugin_apiref.man%|%doctoc_plugin_apiref] |&
+%|'''web'''| |%
+&| | [http://tcllib.sourceforge.net/doc/docidx_lang_intro.html%|%docidx language introduction] |&
+%|'''wiki'''| |%
+&| | [docidx.man%|%doctools::idx] |&
+&| | [doctoc.man%|%doctools::toc] |&