I was asked to publish complete code of bilingual dictionary typesetting in LaTex. I have added also two images of final result. Update: You can preview the result in PDF of example letters here
The work is still in progress. I will apreciate any comments and advices. I humbly admit that this is actually a community coolaborative work that helped me step by step to add usefull functions to the code. Thank you !!!
% smaller format B5 for printing in print houses
\documentclass[8pt,b5paper,twocolumn]{extbook}
% larger format A4 for easy printing
% note: B5 format uses 6cm picture width, A4 format 7.2 picture width
%\documentclass[10pt,a4paper,twocolumn]{extbook}
\usepackage[top=2cm, headsep=0.4cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}
\usepackage{fancyhdr}
\usepackage[icelandic, czech, english]{babel}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{00A0}{~} % finds hidden non-breakable space
\usepackage[T1]{fontenc}
\usepackage{tgpagella}
\usepackage[scaled]{helvet}
\usepackage{enumitem}
\usepackage{hanging}
\usepackage{makeidx}
\usepackage{stmaryrd}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tipa}
\usepackage{fix2col}
\usepackage{dingbat}
\usepackage{manfnt}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage{color}
\usepackage{titlesec}
\usepackage{fourier-orns} %used for ornaments
\usepackage{amsmath} %used for non-breakabledash
\usepackage{hyphenat} % no hyphen in abbreviations
\usepackage[labelformat=empty]{caption}
% tables
% declention and conjugation tables
\usepackage{caption}
\usepackage{booktabs}
\captionsetup{labelformat=empty}
\usepackage{floatrow}
\DeclareFloatFont{footnotesize}{\footnotesize}% "scriptsize" is defined by floatrow, "tiny" not
\floatsetup[table]{font=footnotesize}
\setlength {\heavyrulewidth }{0.1 em}
% place frequent star
\newcommand{\freqstar}{%
\raisebox{-.2ex}{%
\textcolor{darkgreen}{\ding{167}}%
}%
}%
% float control
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
\renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
% Parameters for TEXT pages (not float pages):
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{1}
\setcounter{totalnumber}{2} % 2 may work better
\setcounter{dbltopnumber}{2} % for 2-column pages
\renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
\renewcommand{\textfraction}{0.07} % allow minimal text w. figs
% Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.7} % require fuller float pages
% N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.7} % require fuller float pages
% remember to use [htp] or [htpb] for placement
\makeatletter
\setlength{\@fptop}{0pt}
\setlength{\@fpbot}{0pt plus 1fil}
\makeatother
% pdf information
\usepackage[pdftex,colorlinks=true]{hyperref}
\hypersetup{pdftitle={PDF title},pdfauthor={PDF author}, pdfsubject={PDF subject}, pdfkeywords={PDF keywords}, linktoc=none}
% COLORS
\definecolor{darkgreen}{rgb}{0.4, 0.01, 0.24}
\definecolor{royalazure}{rgb}{0.0, 0.22, 0.66}
\definecolor{brown}{rgb}{0.4, 0.01, 0.24}
% COLORS FOR THUMB INDEXES
\definecolor{babyblueeyes}{rgb}{0.63, 0.79, 0.95}
\definecolor{unitednationsblue}{rgb}{0.36, 0.57, 0.9}
\definecolor{blue(ryb)}{rgb}{0.01, 0.28, 1.0}
\definecolor{darkblue}{rgb}{0.0, 0.0, 0.55}
\definecolor{screamingreen}{rgb}{0.46, 1.0, 0.44}
\definecolor{limegreen}{rgb}{0.2, 0.8, 0.2}
\definecolor{islamicgreen}{rgb}{0.0, 0.56, 0.0}
\definecolor{upforestgreen}{rgb}{0.0, 0.27, 0.13}
\definecolor{icterine}{rgb}{0.99, 0.97, 0.37}
\definecolor{orange(colorwheel)}{rgb}{1.0, 0.5, 0.0}
\definecolor{orange-red}{rgb}{1.0, 0.27, 0.0}
\definecolor{oucrimsonred}{rgb}{0.6, 0.0, 0.0}
\definecolor{cottoncandy}{rgb}{1.0, 0.74, 0.85}
\definecolor{orchid}{rgb}{0.85, 0.44, 0.84}
\definecolor{vividcerise}{rgb}{0.85, 0.11, 0.51}
\definecolor{patriarch}{rgb}{0.5, 0.0, 0.5}
% Thumb indexes' colors
\newcommand\BoxColor{%
\ifcase\theletternum darkgreen!30\or babyblueeyes\or unitednationsblue\or blue(ryb)\or screamingreen\or limegreen\or islamicgreen\or upforestgreen\or icterine\or orange(colorwheel)\or orange-red%
\or oucrimsonred\or cottoncandy\or orchid\or vividcerise\or patriarch\or babyblueeyes\or unitednationsblue\or blue(ryb)\or screamingreen\or limegreen\or islamicgreen\or upforestgreen\or icterine\or orange(colorwheel)\or orange-red%
\or oucrimsonred\or cottoncandy\or orchid\or vividcerise\or patriarch\else darkgreen!30\fi}
%COMMANDS
\newcommand\entry[3][]{\hangpara{2em}{1}{\fontfamily{phv}\selectfont{\textbf{{#2}}}}\
#3\ifx\relax#1\relax\markboth{#2}{#2}\else\markboth{#1}{#1}\fi
\par}\nopagebreak[4]
\newcommand*{\dictchar}[1]{\parbox[c][3cm][c]{2cm}{\Huge\textbf{#1}}\par}
\newcommand*{\dictchar}[1]{
\centerline{\parbox[c][3cm][c]{2cm}{%
\fontsize{24}{24}
\selectfont
{#1}}}\par
}
\newcommand{\devision}[1]{\hspace*{-2em}{{{{\foreignlanguage{icelandic}{\color{royalazure}{\fontfamily{phv}\selectfont{\textbf{#1}}}}}}}}}
%hyperlinks in black
\makeatletter
\let\Hy@linktoc\Hy@linktoc@none
\makeatother
%FANCY PAGE STYLES
\pagestyle{fancy}
% THUMB INDEXES
% new counter to hold the current number of the letter to determine the vertical position
\newcounter{letternum}
% newcounter for the sum of all letters to get the right height of a box
\newcounter{lettersum}
\setcounter{lettersum}{33}
% some margin settings
\newlength{\thumbtopmargin}
\setlength{\thumbtopmargin}{1cm}
\newlength{\thumbbottommargin}
\setlength{\thumbbottommargin}{3cm}
% calculate the box height by dividing the page height
\newlength{\thumbheight}
\pgfmathsetlength{\thumbheight}{%
(\paperheight-\thumbtopmargin-\thumbbottommargin)%
/%
\value{lettersum}
}
% box width
\newlength{\thumbwidth}
\setlength{\thumbwidth}{0.5cm}
% style the boxes
\tikzset{
thumb/.style={
text=white,
minimum height=\thumbheight,
text width=\thumbwidth,
outer sep=0pt,
font=\sffamily\bfseries,
}
}
\newcommand{\oddthumb}[1]{%
% see pgfmanual.pdf for more information about this part
\begin{tikzpicture}[remember picture, overlay]
\node [thumb,fill=\BoxColor, text centered,anchor=north east,] at ($%
(current page.north east)-%
(0,\thumbtopmargin+\value{letternum}*\thumbheight)%
$) {#1};
\end{tikzpicture}
}
\newcommand{\eventhumb}[1]{%
% see pgfmanual.pdf for more information about this part
\begin{tikzpicture}[remember picture, overlay]
\node [thumb,fill=\BoxColor, text centered,anchor=north west,] at ($%
(current page.north west)-%
(0,\thumbtopmargin+\value{letternum}*\thumbheight)%
$) {#1};
\end{tikzpicture}
}
% create a new command to set a new lettergroup with thumb indexes
\newcommand{\lettergroup}[1]{%
\fancyhead[LO]{\fontfamily{phv}\selectfont{\textbf{\rightmark}}\eventhumb{#1}}%
\fancyhead[RE]{\fontfamily{phv}\selectfont{\textbf{\leftmark}}\oddthumb{#1}}%
% step the counter of the letters
\stepcounter{letternum}%
}
% BASIC PAGE STYLE
\fancypagestyle{basicstyle}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[LE,RO]{\textbf{\chaptitle}}
\fancyhead[LO,RE]{\textbf{\thepage}}}
% INDEX PAGE STYLE
\fancypagestyle{indexstyle}{%
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0.4pt}% 0.4pt header rule
\renewcommand{\footrulewidth}{0pt}% No footer rule
\fancyhead[C]{\thepage}% Page in footer, centred
}
% DICTIONARY PAGE STYLE
\fancypagestyle{dictstyle}{%
\renewcommand{\headrulewidth}{0.4pt}
\fancyhf{}
\fancyhead[LE,LO]{{\fontfamily{phv}\selectfont{\textbf{\rightmark}}}}
\fancyhead[CO,CE]{\thepage}
\fancyhead[RE,RO]{{\fontfamily{phv}\selectfont{\textbf{\leftmark}}}}}
\setlength{\columnsep}{20pt}
\setlength{\columnseprule}{0.1pt}
\titleformat{\chapter}[block]
{\normalfont\huge\bfseries}{\thechapter.}{1em}{\Huge}
\titlespacing*{\chapter}{20pt}{20pt}{20pt}
% GRAPHICS PATH
\graphicspath{/home/SomeUser/Documents/dictionary/images/}
% TITLE, AUTHORS, THANKS
\title{\textbf{Name of Dictionary}
\thanks{Words of thanks}}
\author{Authors}
\date{Date}
% LOCALIZATION
\addto{\captionsczech}{%
\renewcommand{\indexname}{{Seznam autorů fotografií}} % renames the index name
}
\addto\captionsczech{% renames the contents name
\renewcommand{\contentsname}%
{Obsah}%
}
\newcommand{\HRule}{\rule{\linewidth}{0.1mm}} % rule line
\newcommand*{\chaptitle}{}
\renewcommand*{\chaptermark}[1]{%
\renewcommand*{\chaptitle}{#1}}
% index of authors of photographs
\makeindex
\begin{document}
\twocolumn
\pagestyle{dictstyle}
% the letters in alphabetical order
\input{letters/dict_letter_a.tex}
\input{letters/dict_letter_aa.tex}
% list of all letters, each letter in separate .tex file, example of letter file, see bellow.
% print the index of authors of photographs
\clearpage
\pagestyle{empty}
\printindex
\end{document}
Here comes an pseudo example file for letter l - dict_letter_l.tex
\lettergroup{l}
\dictchar{l L}
\entry[headword_without_special_symbols]{headword_with_symbols}{senses}
\entry[2 headword_without_special_symbols]{2 headword_with_symbols}{2 senses}
% picture belongs to headword2
\begin{figure}[h]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=7.2cm]{Name_of_the_file.jpg}}
\caption{The Caption of the Picture}
\end{figure}
\index{Headword - Author of Photograph, Licence}}
% Clear page to start new letter on a new page, else not.
\clearpage
Updated:
Here comes an original example of letter N - dict_letter_n.tex. Note: Using \foreignlanguage{icelandic} for Icelandic and \foreignlanguage{czech} for Czech is achieved corrent line break.
% thumb index N
\lettergroup{n}
% shows N n
\dictchar{N n}
% first headword
\entry[naðra]{{naðra} }{{\textipa{[{n}{a}{ð}{r}{a}]}}{\color{darkgreen}{\small{\textbf{ f}}}}{\color{darkgreen}{\footnotesize{ (nöðru, nöðrur)}}} {\textbf{1.}}\foreignlanguage{czech}{{\footnotesize{ zool.}}} {\foreignlanguage{icelandic}{(\textit{$\rightarrow$ slanga})}}\foreignlanguage{czech}{{ had, zmije}}; {\textbf{2.}}{\footnotesize{ přen.}}\foreignlanguage{czech}{{ had, zmije (o~falešném člověku)}}.}
% second headword
\entry[naðurtunga]{{naður$\cdot$$\cdot$tung|a} }{{\textipa{[{n}{a}{ð}{\textscy}{\textsubring{r}}{t\textsuperscript{h}}{u}{\ng}{\r{g}}{a}]}}{\color{darkgreen}{\small{\textbf{ f}}}}{\color{darkgreen}{\footnotesize{ (\hbox{-}u, \hbox{-}ur)}}}\foreignlanguage{czech}{{\footnotesize{ bot.}}}\foreignlanguage{czech}{{ hadí jazyk azorský}}{ (l.~{\foreignlanguage{latin}{Ophioglossum azoricum}})}.}
% third headword with picture
\entry[nagdýr]{{nag$\cdot$$\cdot$dýr} }{{\textipa{[{n}{a}{\textbabygamma}{\textsubring{d}}{i}{\textsubring{r}}]}}{\color{darkgreen}{\small{\textbf{ n}}}}{\color{darkgreen}{\footnotesize{ \nobreakseq{(\hbox{-}s, \hbox{-})}}}}\foreignlanguage{czech}{{\footnotesize{ zool.}}}\foreignlanguage{czech}{{ hlodavec}}{ (l.~{\foreignlanguage{latin}{Rodentia}})}.}
\begin{figure}[h]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=7.2cm]{83259.jpg}}
\caption{Nagdýr}
\end{figure}
\index{Nagdýr - Šárka Troníčková, COPYRIGHT/CC-BY-NC}
% forth headword
\entry[nagg]{{nagg} }{{\textipa{[{n}{a}{\r{g}}{\textlengthmark}]}}{\color{darkgreen}{\small{\textbf{ n}}}}{\color{darkgreen}{\footnotesize{ \nobreakseq{(\hbox{-}s)}}}} {\foreignlanguage{icelandic}{(\textit{$\rightarrow$ rifrildi})}}\foreignlanguage{czech}{{ hašteření, hádka}}.}
Only for Czech users: Run vlna -l -m -n dict_letter_n.tex to add non-breakable space between small prepositions.
It's necessary to run pdflatex dictionary.tex twice to display correctly thumb indexes. Then it's needed to run texindy -L icelandic -M lang/icelandic/utf8 dictionary.idx (this command orders the indexed words according to Icelandic alphabet. Then run pdflatex dictionary.tex to make index appear.
The example of current layout in B5 format, 8pt fontsize, using font Helvetica for headwords and font tgpagella for definitions.


Updated:
The example of current layout in A4 format.
The main change is the alingment of the pictures. Pictures are aligned directly to the headword or at the top of the page.

See How to set a letter to the margin of the page and position it vertically according to alphabetical order? for some explanations about the thumb index.
See How to display unprinted text in headers? for explanations about unprinted headwords in header.
See also question Two different layouts using fancyhdr that exlains how to use different layouts using fancyhdr