plan9fox/sys/man/1/ktrans

122 lines
3 KiB
Plaintext

.TH KTRANS 1
.SH NAME
ktrans \- language transliterator
.SH SYNOPSIS
.B ktrans
.SH DESCRIPTION
The
.I ktrans
program works with
.IR kbdfs (8)
to transliterate typed letter sequences into characters for languages
that do not use the Latin character set, and pipes the result to
.BR /dev/cons .
The language is selected by typing a control character:
.TP
.B ctl-t
return to default English mode (no transliteration).
.TP
.B ctl-n
Japanese hiragana: interpret lower-case letters as a Hepburn
representation of hiragana. In this mode, typing ctl-\\ looks up the
last `word' in a kana-kanji dictionary and replaces it.
Subsequent ctl-\\ characters cycle through the possibilities. A word
is the longest immediately preceding unbroken string of hiragana
characters.
.TP
.B ctl-k
Japanese katakana.
.TP
.B ctl-l
If you want to put the hiragana without modification.
.TP
.B ctl-x
Reload the in-memory kana-kanji conversion dictionary (kanji jisho).
This is so you can update the kanji jisho on-the-fly. By default, the
kanji jisho is read once at the beginning, to make a hash table, which
will be arranged so that the last selected candidate will be the first
candidate for later searches.
.TP
.B ctl-r
Russian: interpret letters as Cyrillic; the transliteration is mostly
phonetic, with
.B '
for
.IR myagkij-znak
(ь),
.B ''
for
.I tverdyj-znak
(ъ)
.I yo
for ё,
.B j
for
.IR i-kratkaya
(й).
.TP
.B ctl-o
Greek.
.TP
.B ctl-s
Korean.
.PP
To use
.I ktrans
you have to run it before a rio session. You can put it on your
$home/lib/profile like:
.EX
...
ktrans
rio -i riostart
...
.EE
or run it with a sub-rio on a window like:
.EX
% @{ktrans; rio}
.EE
.PP
The default location of the kanji jisho is
.LR /lib/kanji.jisho .
You can change that by means of the
.L $jisho
environment variable, so you can keep a customized version of the
dictionary that fits your personal needs.
.PP
.SH SOURCE
.B /sys/src/cmd/ktrans
.SH SEE ALSO
.IR rio (1)
.IR kbdfs (8)
.br
.IR /sys/src/cmd/ktrans/README.kenji
.br
.IR /sys/src/cmd/ktrans/READMEJ.kenji
.SH EXAMPLES
If you want to make the Japanese text as below:
.ft Jp
私は毎日35分以上歩いて、 更に10分電車に乗って学校に通います。
健康の維持にも役だっていますが、 なかなかたのしいものです。
.ft
your keyboard typing stream should be:
[^l]watashiHA[^\\]mainichi[^\\]35[^l]fun[^\\]ijou[^\\]aruIte,
[^\\]saraNI[^\\]10[^l]fun[^\\]denshaNI[^\\]noTte[^\\]gakkouNI
[^\\]kayoImasu.[^\\]kenkouNO[^\\]ijiNImo[^\\]yakuDAtteimasuga,
[^\\]nakanakatanoshiImonodesu.
where [^\\] and [^l] indicate 'ctl-\\' and 'ctl-l',
respectively. See README.kenji for the details of this Japanese input
method.
.SH BUGS
.PP
There is no way to generate the control characters literally. At the
beggining of a new line, you have to begin with ctl-l for successful
kana-kanji conversion.
.SH HISTORY
Ktrans was originally written by Kenji Okamoto in August of 2000 for
the 2nd edition of Plan 9. It was imported in to 9front in July of
2022, with patches by several contributors.