From 50cdca7724ef41634ec02dfac0dd4837e3a0be64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 18 Jun 2021 16:51:51 +0200 Subject: Support block quotations --- g.tmac | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) (limited to 'g.tmac') diff --git a/g.tmac b/g.tmac index 3b5bbd6..6e69316 100644 --- a/g.tmac +++ b/g.tmac @@ -1,3 +1,9 @@ +.\"----------------------------"/. +.\" MG MACRO PACKAGE FOR TROFF "/. +.\" created by JOHN ANKARSTRÖM "/. +.\" released under MIT LICENSE "/. +.\"----------------------------"/. +. .eo \" disable backslash escapes . .\" Internal macros @@ -50,11 +56,18 @@ . l \" literal display . evc 0 . nr sp 0.3v -. nr in 0.5c . nf . in 0.5c . fam C . ps -1p +. vs -1p +. q \" quotation +. evc 0 +. nr sp 0.3v +. nr ti 1c +. in 0.5c +. ps -1p +. vs -1p . _e .. . @@ -94,7 +107,6 @@ . \" save special environment variables . if !'\n[.ev]'0' \{\ . nr \n[.ev]_sp \n(sp -. nr \n[.ev]_in \n(in . nr \n[.ev]_ti \n(ti . ev . \} @@ -107,10 +119,8 @@ . if !'\$1'' \{\ . ev \$1 . nr sp \n[\n[.ev]_sp] -. nr in \n[\n[.ev]_in] . nr ti \n[\n[.ev]_ti] . sp \n(spu -. in \n(inu . \} . . \" perform post-environment operations @@ -138,17 +148,22 @@ .\" Inline macros .\" ------------- . -.\" i -- italic +.\" b -- bold font +.de b +\$3\fB\$1\fP\$2 +.. +. +.\" i -- italic font .de i \$3\fI\$1\fP\$2 .. . -.\" x -- bold italic +.\" x -- bold italic font .de x \$3\f(BI\$1\fP\$2 .. . -.\" c -- constant-width +.\" c -- constant-width font .de c \$3\c . fam \*[cfam] @@ -159,9 +174,21 @@ \$2 .. . -.\" q -- quote +. +.\" Hybrid macros +.\" ------------- +. +.\" q -- quotation .de q -\$3\(lq\$1\(rq\$2 +. +. \" inline quotation +. ie !'\$1'' \$3\(lq\$1\(rq\$2 +. +. \" block quotation +. el \{\ +. _e q +. ti \n(tiu +. \} .. . . -- cgit v1.2.3