HomeHieroglyphic typesettingHieroglyphic databasesOther hieroglyphic applications
Typesetting Arabic and CopticOther useful Egyptological applications

htxscripts by F. Vervloesem

Below are some shellscripts (i.e. Terminal-based applications) I made 1) that use HieroTex in some way or 2) that make using HieroTex a bit easier. These are the first public releases, and I haven’t been able to test them on different computers yet, so they might not work on your system (but I don’t think that’s very likely to happen).

hieroglyphshow and hieroglyphcheck (version 0.3)

A sample output image from hieroglyphshow: hieroglyph Gardiner G7.Needs — Latex, HieroTex, pdfnup (unzip the package and then type sudo mv pdfnup /usr/local/bin/ in a Terminal window to install) and Imagemagick (install with Fink or see the manual installation instructions on Imagemagick’s site) if you ever want to generate the images again (or if you want them in a bigger size). If you’re happy with the standard images, you only need ImageMagick.

Installation — download the file hieroglyphshow.tar.bz2 (456Kb) and save it on your Desktop. Then first ensure the folder /Scripts exists, if it doesn’t, create it (mkdir /Scripts or in the Finder with Apple-Shift-N). Then run the following commands in a Terminal window:

cd ~/Desktop
tar -xvjf hieroglyphshow.tar.bz2
cd hieroglyphshow
mv hieroglyphshow hieroglyphcheck .hieroglyphshow_profile .hieroglyphshowfiles/ /Scripts/

What it does — very easy: you enter a Gardinercode and it shows you an image of that hieroglyph (see the image for a sample). hieroglyphcheck first checks if the sign you enter is available in HieroTex. If not, it will warn you and won’t try to show the image.

How it works — from the help (you can always get this by just typing hieroglyphshow in a Terminal window):

Usage: hieroglyphshow [display|generate|log|save] [gardiner sign]

display: the sign will be displayed but not saved.
generate: use this option to generate just the sign, and not show it.
The image (in png-format) will be saved in the current directory.
log: use this option to save logfile and temporary files in the current
directory (use this if the script doesn't run to check for errors)
save: use this option to display the image and save it afterwards in
the current directory.
gardiner sign: type the number of the Gardiner sign you'd like to see
(e.g. D26)

e.g. "hieroglyphshow save D26" will show sign D26 and will save D26.png in
the current directory (which is now /Users/anoebis). You can also just use the first
character of one of the options, i.e. d, g, l or s. Spaces are optional, e.g.
"hieroglyphshow sD26" will also work. Any string entered after the first
option is first passed on to hieroglyphcheck, so any garbage in it will be re-
moved, e.g. "hieroglyphshow sd- ^%2 +*1" will also work.

This script uses some preferences, which can be found in the file:

.hieroglyphshow_profile in the same directory as this script

The profile-file contains the following settings:

# preferences of the hieroglyphshow script
size small #choose either big or small
save yes #no will generate images on the fly, yes will save them and re-use them later

The script looks only at the first two words of lines 2 and 3. If you want to see bigger images than the standard ones (which are as big as in the G7-example above), change the word ‘small’ into ‘big’. And if you do not want to save all the images on your harddisk (they take about 3MB diskspace), change the ‘save yes’ into ‘save no’. All images will now be generated on-the-fly as you need them, so you can delete the image-directory of hieroglyphshow (/Scripts/.hieroglyphshowfiles), since it won‘t be used anymore.

So if you want to switch to the bigger images and save them on your harddisk, this is how to do it:

  1. delete all the images in /Scripts/.hieroglypshowfiles/
  2. ensure that the profile-file has the right settings (‘size big’ and ‘save yes’)
  3. now the bigger images are generated the first time you search for a certain hieroglyph, all the next times they will be displayed much faster because they’re stored on harddisk
  4. If you want to generate all the bigger files at once (then you have instant acces to all bigger files without having to generate them when you need them for the first time), type the following command in a terminal-window (be patient, as it can take some time to generate all 767 files!):
    cat /Scripts/.seshlist | xargs -n 1 hieroglyphshow g %

And from the help of hieroglyphcheck (but you normally won’t use it, it’s mainly used by hieroglyphshow in the background):

Usage: hieroglyphcheck [string]
This script takes any given string, transforms it into a Gardiner code by:
1) removing any spaces
2) removing (almost) any non-alphanumeric characters (e.g. "+" or "^")
3) converting all characters to uppercase (except for Aa).
It will then check if the given sign is available in Allen's and/or hierotex's
signlist. If it is, it will output the corrected Gardiner code. If not, it will
give an error message.
e.g. "hieroglyphcheck d 4 5" gives "D45" as output.
e.g. "hieroglyphcheckcheck G 88" gives an error message, because sign G88 is
not available in hierotex.
e.g. "hieroglyphcheck a A 0\ "%-9" gives "Aa9" as output. You can see from
this example that the script is very forgiving about invalid characters in-
serted anywhere. Some characters that won't be deleted though are "$", "\(",
and "`", signs which get interpreted by the shell and therefore mess things
a bit up. You'd better avoid them if you want the script to run properly.
But of course it's highly unprobable that you enter such typo's...
The exit-status is composed of the following values: 1 if available in hierotex's
signlist and 2 if available in Allen's signlist. Therefore, the following values
can occur:
0: not available in any of the two signlists
1: available in hierotex's signlist
2: available in Allen's signlist
3: available in both signlists

voclist (version 0.3)

Needs — Latex, HieroTex and htx2tex, CJHebrew (only if you want to type Hebrew too, it can be found on www.ctan.org), ArabTex (only if you want to type Arabic too) and Coptic (only if you want to type Coptic too). For more information about ArabTex and Coptic, see ‘Typesetting Arabic and Coptic’.

Installation — download the file voclist.tar.bz2 (156Kb) and save it on your Desktop. Then first ensure the folder /Scripts exists, if it doesn’t, create it (mkdir /Scripts or in the Finder with Apple-Shift-N). Then run the following commands in a Terminal window:

cd ~/Desktop
tar -xvjf voclist.tar.bz2
cd voclist
mv voclist /Scripts/

The files wenamun.vcl and wenamun.pdf are a sample vcl-file and the resulting pdf-file output by voclist. You can look at these files to see how the template looks and how to structure your vcl-files. They are also included in the tar-file of voclist.

What it does — voclist makes typesetting vocabulary lists of Egyptian texts a lot easier by eliminating almost all Latex-code. What it does, can also be done in Latex, but by using a template it makes things a lot easier. If you would like to enter hieroglyphs, transliteration and translation of some words using a table, you would probably enter something like (not even including the long Latex-preamble):

\textbf{Hiërogliefen} & \textbf{Transliteratie} & \textbf{Vertaling}\\
\begin{hieroglyph}wD-W-y:D54 \end{hieroglyph} & \begin{eg}wDi \end{eg} & vertrekken; sturen \\
\begin{hieroglyph}T:t*1-M3:t*1 \end{hieroglyph} & \begin{eg}T.t \end{eg} & hout \\
\begin{hieroglyph}D:a-n:t*Z5-mw-N36:N23-niwt \end{hieroglyph} & \begin{eg}Dan.t \end{eg} & Tanis (vgl. \cjRL{.so`ar}) \\

With voclist, you only have to type the following instead:

> wD-W-y:D54 & wDi & vertrekken; sturen >
> T:t*1-M3:t*1 & T.t & hout >
> D:a-n:t*Z5-mw-N36:N23-niwt & Dan.t & Tanis (vgl. \H{.so`ar}) >

It’s quite clear that this greatly reduces the text you have to input, and so enables you to work a lot faster. See below for more information about how to encode the vcl-files.

How it works — first edit your vcl-file, and then run voclist on it by typing voclist file.vcl in a Terminal window (substituting file.vcl with the name of your file of course). If everything goes well, the pdf-file will be generated within a few seconds.

The vcl-files should be structured this way:

  1. The first 8 lines should be as following:
    NAME (the name of the text, e.g. The misfortunes of Wenamun)
    CREATOR (the person who has made the vocabulary list, e.g. F. Vervloesem)
    MAIL (this persons e-mailadres, e.g. filip.vervloesem@student.kuleuven.ac.be)
    AUTHOR (the author of the book the text comes from, e.g. A.H. Gardiner)
    TITLE (the title of the book the text comes from, e.g. Late Egyptian Stories)
    PAGE (the page(s) of the text in that book, e.g. p. 61--72)
    (any additional options, including language, text-encoding, additional scripts used in the document, e.g. DUTCH UNICODE COPTIC HEBREW ARABIC. If you do not use any of these options, please leave this line blank or type someting like ‘NONE’, but the vocabulary list itself should always begin on the 9th ine of the document!)
    (empty line)
  2. At the 9th line of the document the vocabulary list itself starts, i.e. everything from here on will be included between \begin{document} and \end{document} of the htx-file that will be generated by voclist.
  3. The vocabulary list is arranged in a table, and should always start with a line
    and end with a line
    Everything that is typed betwee this lines, will be included in a longtable-environment, and should be structured as such (see below)
  4. Between this START- and END-line, each line with a word should be structured like this:
    > (hieroglyphs) & (transliteration) & (translation) >
  5. You can make multiple tables by breaking up your document with as many START- and END-lines as you want. Outside these tables, you can use any Latex-code you want (if needed): you can make subtitles for different section of a text, include some paragraphs of text, etc.
  6. Actually, all Latex-code that you include, will be left untouched, so you can e.g. include footnotes for some words if you want to cite the source where you found the translation.

The options at the beginning of the vcl-file are the following:

  • language: language used for the babel-package (hyphenation, date at beginning of document) and for the captions of the tables: choose between DUTCH, FRENCH or ENGLISH, standard is ENGLISH if none is specified.
  • text-encoding: encoding of the text-file (which you can choose if you save it in e.g. TextEdit): standard is Mac OS Roman, entering UNICODE switches Latex-inputenc setting from applemac to utf8 (this might not be installed in your Latex-system).
  • extra scripts used: ARABIC initialises ArabTex, TRANS switches to Arabic in transliteration, COPTIC initialises Coptic, HEBREW initialises CJHebrew. These scripts can be used in the third column of the tables (or anywhere else in the document, except for the first column of a table (which can only include hieroglyphs) and the second (which can only include transliterations)).

The extra scripts that can easily be used are the following (if they are initialised in the options at the beginning at least):

  • Arabic: input between \A{...}, e.g. \A{`al_A}
  • Coptic: input between \C{...}, e.g. \C{eime}
  • Hebrew: input between \H{...}, e.g. \H{.siydUn}

Beside these optional scripts, you can input hieroglyphs everywhere else in the document using \E{...} (e.g. \E{X:d-b-W-T31} and transliterations using \T{...} (e.g. \T{Hna}).

Before transforming the vcl-file into a valid htx-file, some basic error checking is performed. If you have made an error in the syntax (e.g. a line starts with ">" but you forgot to type one at the end of it too), it will report that error and stop processing the file. You can then correct that error and run voclist again.

You can always look at the example file provided with the script (wenamun.vcl) to have a better idea about how the vcl-files need to be structured.

I hope you find voclist useful, I created it because I was tired of typing all those Latex-codes again and again for a very repititive task. I now spend much less time on typing my vocabulary lists :-)

©2005 F. Vervloesem.