aboutsummaryrefslogtreecommitdiff
path: root/g.tmac
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-19 15:51:07 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-19 15:51:26 +0200
commitb1a921c0d05f27d095704dd2cf31359414f262f1 (patch)
tree504d76a7ffc071fcc6413ee893b6e995d74a290b /g.tmac
parentde908e14da32de8b583734c38932c2f6b1263b11 (diff)
downloadmk-b1a921c0d05f27d095704dd2cf31359414f262f1.tar.gz
Add consistent amount of space after date/name/title
Diffstat (limited to 'g.tmac')
-rw-r--r--g.tmac37
1 files changed, 21 insertions, 16 deletions
diff --git a/g.tmac b/g.tmac
index d9e2bed..14c057f 100644
--- a/g.tmac
+++ b/g.tmac
@@ -120,6 +120,27 @@
. ds _penv \*[_env]
. ds _env \$1
.
+. \" post-environment operations
+. if !'\$1'' \{\
+. \" add small space after title
+. if '\*[_penv]'t' \{\
+. if '\*[_env]'n' .sp 0.1v
+. if '\*[_env]'d' .sp 0.1v
+. \}
+.
+. \" add space after date/name/title
+. if !'\*[_env]'n' .if !'\*[_env]'d' \{\
+. nr _dnt 0
+. ie '\*[_penv]'t' .nr _dnt 1
+. el .ie '\*[_penv]'n' .nr _dnt 1
+. el .if '\*[_penv]'d' .nr _dnt 1
+. if \n[_dnt]==1 \{\
+. sp 0.5i
+. ns
+. \}
+. \}
+. \}
+.
. \" activate new environment
. if !'\$1'' \{\
. ev \$1
@@ -127,22 +148,6 @@
. nr ti \n[\n[.ev]_ti]
. sp \n(spu
. \}
-.
-. \" post-environment operations
-. if '\$1'' .return
-.
-. \" add small space after title
-. if '\*[_penv]'t' \{\
-. if '\*[_env]'n' .sp 0.1v
-. if '\*[_env]'d' .sp 0.1v
-. \}
-.
-. \" add space after title/name/date
-. if '\*[_env]'n' .return
-. if '\*[_env]'d' .return
-. ie '\*[_penv]'t' .sp 1v
-. el .ie '\*[_penv]'n' .sp 1v
-. el .if '\*[_penv]'d' .sp 1v
..
.
. \" _ec -- copy environment