[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] uppercasing
From: |
Werner LEMBERG |
Subject: |
[Groff] uppercasing |
Date: |
Mon, 28 Feb 2005 14:25:13 +0100 (CET) |
Maybe some of you can use such a macro...
Werner
======================================================================
.\"
.\" .uppercase in out
.\"
.\" Convert the contents of string with name `in' to uppercase
.\" and return the result in a string with name `out'.
.\"
.\" Note that this macro by default only translates the characters a-z;
.\" if you need other characters, define them in the strings
.\" `uppercase-set' and `uppercase-reset'. Both are used with the `.tr'
.\" request; the former to set the mapping, the latter to reset it.
.\"
.de uppercase
. tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
. tr \\*[uppercase-set]
. di uppercase
. nop \\*[\\$1]
. br
. di
. asciify uppercase
. chop uppercase
. tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
. tr \\*[uppercase-reset]
. ds \\$2 \\*[uppercase]\"
..
.
.ds uppercase-set ä\[:A]
.ds uppercase-reset ä\[:a]
.
.ds xxx This Is A Täst.
.uppercase xxx yyy
.tm `\*[yyy]'
=> `THIS IS A TÄST.'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff] uppercasing,
Werner LEMBERG <=