aboutsummaryrefslogtreecommitdiff
path: root/g.tmac
diff options
context:
space:
mode:
Diffstat (limited to 'g.tmac')
-rw-r--r--g.tmac28
1 files changed, 22 insertions, 6 deletions
diff --git a/g.tmac b/g.tmac
index 4a7c417..6461c60 100644
--- a/g.tmac
+++ b/g.tmac
@@ -31,7 +31,7 @@
. \" initialize document
. wh 0 _ht
. wh -\n(mbu _ft
-. _ht \" trigger header
+. sp 1u \" trigger header
. ns
.
. \" configure environments
@@ -111,8 +111,9 @@
.
. \" save special environment variables
. if !'\n[.ev]'0' \{\
-. nr \n[.ev]_sp \n(sp
-. nr \n[.ev]_ti \n(ti
+. nr \n[.ev]_sp \n(sp \" vertical space before any environment
+. nr \n[.ev]_sq \n(sq \" vertical space before different environment
+. nr \n[.ev]_ti \n(ti \" first line indentation
. ev
. \}
.
@@ -145,22 +146,37 @@
. if !'\$1'' \{\
. ev \$1
. nr sp \n[\n[.ev]_sp]
+. nr sq \n[\n[.ev]_sq]
. nr ti \n[\n[.ev]_ti]
. sp \n(spu
+. if !'\*[_env]'\*[_penv]' .sp \n(squ
. \}
..
.
. \" _ec -- copy environment
.de _ec
-. evc 0
+. evc \$1
+. nr sp \n[\$1_sp]
+. nr sq \n[\$1_sq]
+. nr ti \n[\$1_ti]
..
.
.\" _ft -- footer trap
.de _ft
+.
+. \" collect overflowed text
+. di _rest
+. br
+. di
+.
+. \" print footer
. _E _m
-' sp 2v
+. sp 2v
. tl ''%''
-' bp
+. bp
+.
+. \" print overflowed text on next page
+. _rest
..
.
.\" _ht -- header trap