When I started learning Ancient Egyptian, I wanted to be able to type hieroglyphs alongside regular text, for printing translations. There is a package for the typesetting system LaTeX which does this, called “HieroTeX”. It took me a while to figure out how to use it, but the results are top-notch:
Since I’ve installed this on a few computers, I’m writing up this blog post to make it easier for other Linux users who are trying to figure it out.
Installation
This is tricky, because:
- There is no Debian package! Uh oh.
- Debian is phasing out
tetex
in favour oftexlive
- The
variables.mk
file needs to be edited for the install to work (diff to apply / how to apply it). This is because the default installation target is the user’s home directory.
I put togethter this script, hierotex-install-3.5.sh, which will get a working HieroTeX
install on any recent version of Debian.
#!/bin/sh
# Script to download and install HieroTeX on a Debian computer.
# Use at your own risk.
#
# Some packages you should install first:
# apt-get install texlive make gcc
# Get and extract the files
wget -c "http://webperso.iut.univ-paris8.fr/~rosmord/archives/HieroTeX-3.5.tgz" &&
tar xvzf "HieroTeX-3.5.tgz" &&
cd HieroTeX &&
wget -c "http://webperso.iut.univ-paris8.fr/~rosmord/archives/HieroType1-3.1.4.tgz" &&
tar xvzf "HieroType1-3.1.4.tgz"
# Patch variable.mk to install for the whole system
wget https://mike42.me/static/blog/files/variable.patch &&
patch variable.mk < variable.patch
# Run the installer
sudo make tetex-install
Note: This page is great, but the variables.mk
suggested for Debian/Ubuntu does not include the documentation folder, which will cause the installer to crash. It also suggests using tetex
, which will not exist in future Debian releases! This is probably fine if you are on a .rpm
-flavoured distro.
How to use
Firstly, you will need to know a little bit about the LaTeX typesetting system. See wikibooks.
HieroTeX accepts markup in Manuel de Codage format, which you will either need to learn, or get a tool which helps you mark up text in it. This Linux for Egyptologists page has some excellent suggestions.
The block of LaTeX code below is from my tex-examples repo, and was used to generate the image of Tutankhamun’s cartouche above.
\documentclass[a4paper]{article}
\usepackage{hiero}
\usepackage{egypto}
\begin{document}
\section*{Egyptian hieroglyph example}
\begin{hieroglyph}zA ra < i-mn:n-t-G43-t-S34 HqA-iwn-Sma >\end{hieroglyph} \\
{\em Tutankhamun Hekaiunushema} \\
Living Image of Amun, ruler of Upper Heliopolis
\end{document}
To build the file, you need to filter it through sesh
command. Something like this would work:
cat hierotex-example.tex | sesh > hierotex-example-2.tex
latex hierotex-example-2.tex
The actual example uses a Makefile to do this.
Update May 2016: The original website for HieroTeX has gone offline, but is available via the Internet Archive: webperso.iut.univ-paris8.fr/~rosmord/archives/