Fixing HieroTeX on OS X Lion.

I have some weird hobbies, including puttering with ancient languages.  As part of that, I’d like to be able to typeset Egyptian hieroglyphic (not ‘hieroglyphics’:  pet peeve of mine.  Hieroglyphic is the language, hieroglyphs are the characters;  saying ‘hieroglyphics’ is like saying ‘I speak Frenchs’) in LaTeX using TeXShop for OS X.  There’s a great package for doing this, HieroTeX, and TeXShop actually comes with clear and usable instructions for installing it to work on a Mac (see the instructions in ~/Library/TeXShop/Engines/Inactive/Hiero).  Unfortunately, there’s one problem:  HieroTeX, as it is currently compiled and distributed, is a PowerPC application that requires Rosetta to run.  Since Lion has been removed from Lion, the first time you try to typeset anything using TeXShop and HieroTeX, the process will fail with a pop-up telling you that the executable file sesh is no longer supported because it is a PowerPC application.

I’ve managed to recompile the sesh executable from source on a Lion machine.  If you’re running TeXShop on Lion, this may help you.

Here’s how to fix this.  The short version:

  1. FOLLOW THE TEXSHOP DIRECTIONS FIRST.
  2. Download sesh.zip from here, and unzip the file (let’s say onto your Desktop).
  3. Place the new sesh into /usr/texbin (you will likely be asked for your admin password):   cd ~/Desktop; sudo cp sesh /usr/texbin

This isn’t guaranteed to work at all, but I’ve tested it with TeXShop 3.06 running on Lion (10.7.2).  Lion should be the only version of OS X that requires this fix (I think).

The long way is to recompile sesh from source yourself.  If you want to do that, you’ll need to grab the source from here.  Get the file called HieroTex.tar.gz and unzip it.  It will create a source tree with the sesh source in the Seshnesu subdirectory.  To make it, use make sesh (or muck with the variables in HieroTex/variable.mk first, but it worked for me without changes).  Unfortunately, trying to compile the unmodified source will fail because the code uses malloc.h, which is outdated and won’t be found on Lion.  To fix this, grep the source files and replace every instance of #import <malloc.h> with #import <stdlib.h>, unless it has already been imported elsewhere in the file, in which case just delete the malloc line.  It should compile now, and you can move it to the texbin directory as above.  After that, TeXShop should successfully typeset HieroTeX.  A word of warning:  the first round of typesetting after installing HieroTeX and replacing sesh will take forever as the fonts get sorted out.  Just go get yourself a drink and wait.  If you like, here’s a simple file to test the install that I got from the HieroTeX manual:

\documentclass{article}
\usepackage{hiero}
\begin{document}
\begin{hieroglyph}
A1 \end{hieroglyph}
\end{document}

If this file is successfully typeset by TeXShop, you’re up and running!

Advertisements
Tagged , , , , ,

One thought on “Fixing HieroTeX on OS X Lion.

  1. Luis SF says:

    Hi,
    I have tried to install HieroTeX on a Mac OS X 10.10.1 system with TeX Live 2014 (fully updated) and TeXShop v3.50 going through the steps 1–3 (the short version mentioned). Every thing went fine, and when I first typeset the example code it took forever, as indicated. However, it did not work, output was merely an ‘A1’. Second round of typesetting was much, much faster done but still produced the same output.

    Does the author, or any other reader, have any experience in installing HieroTeX on Mac OS X systems later than v. 10.7 ??

    Any hints or recomendations to make this fix work would be received happily!

    PS. I genuinely do _not_ think ancient languages (and scripts) are a weird hobby.. it’s a wonderful hobby!

    Many regards,
    Luis

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s