diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-28 14:17:11 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-28 14:17:11 +0000 |
commit | 15696d5c38136940b4cfd2a42f1cc5a6760472cb (patch) | |
tree | 92c15c2969443a6e8a3f4864cc0916a5f5f66a24 /roff.7 | |
parent | 03a134b6041e592a5b647372a29677cbeb0a86fc (diff) | |
download | mandoc-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.7 | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -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. |