aboutsummaryrefslogtreecommitdiff
path: root/g.tmac
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-18 16:51:51 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-18 16:51:51 +0200
commit50cdca7724ef41634ec02dfac0dd4837e3a0be64 (patch)
tree904480045cd1777e5ef750a5ca2b030797f79241 /g.tmac
parent427bb11eeffae931bec991b338aefeaa7ff1de76 (diff)
downloadmk-50cdca7724ef41634ec02dfac0dd4837e3a0be64.tar.gz
Support block quotations
Diffstat (limited to 'g.tmac')
-rw-r--r--g.tmac45
1 files changed, 36 insertions, 9 deletions
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
+. \}
..
.
.