Saturday, 26 May 2012

Getting Accented Letters in Linux Programs

I enjoyed how easy it was to type the occasional French word or phrase when I had a Macintosh computer. Pressing option e then another e gave you an e with an acute accent; pressing option-c then another c gave you a c with a cedilla. Here is a list of the most common commands. I understand that Microsoft Office eventually installed similar key combinations, but the standard Windows method involved memorizing and typing number codes on the numeric keypad while holding down the Alt key. Rather than that, I would find an accented word on-line, copy the accented letter, and paste it in. Far too much work, anyway.

I now use neither an iMac (as it was stolen) nor Windows (as I have not regarded Microsoft as an ethical company since it faked court evidence in a 1998 trial), but a free operating system called Ubuntu Linux and a free office program called LibreOffice. So, when I had to type French vocabulary worksheets for my son, I needed to discover how to type accented letters in this new environment. I'm happy to say that there is a way, that it is much easier than memorizing number codes, and it lets me type a surprising number of different characters. Mostly, if I guess how to create a character, I will be right.

Under Settings/Keyboard Layouts, I’ve set the right “Alt” key as the“Compose” key. That means I press and release the right “Alt,” then press and release a key, then another key, and I get a symbol that combines the two keys.



For example, a right alt then a hyphen and a capital L gives a pound symbol (money, that is), a right alt then an o and a c gives the copyright symbol. I do not have to memorize these key combinations because a pound symbol looks like a capital L with a horizontal line through it and a copyright symbol looks like a c with an o around it. Other symbols are created with equal logic.
    • A vowel with an accent grave (à) is made with a ` and the vowel;
    • a vowel with an accent aigu (á) is made with a single quotation mark (‘) and the vowel;
    • a c with a cedilla (ç) is made with a c and a comma;
    • a vowel with a circumflex (ê) is made with ^ and the vowel;
    • a vowel with an umlaut (ä) is made with the vowel and the “ (a double quotation mark);
    • common fractions (½ , ¼, ¾, etc.) are made by the two numbers, typed in order;
    • superscripts are made by a ^ and the superscripted symbol;
    • The “micro” sign (µ, which is the Greek letter “mu”) is made by typing an m and a u to spell "mu";
    •  a dipthong (two vowels joined into one character) are made by typing the two vowels in order.
    Two symbols that will be useful for my other project, the Beowulf translation, are letters from the Anglo-Saxon alphabet. 
    • With a hyphen plus d, I get the Old English letter eth, which looks like a d with a cross on its stem (đ ).
    • With a t and an h I get the Old English letter thorn (þ), which is pronounced like "th."
    A list of compose key characters is at http://www.hermit.org/Linux/ComposeKeys.html.

    That problem is solved. I wonder, however, about an easy way to type the occasional Greek character or word. LibreOffice has a shortcut in its Math Module. I could type %alpha to print a lower-case alpha character or %ALPHA to get an upper-case one, and so on for the other letters. I could embed a formula in the text and do this, I suppose, but it is more labor than is worthwhile. Until the word processor itself recognizes the shortcut, I suppose I simply have to pull up LibreOffice's "Special Characters" palette and hunt and peck for the letters I need. (Back in the Old Days, on a Mac, I'd just type as normal but using a Greek font, then change my font back to a Roman-letter one, but this no longer works. Sometimes progress means making things harder).

    1 comment:

    1. So silly of me! To type Greek letters, just change the font to "Symbol" and type.

      ReplyDelete