How could one setup a layout for a dictionary? (if possible)

A friend asked me if I knew any free software for creating dictionaries - which is good at saving space (reduce total number of pages).

Example:

I suppose this might be possible in LaTeX. Thankful for any suggestions or pointers.

-
For adding a dictionary-style running head that shows the first/last entry per page, it would be easiest to input the dictionary items (\dict in @Tobi's answer) as some form of sectional command (like subsubsection, say). Then it should be possible to use information contained in Chapters and verses of current page in header to update these running headers automatically via the titlesec package. –  Werner Oct 7 '11 at 20:17

I guess the sorting can be done with xindy, glossaries, luatex or something else. And maybe the entrys should come from a database.

The following could be first approach for the layout. Please note that this is a draft only!

• I used a narrow font to get as much as possible letters in one line

• I added a macro to format the single entries. That makes later changes very easy.

• I guess it would be a god practice to define more macros for other extras (like reference-signs etc.)

• Chapter thumbs (german Daumenindex, actual letter in the margin) can be generated with TikZ and scrpage2 see http://www.komascript.de/node/200 for example.

Code

\documentclass[%
a5paper,
fontsize=7.5pt,
]{scrbook}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

% narrow font
\usepackage{times}
\usepackage[scaled=0.85]{helvet}

% layout
\usepackage{geometry}
\geometry{%
margin=1cm,
includefoot
}
\usepackage{multicol}
\setlength{\parindent}{0pt}
\setlength{\columnseprule}{0.4pt}

\usepackage{scrpage2}
\setfootsepline{0.8pt}
\lehead{word}% first word on page
\rohead{word}% last word on page
\ofoot{\pagemark}
\setkomafont{pagination}{\sffamily}

% entry command
% \dict{<word>}{<gender>}{<text>}
\newcommand{\dict}[3]{%
\par\vspace{0.25\baselineskip}
\textbf{\textsf{#1}} \textit{#2} #3
}

% testing
\usepackage{pgffor}

\begin{document}
\begin{multicols}{3}
\foreach \n in {1,...,200} {%
\dict{word}{n}{Some text with mor explanations. Some text with mor explanations}%
}
\end{multicols}
\end{document}


Information

To get more information about using scrpage2 for head and foot see scrguien or scrguide in german. In the printed version (german) you can find even a tutorial about chapter thumbs.

-
Thank you so much! –  j-a Oct 4 '11 at 7:46
@jac: You’re welcome! But I’d like to say again, that this is only a working basis an not a finished elaborate layout ;-) (see my update for additional links) –  Tobi Oct 4 '11 at 9:10
Is it possible to do one macro to manage the header automatically ? –  projetmbc Oct 7 '11 at 19:14
@projetmbc: I guess it is. But I don’t know how … Since this question is for the layout you may ask a new question like “How to automate a dictionary (sorting, headers)?“ –  Tobi Oct 8 '11 at 9:30
@projetmbc: A look at Chapters and verses of current page in header could help you on your way. –  Tobi Oct 8 '11 at 10:11