Typesetting a Dictionary with LaTeX
10. Juli 2009 – 10:15As I mentioned in the previous post, we typesetted recently a german-albanian dictionary. It is an easy job with LaTeX. The most interestings and challenging points were:
- create new phonetic glyphs from the base font
- create albanian hyphenation patterns based on the turkish ones with some additions like not to break on digraphs
- vertical bars and underrules used in the main entry words for showing morphology and intonation disappear (automagically) in the running head, so there is only the whole word typesetted (example below)
The main work actually was to clear and normalize the Word sources. Emacs did a good job as usually.
Tags: albanian, dictionary, Emacs, running head

4 Responses to “Typesetting a Dictionary with LaTeX”
I would like to typeset myself a dictionary Spanish-Asturiano (regional language of northern Spain) using Latex. You said that it is a job, but I do not how to do it, to be honest. Is there any template I could use as an example? Thanks a lot. Ser.
By Sergio on Aug 26, 2009
There is lexikon.sty but I didn’t use it.
You need the packages multicol, fancyhdr, hanging, ragged2e.
The dictionary file looks like:
\begin{Letter}[L]
\begin{entry}
\mainentry{La Mansh}\alban{-i} Ärmelkanal~\textit{m}
\end{entry}
\end{Letter}
The “Letter” environment typesets the start of new, well, letter and is actually not necessary, but I’ve made it for precaution.
\newenvironment{Letter}[1][\theletter]{%
\addvspace{2\baselineskip}
\needspace{4\baselineskip}
\begin{multicols}{2}[%
\stepcounter{letter}%
% \addvspace{1.5\baselineskip}%
\colorbox{Letter}{\textsf{\textbf{#1}}}%
\addtocontents{toc}{#1---\thepage}%
\addvspace{1\baselineskip}]%
}{%
\end{multicols}}
The “entry” environment is just a hanging paragraph:
\newenvironment{entry}{%
\par\leavevmode\hangpara{1.5mm}{1}\ignorespaces}{\RaggedRight\par}
The “mainentry” macro changes the font and the language and sets the mark for the running head:
\newcommand*{\mainentry}[1]{%
{\sffamily\bfseries\foreignlanguage{\currentlang}{#1}}%
\markboth{#1}{#1}}
\newcommand*{\alban}[1]{\foreignlanguage{albanian}{\wortfont#1}}
Nothing special actually
By pgt on Aug 27, 2009
Impressive-looking piece of work you have there!
I’m also interested in typesetting a shortish dictionary with LaTeX (have already tried with simply using the tabular environment, but it’s clear that your achievement is much handsomer and more pliable), but being quite inexperienced I just can’t seem to get the knack of it - I guess it’s because of the presence of Albanian and all the works beneath that I can’ t translate the previous example to my situation. Could you give a short, ready-to-be-compiled example, say, from German to English?
By oimoi on Sep 24, 2009
I managed to get things working except for the “Letter” environment. Defining it causes no problems, but when I try to use it, something goes wrong.
Well, it’s not that disastrous, I after all have the most important part working. Thanks!
By oimoi on Sep 25, 2009