[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] An uppercase mode
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] An uppercase mode |
Date: |
Tue, 22 Nov 2011 23:06:30 +0100 (CET) |
> Sorry for the innacurate example. I used a latin letter instead of
> a Russian one and a random unicode entity just to show the kind of
> translation I was using.
>
> Here is what I want to do (the Cyrillic symbols in this e-mail are
> in KOI8-R):
>
> Input Result
>
> This is normal case This is normal case
> .br Это нормальный регистр
> Это нормальный регистр THIS IS UPPER CASE
> .br ЭТО ВЕРХНИЙ РЕГИСТР
> .UPCASE ON
> This is upper case
> .br
> Это верхний регистр
>
> But I can't find how to implement this in the latin1 device.
What about doing it the naïve way?
File `lcuc' in UTF-8 encoding:
.de UPCASE
. ie '\\$1'ON' \{\
. tr тТоОвВеЕрРхХнНиИйЙгГсС
. tr hHiIsSuUpPeErRcCaA
. \}
. el \{\
. tr ттооввееррххннииййггсс
. tr hhiissuuppeerrccaa
. \}
..
This is normal case
.br
Это нормальный регистр
.br
.UPCASE ON
This is upper case
.br
Это верхний регистр
processed with
groff -k -Tutf8 lcuc > lcuc.txt
yields
This is normal case
Это нормальный регистр
THIS IS UPPER CASE
ЭТО ВЕРХНИЙ РЕГИСТР
Provided you have proper PS fonts, this works with -Tps also.
Am I missing something?
Werner
- [Groff] An uppercase mode, Anton Shepelev, 2011/11/21
- Re: [Groff] An uppercase mode, Clarke Echols, 2011/11/21
- Re: [Groff] An uppercase mode, Werner LEMBERG, 2011/11/22
- Re: [Groff] An uppercase mode, Anton Shepelev, 2011/11/23
- [Groff] Detection of PATH_SEPARATOR in configure, Jeff Conrad, 2011/11/24
- Re: [Groff] Detection of PATH_SEPARATOR in configure, James K. Lowden, 2011/11/28
- Re: [Groff] Detection of PATH_SEPARATOR in configure, Jeff Conrad, 2011/11/30