Ben Crowder / Blog

Blog: #ruby

Ruby glosses

A while ago I came across the CSS3 Ruby spec, but it seemed to only apply to East Asian texts. Then today I ran across it again (see User Agent Man’s post) and realized it’s perfect for glossing texts.

For example, here are the first few verses of the Chapter 2 exercise in Bennett’s An Introduction to the Gothic Language:

  1. In ( in, into ) dagam ( days ) Hērōdis ( of Herod ) þiudanis ( king ) qēmun ( came (3 pl.) ) Iōsēf ( Joseph ) jah ( and, also ) Maria ( Mary ) in ( into ) Bēþlahaím ( Bethlehem ) .
  2. jah ( and, also ) jáinar ( there, yonder ) gabar ( bore (3 sg.) ) Maria ( Mary ) Iēsu ( Jesus ) .
  3. jah ( and, also ) haírdjōs ( herdsmen ) wēsun ( were (3 pl.) ) jáinar ( there, yonder ) ana ( on, upon, in ) akra ( field )

The syntax:


    In
     (
    in, into
    ) 


    dagam
     (
    days
    ) 


    Hērōdis
     (
    of Herod
    ) 

Kind of verbose, though. If I end up using this a lot, I’ll probably write a preprocessor that lets me use abbreviated syntax — something like this:

In::(in, into) dagam::(days) Hērōdis::(of Herod)

Sidenote: I was originally using a combining macron for the macrons (U+0304), but Georgia doesn’t do the combining correctly. Times New Roman does, though. Weird. I ended up just going with the precomposed characters. Oh well.


Reply via email or office hours