On 9/15/20, G. Branden Robinson <g.branden.robin...@gmail.com> wrote: > At 2020-09-16T00:13:30+1000, John Gardner wrote: >> .if n \{\ >> .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ >> \\$1 >> .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz >> .\} > > Oh, no! I went to the trouble of implementing new requests (.stringup, > .stringdown) to keep people from having to type (or copy and paste) > messes like the above,
Straying away from man-page considerations and comparing these two approaches in general: The .string* requests also have the advantage of handling alphabetic Latin-1 characters and the roff escapes that represent them (though .stringup fails kind of messily on roff escapes representing nonalphabetic Latin-1 characters, such as \[de]). However, if input must go through preconv, the .string* requests remove all non-ASCII characters (alphabetic or otherwise) from strings passed to them and emit warnings for each one. The .tr approach, while failing to convert non-ASCII alphabetic characters, does preserve them. .tr is also portable to non-groff roffs. So there are trade-offs to either approach.