From b1a921c0d05f27d095704dd2cf31359414f262f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 19 Jun 2021 15:51:07 +0200 Subject: Add consistent amount of space after date/name/title --- g.tmac | 37 +++++++++++++++++++++---------------- 1 file 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 -- cgit v1.2.3