16 July 2007

XeTeX equals classicist joy

When I first started Aoidoi.org, before Unicode was yet widely available, I used a very ugly combination of an HTML templating engine and long Unix pipelines to turn Betacode in fake tags (thanks to the template system) into GIF images of Greek. The pipeline started with the production of a LaTeX file, which was run through latex, then dvips, then ps2gif, after which all the LaTeX goo was cleaned up.

After not too many years of that I decided to go with PDFs, which let me actually save the work of LaTeX. Over time I have accumulated a lot of extra styles to do things like metrical symbols, and multiple levels of footnotes — which I hijack into something like what Pharr's Aeneid and many other student editions look like. But until now I have had to use a very nasty encoding scheme to represent the Greek:

\GRK{o>i m`en >ipp'hwn str'oton, o>i d`e p'esdwn,}
\bgrk{o>i} $=$ \bgrk{o< i}. \SP
\bgrk{o>i m`en ... o>i d'e}, ``some... others...'' with the main verb in
line 2, \bgrk{fa~is(i)}.

Nor have I ever found a usable polytonic Greek font that I could use in LaTeX which had a bold font available. Normally the headword in vocabulary notes or comments is in bold. It makes it a lot easier to find when you're moving back and forth between the text and the help.

But now I have XeTeX, a version of LaTeX that understands Unicode, so I can use real Greek in LaTeX source now. And, better yet, XeTeX is capable of using any TT or OT font installed on your system. So now I have several usable polytonic Greek bolds to use in commentaries. There's no single family that really makes me happy — either I like the Greek side, or the Latin side, not both. When Gentium finally has the promised bold, I'll be very happy. In the meantime I'm still trying to find the best mix of fonts to get something non-awful. Here's a current attempt, Sappho PMG 976, using Gentium for the main body Greek, all the Latin, and for the bold in the notes the lovely Greek Font Society (GFS) Neohellenic Bold. I'm very partial to their Didot face on the Greek side, and it has a nice bold, but something is wonky with the Latin side.

For amusement I used the GFS font inspired by a 16th century face, GFS Complutum, to typeset the first book of the Odyssey, Rhapsodia A. The backwards "y" looking thing is a nu.

If any Hellenist reading this post decides to grab XeTeX and play around, note that 1) you really want the fontspec extra and 2) you cannot use it with metre.sty. I have hacked at fontspec.sty so that it and metre.sty play nice. Contact me if you want a copy.

1 comment:

Stephen Beck said...

Hi, I'm hoping to utilize xetex for a greek paper (I've been using LaTeX for some time) soon, but I can't seem to find quality documentation for the use of xetex or even how to install a package such as fontspec. Your post is encouraging; it can be done! Can you point me in the right direction?

Thanks much!