Edward’s Rambling Blag

June 11, 2009

Typesetting Ancient Greek with Ligatures in XeLaTeX

Filed under: TeX — edward @ 9:40 pm

Recently, I found a wonderful OpenType font for Ancient Greek called Alexander (it comes with a nice italic Latin script too) – unlike other Greek fonts which I use & like (such as GFS Porson), this one comes with Ligatures! (Oh the excitement).

Unfortunately, I could not figure out how to get the Ligatures to be used in a multi-lingual document — if I just did \setmainfont[Ligatures={Rare,Historical}]{Alexander} it would work, but if I used the Polyglossia package and defined \newfontfamily\greekfont[Ligatures={Rare,Historical}]{Alexander} then the ligatures would not come up inside blocks of \textgreek{}. Hmmm. After much searching, I found out that you have to put Language=Greek and Script=Greek inside the options block of the font.

A nice long example would be done thus:

\usepackage{polyglossia,fontspec}
\setmainlanguage{english}
\setotherlanguages{ancientgreek}
\newfontfamily\greekfont[Ligatures={Rare,Historical},Script=Greek,Language=Greek]{Alexander}
\begin{document}
Some English text goes here (in the default font, normally "Latin Modern").
\textgreek{τῆς Τυνδαρ θυγατρὸς} -- some text in the Greek script
                                          font that you defined with \newfontfamily\greekfont
                                          -- now with ligatures! Great!

However, I recommend that you turn off the “Historical” ligatures option, unless you’re a bit manic — it has a rather weird omicron-upsilon ligature that modern eyes would not immediately read as such.

December 27, 2008

Calculator Buttons in LaTeX

Filed under: TeX — edward @ 9:52 pm

After a bit of searching, I found that the best way of typesetting the buttons on calculators (or anything else) in LaTeX is to use the keystroke package thusly:

\usepackage{keystroke}

To calculate $\binom{7}{4} on a calculator, press \keystroke{7} \keystroke{$_nC_r$} \keystroke{4}.

December 7, 2008

Fedora 10

Filed under: Fedora — edward @ 12:48 pm

So I gave up trying to upgrade from Fedora 9 to Fedora 10… the F9 installation was pretty borked anyway, so I can’t really blame Fedora for messing up completely.

Fedora 10 looks really rather brilliant, with, among other things, PulseAudio *and* PackageKit working flawlessly out of the box, even with the RPMFusion and the PlanetCCRMA repositories enabled. This is probably the best release since FC5 (Although Fedora 7 was pretty good too).

Now to try the the infamous NVidia binary blob driver (about the only proprietary thing left on the box these days)…

December 6, 2008

Fedora 10 Upgrade Woes

Filed under: Fedora — edward @ 9:37 pm

If you ever upgrade from Fedora 9 to Fedora 10, and your computer appears to die horribly, with only the mouse visible, here’s (vaguely) what to do:

- Log in to the machine via ssh.

- Install the smart package manager. Run “smart fix” as root.

- If you get the error “symbol lookup error: /usr/lib64/libcairo.so.2: undefined symbol: pixman_region32_init” all the time, you have to:

- Go to http://www.cairo.org/

- Download a recent cairo snapshot

- Compile and install it yourself

Fortunately things worked for me after this!

November 6, 2008

Shower-Propelled Bicycle

Filed under: Random — edward @ 1:47 am

Imagine my dismay when I woke up this evening and found that there were no Google results for this phrase!

Now there will be. Order is restored.

October 15, 2008

Fedora 9 (First Post)

Filed under: Fedora — edward @ 12:01 am

Well… Fedora 9 seemed OK, until a dodgy (albeit rather lengthy) update rendered HAL, DBUS, Pulseaudio, Syslog & PolicyKit unusable. This had the rather unfriendly side-effect of making the system hang about 3/4 of the way through boot. Booting into init run level 1 didn’t help much, so I chrooted into the installation from a LiveCD (the installation CD in rescue mode, incidentally) and added the Fedora 10 repositories (on a whim). I then installed the F10 versions of whatever packages I thought I was getting errors with. So now it all works! (Except for PolicyKit & Pulseaudio.)

I just looked back at that and realised what a ridiculous amount of jargon I managed to spew out in a few sentences. Eh well.

Oh, and obligatory: First Post!!111!

Powered by WordPress