diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-22 20:30:15 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-22 20:30:15 +0200 |
commit | 0d1f04b92b1f3c369036c4c17af53e23e5d2be4e (patch) | |
tree | 18d4cc4b2b23fec3d211b1764578f601b0e0d988 | |
parent | d1c128722e4478c386aa6adab88c680c61beb72d (diff) | |
download | mk-0d1f04b92b1f3c369036c4c17af53e23e5d2be4e.tar.gz |
Add toc.tmac
-rw-r--r-- | toc/Makefile | 2 | ||||
-rw-r--r-- | toc/example.pdf | bin | 0 -> 9350 bytes | |||
-rw-r--r-- | toc/example.t | 30 | ||||
-rwxr-xr-x | toc/toc | 2 | ||||
-rw-r--r-- | toc/toc.tmac | 21 |
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 Binary files differnew file mode 100644 index 0000000..5f47889 --- /dev/null +++ b/toc/example.pdf 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 @@ -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 |