[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] An uppercase mode
From: |
Anton Shepelev |
Subject: |
Re: [Groff] An uppercase mode |
Date: |
Wed, 23 Nov 2011 17:50:30 +0400 |
Thanks for your reply, Werner:
> What about doing it the naive way?
>
> File `lcuc' in UTF-8 encoding:
> [...]
> Provided you have proper PS fonts, this works with
> -Tps also.
>
> Am I missing something?
Your example works perfectly with -Tutf8 if the
source file is in UTF-8 and the -K preprocessor is
used, and was the first thing that I tried. But it
does not work either for -Tlatin1, or for -Tutf8
with the source in KOI8-R, which is converted to
Unicode entities using your koi8-r.tmac (included by
mru_utf8):
#input: a text file in KOI8-R
#ouput: a text file in KOI8-R
#(ru.tmac here defines no character translations,
# only hyphenation codes and patterns)
groff -Tlatin1 -mm -mru test.mm > test.txt
#input: a text file in KOI8-R
#ouput: a text file in UTF-8
#(ru_utf8.tmac defines character translations of 8-bit input chars onto
# corresponding unicode entities, according to the KOI8-R encoding)
groff -Tutf8 -mru_utf8 -mm test.mm > test.txt
#input: a text file in KOI8-R
#ouput: a PostScript file
groff -Tps -mru_utf8 -mm test.mm > test.ps
Your suggestion doesn't work with either of these
(otherwise functional) scenarios. I understand why
it is not suitable for the second and third exam-
ples -- that's probably because .tr "doesn't handle
translations of translations", which can be mended
by a bigger device-dependent .tr request like this
(this e-mail is in KOI8-R):
.tr а\[u0410]
.tr б\[u0411]
.tr в\[u0412]
...
But I couldn't come up with anything similar for
-Tlatin1. This doesn't work:
.tr а\[char225]
.tr б\[char226]
.tr в\[char247]
...
Of course, I could use iconv to preconvert the input
file to UTF-8 and, when needed, convert the result-
ing file back to KOI8-R, thereby using groff the way
you suggested (with -K), but I think it's cumber-
some...
Anton
- [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