Writing macrons in Linux for Latin pronunciation

Frustrated with the inability to search the scanned images of the 1822 Latin textbook we’re using (Albert Harkness’ An Easy Method for Beginners in Latin – get the PDF, the full-text version is badly OCRed), W- has taken it upon himself to recreate the public-domain textbook as a fully searchable TiddlyWiki (sans illustrations). This meant that he needed to type in a great number of macrons in the words, and that meant finding a better way than copying and pasting from KDE’s character map.

Macrons turn up in many languages. In Japanese, you use them to indicate that vowels are doubled. 大阪(おおさか)can be romanized as Oosaka or Ōsaka. In Latin, beginner textbooks often use macrons (macra) to indicate pronunciation. (Why do we care about pronunciation for a dead language used mostly in church hymns? W- and I actually want to be able to use this conversationally, at least with each other. After all, if you don’t use it, you lose it.)

I suggested Emacs. In Emacs, it’s just a matter of using M-x set-input-method to choose latin-alt-postfix. With that input method, you can add macrons to letters by typing – after them. For example, typing “a -” will result in ā. Not only that, dynamic abbreviations (M-/) make it easier to retype words you’ve already written before.

W- wouldn’t hear of using Emacs, being almost as firmly wedded to vi as he is to me. ;)

Instead, we spent some time figuring out how to set up KDE and gvim to make it easier for him to type in macrons. HTML character sequences were out of the question, of course. W- used KDE’s settings to map his unused Windows key and menu key to compose keys. That made it easier to produce ē, ī, ō, and ū using the key sequence “Compose + hyphen + vowel”. However, “Compose + hyphen + a” produced ã, not ā. This was probably a bug based on some issue reports we found on the Net, but the suggested fix didn’t work (im-switch -c to change to default-xim). I found a page describing an .XCompose fix, customizing the key sequences. He copied the relevant key sequences from en-US’s locale settings for Compose in /usr/share/X11, restarted X, and it worked.

Now he’s off and typing!

2011-04-24 Sun 23:21

One Pingback/Trackback

  • vi is the lowest common denominator unlike e-macs which is a mini-OS unto itself. And for anyone who’s ever had to maintain server-side code, having vi ‘muscle-memory’ is a must.

    BUT… lest this devolve into an advocacy comment… I’m also a fan of Tiddlywiki. Have you tried Wiki-On-A-Stick?


  • vukung

    Nice solution! I’ve had the same problem a few years ago, then I used SCIM tables:

  • Brendon Robinson

    In the sentence: However, “Compose + hyphen + a” produced ã, not ā; I’m seeing both characters the same. I see they are different in the page source, but they render the same for me in Firefox 4.0, Ubuntu 10.10. :S

  • Ramon: I use both vi and Emacs, although I get really annoyed if I have to use a vi variant like nvi or elvis instead of vim. It’s like being ambidextrous. It’s good to be conversant with vi, but there’s no reason to deprive yourself of the power of a better tool for situations that fit it. ;)

    Brendon: Maybe the font?

  • Why was the Vim digraph system (http://vimdoc.sourceforge.net/htmldoc/digraph.html#Digraphs) omitted?

    You mention vi in general rather than vim in particular, so I understand why the presented solution targets the input method of the environment rather than the application itself; but I’m curious. Vim digraphs do the job, and although the default compose key (Ctrl-K) is perhaps not the friendliest, that is easy enough to rebind.

    Was it investigated and found to be unsuitable? If so, why?

  • Aha! It was because we didn’t know about the Vim digraph system, and we started with a more general search that would might also let him enter text into Konqueror. =)

    So I told W- about your tip, and he promptly spent the next five minutes typing in Latin and Greek letters. He said, “I’m impressed.” Neato!

    Thank you!

  • crr

    Hi there!

    The original solution that you came up with is fairly similar to the way it’s handled in MacOS as well. Though I’m not sure they have the straight line macron like you’re using, you can do Opt-u + the vowel for an umlaut, Opt-e + vowel for an acute and so on. You can also do the cool œ and æ as well using Opt-q and Opt-‘ respectively.

  • Pingback: "An Easy Method for Beginners in Latin" and macron-insensitive search for Tiddlywiki | sacha chua :: living an awesome life()

  • Artis

    Using any of the Latvian keyboard will work too, all macrons included, no fuss.

  • George Jones

    Do you use church or classic pronunciation?

  • Rainbowsnake

    for dead-key problem you can load \iso-transl\ by C-x 8, then also \ñ \ works, n with Tilde-Key –> n [Alt Gr]

    or load it in-emacs –> (load-library \iso-transl\)

    have a nice day

  • Beverley Eyre


    I thought that it might be worthwhile to share with you some information given to me by my Classics teacher in High School. First, FYI, I studied Latin for 9 years and, iirc was reading Ceasar’s accounts of his battles in the original Latin, which, as you know, had no punctuation and no spaces between the words (that’s why Latin has the verb at the end of the sentence, to separate sentences).

    The last classics teacher I had was Dr. Eric Cruell Baade who got his Ph.D. in Classical Languages from Yale. He took over the writing of ‘First Year Latin’ from Jenny when Jenny died (http://www.amazon.com/s/ref=ntt_athr_dp_sr_2?_encoding=UTF8&sort=relevancerank&search-alias=books&field-author=Eric%20C.%20Baade).

    Anyway, all that was to make credible my next statement. Dr. Baade insisted that no one today really knows how the Romans pronounced their language. There are *some* things that are known, for instance ‘v’ was pronounced like we pronounce a ‘w’, and all ‘c’ s were hard. But there is no certainty about much of it.

  • Great! I can worry less about it, then. =) Still working on learning Latin – it’s fun how some things are starting to come together. Thanks for the encouragement!