* Quail input methods with combining characters
@ 2010-01-10 12:46 emacs.mexon
0 siblings, 0 replies; 2+ messages in thread
From: emacs.mexon @ 2010-01-10 12:46 UTC (permalink / raw
To: help-gnu-emacs
Hi,
I'd like to write an input method for Chinese pinyin. Existing pinyin
input methods are for typing characters using pinyin, "hanyu" -> "汉语",
not typing pinyin itself, "ha4nyu3" -> "hànyǔ".
My problem is that quail rules expect a single character (UCS codepoint)
as the result. But I want to insert a vowel with one or two diacritical
marks, which is a sequence of combining characters. Does anyone know
how to do this, or if it's possible?
For example, I want to type a first-tone "a". Pinyin signifies this
with a bar over the character. So when I type "a1", it should insert
"a" followed by a combining macron.
(quail-defrule "a1" ?ā)
That gives an invalid read syntax, since the character after the
question mark is really two characters.
(quail-defrule "a1" "ā")
That is accepted, but provides two options, either the unadorned "a" or
the macron alone.
There's no way I can find precomposed characters for all cases. For
example, there's no precomposed character for "ǖ" ("u" + diaresis + macron).
Does anyone know if there's a way to do this, or is quail limited to
precomposed characters?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Quail input methods with combining characters
[not found] <mailman.1194.1263179636.18930.help-gnu-emacs@gnu.org>
@ 2010-01-11 19:39 ` B. T. Raven
0 siblings, 0 replies; 2+ messages in thread
From: B. T. Raven @ 2010-01-11 19:39 UTC (permalink / raw
To: help-gnu-emacs
emacs.mexon@spamgourmet.com wrote:
> Hi,
>
> I'd like to write an input method for Chinese pinyin. Existing pinyin
> input methods are for typing characters using pinyin, "hanyu" -> "汉语",
> not typing pinyin itself, "ha4nyu3" -> "hànyǔ".
Have you looked at chinese-py-punct-b5? I notice that the tone has to go
after the (nasal?) n: han4yu3.
>
> My problem is that quail rules expect a single character (UCS codepoint)
> as the result. But I want to insert a vowel with one or two diacritical
> marks, which is a sequence of combining characters. Does anyone know
> how to do this, or if it's possible?
I tried to get an answer here as to how to stack arbitrary diacriticals
using composed sequences but I wasn't able to get an answer (at least
not one I could understand).
>
> For example, I want to type a first-tone "a". Pinyin signifies this
> with a bar over the character. So when I type "a1", it should insert
> "a" followed by a combining macron.
>
> (quail-defrule "a1" ?ā)
>
> That gives an invalid read syntax, since the character after the
> question mark is really two characters.
>
> (quail-defrule "a1" "ā")
>
> That is accepted, but provides two options, either the unadorned "a" or
> the macron alone.
>
> There's no way I can find precomposed characters for all cases. For
> example, there's no precomposed character for "ǖ" ("u" + diaresis +
> macron).
See code points U+01d5 - 6
>
> Does anyone know if there's a way to do this, or is quail limited to
> precomposed characters?
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-11 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-10 12:46 Quail input methods with combining characters emacs.mexon
[not found] <mailman.1194.1263179636.18930.help-gnu-emacs@gnu.org>
2010-01-11 19:39 ` B. T. Raven
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.