summaryrefslogtreecommitdiffstats
path: root/roff.7
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-28 14:17:11 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-28 14:17:11 +0000
commit15696d5c38136940b4cfd2a42f1cc5a6760472cb (patch)
tree92c15c2969443a6e8a3f4864cc0916a5f5f66a24 /roff.7
parent03a134b6041e592a5b647372a29677cbeb0a86fc (diff)
downloadmandoc-15696d5c38136940b4cfd2a42f1cc5a6760472cb.tar.gz
An implementation of `tr'. This routes allocations of TEXT nodes
through libroff, which does the appropriate translations of `tr'. This is SLOW: it uses the backend of `ds' and `de', which is a simple linear list. However, unlike `ds' and `de', it iterates over EACH CHARACTER of the entire file looking for replacements.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.719
1 files changed, 15 insertions, 4 deletions
diff --git a/roff.7 b/roff.7
index 58968836..fa6c7095 100644
--- a/roff.7
+++ b/roff.7
@@ -584,10 +584,21 @@ This line-scoped request can take an arbitrary number of arguments.
Currently, it is ignored including its arguments.
.Ss \&tr
Output character translation.
-This request is intended to have one argument,
-consisting of an even number of characters.
-Currently, it is ignored including its arguments,
-and the number of arguments is not checked.
+Its syntax is as follows:
+.Pp
+.D1 Pf \. Cm \&tr Ar [ab]+
+.Pp
+Pairs of
+.Ar ab
+characters are replaced
+.Ar ( a
+for
+.Ar b ) .
+Replacement (or origin) characters may also be character escapes; thus,
+.Pp
+.Dl tr \e(xx\e(yy
+.Pp
+replaces all invocations of \e(xx with \e(yy.
.Ss \&T&
Re-start a table layout, retaining the options of the prior table
invocation.