diff style @ 79:f3c95ee96cc4

Moved TOC from end to beginning; extended makefile. The TOC generation concept and idea was inspired by the book ``UNIX Text Processing''.
author markus schnalke <meillo@marmaro.de>
date Wed, 06 Jun 2012 10:56:14 +0200
parents 0947c24dd4c6
children 5fb821ed6f3c
line wrap: on
line diff
--- a/style	Tue Jun 05 22:24:10 2012 +0200
+++ b/style	Wed Jun 06 10:56:14 2012 +0200
@@ -88,6 +88,11 @@
 .	rs
 ..
 
+.de T_  \" add entry to TOC: .T_ pre-space indent-level text
+.tm TOC____.sp \\$1
+.tm TOC____\&\\h'\\$2u*2u*\\n(PIu'\\$3\0\0\a\t\\n(PN\fR
+..
+
 .rm NH
 .de NH
 .SH
@@ -157,14 +162,9 @@
 .	lg
 .ds _C "\\$1
 .	RT
-.	XS
-.	sp .5v
-.	B
-.ie \\n(.$=1 \{\
-\\*(SN \\$1
-.\}
-.el .if ,\\$2,no, \&\\$1
-.	XE
+.rm t_
+.if !,\\$2,no, .ds t_ \\*(SN\0\0
+.T_ .5v 0 "\fB\\*(t_\\$1
 .EH "\\\\*(_E
 .ie \\n(H1 .OH "\\\\*(_O
 .el .OH "\\\\*(_o
@@ -205,11 +205,8 @@
 .	lg
 .	RT
 .if !'\\$2'no' \{\
-.ds _S "\\$1
-.	XS
-.	sp .3v
-	\\*(SN \\$1
-.	XE
+.	ds _S "\\$1
+.	T_ .3v 1 "\\*(SN\0\0\\$1
 .\}
 .nr PP 0
 ..
@@ -222,9 +219,7 @@
 \\$1
 .RT
 .ds _S "\\$1
-.XS
-		\\*(SN \\$1
-.XE
+.T_ 0 2 "\\*(SN\0\0\\$1
 .nr PP 0
 ..