summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-11 19:37:16 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-11 19:37:16 -0700
commit14a88bb0d31292db0d24fb62b86070082f4eed12 (patch)
treeaecf2e5b4db9ad21ea5035a736c8301527066bcf
parentf63a408e75f279388f6d832cdc596d1072c7179b (diff)
downloadtxr-14a88bb0d31292db0d24fb62b86070082f4eed12.tar.gz
txr-14a88bb0d31292db0d24fb62b86070082f4eed12.tar.bz2
txr-14a88bb0d31292db0d24fb62b86070082f4eed12.zip
doc: italicize meta-identifers in nroff mode.
* txr.1 (meta, metn, gets): In nroff mode, don't just add angle brackets around meta symbols, but also typeset them in italic using \fI...\fP. This is useful because the output of man can be colorized when viewed using the less pager. If these symbols are italicized, then they get colored differently from surrounding text. We keep the angle brackets because it helps these words stand out as "meta" in the absence of color.
-rw-r--r--txr.114
1 files changed, 7 insertions, 7 deletions
diff --git a/txr.1 b/txr.1
index e64a0b54..f2e2539e 100644
--- a/txr.1
+++ b/txr.1
@@ -52,11 +52,11 @@
\f[4]\\$1\f[]
..
.\" like .code typesets meta-syntax
-.\" which is done in angle brackets in nroff or oblique
+.\" which is done in angle brackets + italic in nroff or oblique
.\" courier in PDF/HTML.
.de meta
. ie n \{\
-<\\$1>
+\fI<\\$1>\fP
. \}
. el \{\
\f[5]\\$1\f[]
@@ -65,7 +65,7 @@
.\" like .meta but tack on second argument with no space.
.de metn
. ie n \{\
-<\\$1>\\$2
+\fI<\\$1>\fP\\$2
. \}
. el \{\
\f[5]\\$1\f[]\\$2
@@ -146,27 +146,27 @@
. while (\\n[.$]>0) \{\
. ie "\\$1"<" \{\
. shift
-. as s <\\$1>
+. as s \fI<\\$1>\fP
. shift
. \}
. el \{\
. ie "\\$1"<<" \{\
. shift
-. as s <\\$1>\\$2
+. as s \fI<\\$1>\fP\\$2
. shift
. shift
. \}
. el \{\
. ie "\\$1">>" \{\
. shift
-. as s \\$1<\\$2>
+. as s \\$1\fI<\\$2>\fP
. shift
. shift
. \}
. el \{\
. ie "\\$1"<>" \{\
. shift
-. as s \\$1<\\$2>\\$3
+. as s \\$1\fI<\\$2>\fP\\$3
. shift
. shift
. shift