How to enter Greek characters in Emacs

后端 未结 10 1626
说谎
说谎 2021-01-30 11:20

This page indicates that Greek letters can be inserted into Emacs by using M-i. However, Emacs 23.2.1 in a Debian Squeeze variant inserts the \"tab\" character when

10条回答
  •  不知归路
    2021-01-30 11:38

    A cousin of Rasmus' answer for non-TeX/LaTeX needs:

    M-x set-input-method RET C-\ greek RET
    or
                     C-x RET C-\ greek RET
    

    OR

    M-x set-input-method RET C-\ greek-babel RET
    or
                     C-x RET C-\ greek-babel RET
    

    Either of these give you input methods where typing for instance the single keystroke, 'a' simply gets you an alpha (α), 'b' gets you a beta (β) and so forth.

    After that, all you have to type is

    C-\
    

    to toggle back and forth from your default input method to the greek method very quickly. Quite handy.

    But you have to watch out: The keys don't always match the sounds. For instance, typing hello gets you ηελλο. This is because they made it so the 'h' key becomes a greek eta (η), simply because the η looks like an h, and because the capital Greek eta (H) is the same as our 'H', even though it was pronounced differently.

    The advantage of the greek-babel input method over just the greek will be appreciated mostly by those who work with the more advanced/complicated Attic Greek, which used a lot of accents. (Attic was used in Athens in Plato's time ~400BC, although the accents and lower-case letters were added centuries later.) You can hit the two keys < o and you get ὁ. The backwards apostrophe is an 'h' sound, called a 'rough breathing' -- thus ὁ is pronounced 'ho'. Accents are super easy and FAST. And you can combine accents over the same character. For instance, hit the three keys > ' a and you get ἄ. If you don't need the accents, just use the greek input method.

    With both the greek and greek-babel input methods, you can also hit C-h C-\ to get a Help buffer on the input method, which includes a lovely table of all the possible keystroke combinations available to you. (C-x o to move to next window, so you can get to that info window and scroll down..)

    See also https://www.emacswiki.org/emacs/InputMethods

提交回复
热议问题