summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-11 04:25:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-11 04:25:00 +0200
commit471556a19e68b372155095c1b11aa568735fe867 (patch)
tree04c43a70758bf9299ac5f71f72b213c0354a1e88 /tests
parenta89ee85a4b94a57e996a233c9d21679d1e1217a9 (diff)
First part of TOC generation support (no links yet)
Currently only supported in the HTML output.
Diffstat (limited to 'tests')
-rw-r--r--tests/toc/toc.cli58
-rw-r--r--tests/toc/toc.html82
2 files changed, 140 insertions, 0 deletions
diff --git a/tests/toc/toc.cli b/tests/toc/toc.cli
new file mode 100644
index 0000000..5e9c43a
--- /dev/null
+++ b/tests/toc/toc.cli
@@ -0,0 +1,58 @@
+"\h1|Table of Contents|"
+"\$TOC$"
+
+"
+\h0|Preface|
+
+This document describes something awesome.
+
+\h|About This Document|
+
+And this document is also awesome.
+
+\h|More Information|
+
+It is so awesome that no further information will be required."
+
+"
+\H|PART I|
+
+Start of part one.
+
+\h1|Introduction|
+
+Beginning of the first chapter.
+
+\h|Architecture and Workflow|
+
+Some basics.
+
+\h|Benefits|
+
+You will like them.
+
+\h1|Hello World|
+
+Beginning of the second chapter.
+
+\h|Setup|
+
+More basics.
+
+\h|Compiling|
+
+How to build the example
+
+\h2|Compiling with GCC|
+
+GCC
+
+\h2|Compiling with Clang|
+
+Clang
+
+\h|Conclusion|
+
+Some remarks.
+
+"
diff --git a/tests/toc/toc.html b/tests/toc/toc.html
new file mode 100644
index 0000000..383ff12
--- /dev/null
+++ b/tests/toc/toc.html
@@ -0,0 +1,82 @@
+ <h1>Table of Contents</h1>
+
+ <table class="toc">
+ <tr><th></th><td>Preface
+ <table class="toc">
+ <tr><th></th><td>About This Document</td></tr>
+ <tr><th></th><td>More Information</td></tr>
+ </table>
+ </td></tr>
+ <tr><th colspan="2">PART I</th></tr>
+ <tr><th>1</th><td>Introduction
+ <table class="toc">
+ <tr><th>1.1</th><td>Architecture and Workflow</td></tr>
+ <tr><th>1.2</th><td>Benefits</td></tr>
+ </table>
+ </td></tr>
+ <tr><th>2</th><td>Hello World
+ <table class="toc">
+ <tr><th>2.1</th><td>Setup</td></tr>
+ <tr><th>2.2</th><td>Compiling
+ <table class="toc">
+ <tr><th>2.2.1</th><td>Compiling with GCC</td></tr>
+ <tr><th>2.2.2</th><td>Compiling with Clang</td></tr>
+ </table>
+ </td></tr>
+ <tr><th>2.3</th><td>Conclusion</td></tr>
+ </table>
+ </td></tr>
+ </table>
+
+ <h1 class="preface">Preface</h1>
+
+ <p>This document describes something awesome.</p>
+
+ <h2>About This Document</h2>
+
+ <p>And this document is also awesome.</p>
+
+ <h2>More Information</h2>
+
+ <p>It is so awesome that no further information will be required.</p>
+
+ <h1 class="part">PART I</h1>
+
+ <p>Start of part one.</p>
+
+ <h1>Introduction</h1>
+
+ <p>Beginning of the first chapter.</p>
+
+ <h2>Architecture and Workflow</h2>
+
+ <p>Some basics.</p>
+
+ <h2>Benefits</h2>
+
+ <p>You will like them.</p>
+
+ <h1>Hello World</h1>
+
+ <p>Beginning of the second chapter.</p>
+
+ <h2>Setup</h2>
+
+ <p>More basics.</p>
+
+ <h2>Compiling</h2>
+
+ <p>How to build the example</p>
+
+ <h3>Compiling with GCC</h3>
+
+ <p>GCC</p>
+
+ <h3>Compiling with Clang</h3>
+
+ <p>Clang</p>
+
+ <h2>Conclusion</h2>
+
+ <p>Some remarks.</p>
+