aboutsummaryrefslogtreecommitdiff
path: root/toc
diff options
context:
space:
mode:
Diffstat (limited to 'toc')
-rw-r--r--toc/Makefile2
-rw-r--r--toc/example.pdfbin0 -> 9350 bytes
-rw-r--r--toc/example.t30
-rwxr-xr-xtoc/toc2
-rw-r--r--toc/toc.tmac21
5 files changed, 55 insertions, 0 deletions
diff --git a/toc/Makefile b/toc/Makefile
new file mode 100644
index 0000000..216673b
--- /dev/null
+++ b/toc/Makefile
@@ -0,0 +1,2 @@
+example.pdf: example.t
+ ./toc example.t | groff -Tps example.t | ps2pdf - > example.pdf
diff --git a/toc/example.pdf b/toc/example.pdf
new file mode 100644
index 0000000..5f47889
--- /dev/null
+++ b/toc/example.pdf
Binary files differ
diff --git a/toc/example.t b/toc/example.t
new file mode 100644
index 0000000..e725a98
--- /dev/null
+++ b/toc/example.t
@@ -0,0 +1,30 @@
+.so toc.tmac
+.
+.de H
+. ft B
+. ps +2p
+. vs +1p
+. sp 12p
+\&\\$*
+. br
+. ft
+. ps
+. vs
+. te .toce \\n% \\$*
+..
+.
+.de toce
+. nr _ \\$1
+. shift
+. tl '\\$*''\\n_'
+..
+.
+.sp |1i
+.to
+.sp 12p
+This is a demonstration of toc.tmac.
+.br
+.H Introduction
+.H Background
+.H Results
+.H Summary
diff --git a/toc/toc b/toc/toc
new file mode 100755
index 0000000..e8de341
--- /dev/null
+++ b/toc/toc
@@ -0,0 +1,2 @@
+#!/bin/sh
+troff -rT=1 -zE "$@" 2>&1
diff --git a/toc/toc.tmac b/toc/toc.tmac
new file mode 100644
index 0000000..83e05a0
--- /dev/null
+++ b/toc/toc.tmac
@@ -0,0 +1,21 @@
+.\" "/.
+.\" toc.tmac "/.
+.\" "/.
+.\" Permission to use, copy, modify and/or "/.
+.\" distribute this software for any purpose "/.
+.\" with or without fee is hereby granted. "/.
+.\" "/.
+.
+.eo
+.
+.\" to -- evaluate collected lines
+.de to
+. if \nT=0 .rd
+..
+.
+.\" te -- collect line
+.de te
+. if \nT>0 .tm \$*
+..
+.
+.ec