\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

% Packages used only for the appearance of this manual.
\usepackage[hidelinks]{hyperref}
\usepackage{xcolor}
\usepackage{upquote}
\usepackage{listings}
\usepackage{multicol}
\usepackage{geometry}
\geometry{margin=2.5cm}
\usepackage{url}

% The standard article \paragraph heading is a run-in heading.  In this
% technical manual block-style paragraph headings are easier to read, so the
% heading is set on its own line.
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
	{1.5ex \@plus .2ex \@minus .2ex}%
	{0.8ex \@plus .1ex}%
	{\normalfont\normalsize\bfseries}}
\makeatother

% For the visual box/baseline demonstrations.
\usepackage{ifpdf}
\ifpdf
   % pdf-trans is not part of every TeX installation.  Use it when available;
   % otherwise provide safe empty definitions so that the manual still compiles.
   \InputIfFileExists{pdf-trans}{}{%
     \providecommand{\boxshow}[3]{}%
     \providecommand{\boxbaselineat}[1]{}%
   }%
\else
  \providecommand{\boxshow}[3]{}%
  \providecommand{\boxbaselineat}[1]{}%
\fi
\usepackage{graphicx}

% ==== INDEX AND PACKAGE SETUP ====
\usepackage{firstindexletter}

% Enable the firstindexletter package.
\FirstIndexLetterEnable

% Treat Dz and Dzs as separate effective groups.
%\FirstIndexLetterSeparateDz
%\FirstIndexLetterSeparateDzs

\makeindex[
name=places,
title=Place names,
columns=3,
noautomatic,
program=texindy,
options=-L english -M english-utf8
]

% ==== INDEX INITIAL SETTINGS ====
% Size: in this manual the package default \LARGE is changed to \Huge.
\renewcommand\IndexInitialSize{\Huge}

% Font family/style: sans serif bold in this manual.
\renewcommand\IndexInitialFamily{\sffamily\bfseries}

% Color: any xcolor color name may be used.
\renewcommand\IndexInitialColor{blue}

% ==== OPTICAL KERNING SETTINGS ====
% Ascender list: second letters that rise above the x-height.
\renewcommand\IndexKerningAscenders{hlbkdti}

% Group 1: strongest negative spacing (T, Y).
\renewcommand\IndexKerningGroupOneLetters{TY}
\renewcommand\IndexKerningGroupOneValue{-.5ex} %
\renewcommand\IndexKerningGroupOneAscenderValue{-.2ex} 

% Group 2: medium negative spacing (V).
\renewcommand\IndexKerningGroupTwoLetters{V}
\renewcommand\IndexKerningGroupTwoValue{-.4ex} %
\renewcommand\IndexKerningGroupTwoAscenderValue{-.1ex} 

% Group 3: small negative spacing (P, F, W).
\renewcommand\IndexKerningGroupThreeLetters{PFW}
\renewcommand\IndexKerningGroupThreeValue{-.3ex} %
\renewcommand\IndexKerningGroupThreeAscenderValue{0ex} 
% =================================

% Code listings for the manual.
\lstset{
  language=[LaTeX]TeX,
  basicstyle=\ttfamily\small,
  backgroundcolor=\color{gray!10},
  keywordstyle=\color{blue},
  commentstyle=\color{gray},
  frame=single,
  rulecolor=\color{gray!30},
  xleftmargin=10pt,
  xrightmargin=10pt,
  breaklines=true
}

\title{\textbf{The \texttt{firstindexletter} package}}
\author{Zsolt Bihari \url{info@tengerikajak.net}}
\date{v1.0 -- \today}


\begin{document}

\maketitle

\begin{abstract}
\noindent
The \texttt{firstindexletter} package visually emphasizes the first entry of
each index letter group by enlarging its initial letter.  It is intended
primarily for indexes generated with \texttt{xindy}/\texttt{texindy}, where the
generated \texttt{.ind} file contains \texttt{\textbackslash lettergroup}
information.

The package provides configurable size, color and font family for the enlarged
initial.  It also includes a simple three-level optical kerning mechanism that
helps compensate for visually awkward gaps between a large initial and the
following letter.
\end{abstract}

{
	\begin{multicols}{2}\raggedright 
\tableofcontents
	\end{multicols}
}
\vspace{1cm}

\section{Introduction}

Traditional indexes often place a separate letter-group heading, such as
\textbf{A}, \textbf{B}, \ldots{} \textbf{Z}, before each alphabetic group.
Instead of using such separate headings, this package highlights the initial
letter of the first real entry in each group.

Editing the generated \texttt{.ind} file by hand is tedious and error-prone.\\ 
The \texttt{firstindexletter} package automates this task at LaTeX macro level:
it changes the behavior of the index environment while the index is being
typeset, rather than rewriting the \texttt{.ind} file externally.

\section{Usage and requirements}

Loading the package alone does not change the index.  To enable the special
initial-letter index style, use:

\begin{lstlisting}
\usepackage{firstindexletter}
\FirstIndexLetterEnable
\end{lstlisting}

The package loads \texttt{imakeidx} with the \texttt{xindy} option and also
loads \texttt{xcolor}.  The generated \texttt{.ind} file should contain
\texttt{\textbackslash lettergroup\{...\}} information, because the package uses
that information to determine when a new effective group starts.  The
\texttt{\textbackslash indexspace} command is handled in a delayed way so that
merged groups such as \texttt{D}, \texttt{Dz} and \texttt{Dzs} do not produce
unwanted extra vertical space.

\subsection{Recommended use for Hungarian indexes}

For Hungarian documents the package is best used together with the Hungarian
sorting rules of \texttt{texindy}.  A minimal setup is:

\begin{lstlisting}
\usepackage{firstindexletter}
\FirstIndexLetterEnable
\makeindex[
  name=places,
  title=Place names,
  columns=3,
  noautomatic,
  program=texindy,
  options=-L hungarian -M hungarian-utf8
]
\end{lstlisting}

The command \texttt{\textbackslash FirstIndexLetterEnable} enables the package
behavior.  Without it, the index is printed according to the original structure
of the generated \texttt{.ind} file.

The following Hungarian multi-character initials are always treated as
multi-character initials by the package:

\begin{center}
	\texttt{Cs, Gy, Ly, Ny, Sz, Ty, Zs}
\end{center}

The treatment of \texttt{Dz} and \texttt{Dzs} can be configured separately.
By default, entries beginning with \texttt{Dz} or \texttt{Dzs} are merged into
the effective \texttt{D} group.

To treat \texttt{Dz} as a separate group:

\begin{lstlisting}
\FirstIndexLetterSeparateDz
\end{lstlisting}

To treat \texttt{Dzs} as a separate group as well:

\begin{lstlisting}
\FirstIndexLetterSeparateDzs
\end{lstlisting}

The command \texttt{\textbackslash FirstIndexLetterSeparateDzs} automatically
enables the separate treatment of \texttt{Dz} too.

\subsection{Using the package on Overleaf}

The document itself can be compiled with \texttt{pdflatex} on Overleaf, but
running \texttt{texindy} may depend on the project settings and environment.
This is especially relevant for Hungarian sorting or for projects that require
custom \texttt{.xdy} modules.

The index of this manual is generated locally with:

\begin{lstlisting}
pdflatex firstindexletter-doc.tex
texindy -L english  places.idx
pdflatex firstindexletter-doc.tex
pdflatex firstindexletter-doc.tex
\end{lstlisting}

A reliable Overleaf workflow is to generate the \texttt{places.ind} file locally
and then upload that file to the Overleaf project.  Overleaf can then read the
finished \texttt{.ind} file when \texttt{\textbackslash printindex} is executed.

This ensures that the same index structure is used both locally and on
Overleaf.  This matters because \texttt{firstindexletter} uses the
\texttt{\textbackslash lettergroup\{...\}} information in the generated index.

\section{Customizing the appearance}

The physical appearance of the enlarged first letter can be configured with
three\\ \texttt{\textbackslash renewcommand} instructions in the preamble.

\subsection{Size}

The initial size is controlled by
\texttt{\textbackslash IndexInitialSize}.  The package default is
\texttt{\textbackslash LARGE}.

\begin{lstlisting}
\renewcommand\IndexInitialSize{\Huge}
\end{lstlisting}

\subsection{Font family}

The macro \texttt{\textbackslash IndexInitialFamily} stores the font family and
style used for the enlarged initial.  Built-in font switches can be used, or a
specific font family may be selected.

The package default is
\texttt{\textbackslash fontfamily\{cmr\}\textbackslash selectfont}.

\begin{lstlisting}
% Example: bold sans-serif initials
\renewcommand\IndexInitialFamily{\sffamily\bfseries}
\end{lstlisting}

\subsection{Color}

The color is set by redefining
\texttt{\textbackslash IndexInitialColor}.  It accepts color names understood by
\texttt{xcolor}.  The package default is \texttt{black}.  This manual uses blue:

\begin{lstlisting}
\renewcommand\IndexInitialColor{blue}
\end{lstlisting}

\section{Optical kerning}

Because the highlighted initial is much larger than the remaining letters of
the word, visually awkward gaps may appear between the first and second letter.
This is especially visible with letters such as \textbf{F}, \textbf{P},
\textbf{T}, \textbf{V}, \textbf{W} and \textbf{Y}.  The package therefore
provides a simple three-level negative-spacing mechanism.

Another typographic issue occurs when the second letter has an ascender, for
example \emph{h}, \emph{l}, \emph{b} or \emph{t}.  With strong negative spacing
the second letter can get too close to the large initial.  For this reason each
kerning group has a normal value and a separate, milder value for ascender
second letters.

\subsection{Ascender list}

The ascender list contains lowercase letters that rise above the x-height.

\begin{lstlisting}
\renewcommand\IndexKerningAscenders{hlbkdti}
\end{lstlisting}

This list may be changed for other scripts or typographic conventions.  The
following demonstration shows different left shifts for the letters \emph{h}
and \emph{l}.

\vspace{.1cm}
\begin{center}
	\scalebox{3}{%
		\hbox{%
			\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
			\hbox{\sffamily\bfseries\Huge T}%
			\hspace{-.5ex}%
			\boxshow{.4 w 0 0 1 RG}{}{}%
			\boxbaselineat{0}\hbox{hira}%
		}
		\hspace{3.3ex}
		\hbox{%
			\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
			\hbox{\sffamily\bfseries\Huge F}%
			\hspace{-.1ex}%
			\boxshow{.4 w 0 0 1 RG}{}{}%
			\boxbaselineat{0}\hbox{lorence}%
		}
	}
\end{center}

\subsection{Group 1: strongest negative spacing}

The first group is typically used for \textbf{T} and \textbf{Y}, because these
letters often leave a large optical gap after the initial.

\begin{lstlisting}
\renewcommand\IndexKerningGroupOneLetters{TY}
\renewcommand\IndexKerningGroupOneValue{-.5ex}
\renewcommand\IndexKerningGroupOneAscenderValue{-0.2ex}
\end{lstlisting}

\subsection{Group 2: medium negative spacing}

The second group is intended for letters such as \textbf{V}.

\begin{lstlisting}
\renewcommand\IndexKerningGroupTwoLetters{V}
\renewcommand\IndexKerningGroupTwoValue{-.4ex}
\renewcommand\IndexKerningGroupTwoAscenderValue{-0.1ex}
\end{lstlisting}

\subsection{Group 3: small negative spacing}

The third group is suitable for letters such as \textbf{P}, \textbf{F} and
\textbf{W}.

\begin{lstlisting}
\renewcommand\IndexKerningGroupThreeLetters{PFW}
\renewcommand\IndexKerningGroupThreeValue{-0.3ex}
\renewcommand\IndexKerningGroupThreeAscenderValue{0ex}
\end{lstlisting}

\newpage
\section{Technical background}

Within the \texttt{theindex} environment the package temporarily redefines
\texttt{\textbackslash lettergroup},\\ \texttt{\textbackslash indexspace} and
\texttt{\textbackslash item}.  The beginning of a new visual group is detected
from the effective group name derived from
\texttt{\textbackslash lettergroup\{...\}}, not from
\texttt{\textbackslash indexspace} alone.

When the first real \texttt{\textbackslash item} of an effective group is
found, the package uses TeX parameter scanning to isolate the first and second
tokens of the entry.  The first token is wrapped in the configured formatting,
and the second token is used to select an optical kerning value.

This macro-level solution is more portable than rewriting the generated
\texttt{.ind} file with shell scripts such as \texttt{sed} or \texttt{awk}.

\section{Full reference}

This section describes the internal logic of \texttt{firstindexletter.sty} in a
readable way.  The aim is not only to explain how to use the package, but also
to make later maintenance and modification safer.

The main idea is that the first real entry of every effective index group gets
a visually enlarged initial.  The package does not modify the source
\texttt{\textbackslash index\{\}} entries and does not rewrite the generated
\texttt{.ind} file.  Instead, it changes the run-time behavior of the LaTeX
index environment.

\subsection{Package header and dependencies}

The package begins with:

\begin{lstlisting}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{firstindexletter}[2026/06/13 First item initial in each index group]
\RequirePackage[xindy]{imakeidx}
\RequirePackage{xcolor}
\end{lstlisting}

The \texttt{\textbackslash NeedsTeXFormat\{LaTeX2e\}} line declares that the
package requires a LaTeX2e environment.

The \texttt{\textbackslash ProvidesPackage} line gives the package name and a
short version description.  This information also appears in the log file,
which makes it easier to identify the loaded package version.

The package loads \texttt{imakeidx} with the \texttt{xindy} option and loads
\texttt{xcolor}.  \texttt{imakeidx} is used for index declaration and printing;
\texttt{xcolor} is used to color the enlarged initial.

\subsection{The role of \texttt{\textbackslash makeatletter}}

The line

\begin{lstlisting}
\makeatletter
\end{lstlisting}

\noindent allows the package to define and use internal command names containing the
\texttt{@} character.  This is a standard LaTeX convention: user-level commands
usually avoid \texttt{@}, while internal helper commands often include it.

\subsection{Enabling the package and processing \texttt{lettergroup}}

The following block introduces the main enable switch:

\begin{lstlisting}
\newif\iffil@enabled
\fil@enabledfalse

\newcommand{\FirstIndexLetterEnable}{%
  \global\fil@enabledtrue
}
\end{lstlisting}

The \texttt{\textbackslash newif\textbackslash iffil@enabled} line creates a
new conditional switch.  It is false by default, so loading the package alone
does not modify the index.

The user command

\begin{lstlisting}
\FirstIndexLetterEnable
\end{lstlisting}

sets the switch to true.  When the switch is true, the package redefines
\texttt{\textbackslash lettergroup}, \texttt{\textbackslash indexspace} and
\texttt{\textbackslash item} inside the \texttt{theindex} environment.

The \texttt{\textbackslash lettergroup} command is not simply discarded.  Its
argument is converted into an effective group name, and this effective group is
used to decide whether a real new visual group has started.  This is important
for \texttt{D}, \texttt{Dz} and \texttt{Dzs}, which can be kept separate or
merged depending on the package settings.

\subsection{Default appearance settings}

The default style settings are:

\begin{lstlisting}
\providecommand\IndexInitialSize{\LARGE}
\providecommand\IndexInitialFamily{\fontfamily{cmr}\selectfont}
\providecommand\IndexInitialColor{black}
\end{lstlisting}

The use of \texttt{\textbackslash providecommand} means that an already defined
command is not overwritten.  If the command does not yet exist, the default is
created.

The three user-level commands are:

\begin{itemize}
\item \texttt{\textbackslash IndexInitialSize}: size of the enlarged initial;
\item \texttt{\textbackslash IndexInitialFamily}: font family and style of the initial;
\item \texttt{\textbackslash IndexInitialColor}: color of the initial.
\end{itemize}

They can be redefined in the document preamble, for example:

\begin{lstlisting}
\renewcommand\IndexInitialSize{\Huge}
\renewcommand\IndexInitialFamily{\sffamily\bfseries}
\renewcommand\IndexInitialColor{blue}
\end{lstlisting}

\subsection{The kerning system}

The enlarged initial and the following letter can produce an unpleasant optical
gap.  This is most visible after initials such as \texttt{T}, \texttt{Y},
\texttt{V}, \texttt{W}, \texttt{P} and \texttt{F}.  The package therefore uses
three configurable negative-spacing groups:

\begin{lstlisting}
\providecommand\IndexKerningAscenders{hlbkdti}

\providecommand\IndexKerningGroupOneLetters{TY}
\providecommand\IndexKerningGroupOneValue{-1.2ex}
\providecommand\IndexKerningGroupOneAscenderValue{-0.2ex}

\providecommand\IndexKerningGroupTwoLetters{VW}
\providecommand\IndexKerningGroupTwoValue{-0.8ex}
\providecommand\IndexKerningGroupTwoAscenderValue{-0.1ex}

\providecommand\IndexKerningGroupThreeLetters{PF}
\providecommand\IndexKerningGroupThreeValue{-0.4ex}
\providecommand\IndexKerningGroupThreeAscenderValue{0ex}
\end{lstlisting}

For each group there is a normal negative-spacing value and a separate value
for cases where the second letter belongs to
\texttt{\textbackslash IndexKerningAscenders}.

\paragraph{Ascender exceptions.}
The list \texttt{\textbackslash IndexKerningAscenders} contains second letters
with ascenders: \texttt{h, l, b, k, d, t, i}.  When such a letter follows the
large initial, the package uses the milder ascender-specific spacing value.

\paragraph{First group.}
This group applies the strongest negative spacing.  By default it contains
\texttt{T} and \texttt{Y}.

If the rest of the word is placed immediately after the large initial, the
result looks like this:

\vspace{.1cm}
\hspace{4cm}%
\scalebox{2}{%
\hbox{%
	\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
	\hbox{\sffamily\bfseries\Huge T}%
	\hspace{0ex}%
	\boxshow{.4 w 0 0 1 RG}{}{}%
	\boxbaselineat{0}\hbox{acoma}%
}
\hspace{3ex}
\hbox{%
	\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
	\hbox{\sffamily\bfseries\Huge Y}%
	\hspace{0ex}%
	\boxshow{.4 w 0 0 1 RG}{}{}%
	\boxbaselineat{0}\hbox{akima}%
}
}

\vspace{1ex}
With a \texttt{-.5ex} left shift, the visual relation becomes more compact:

\vspace{1ex}

\hspace{4cm}%
\scalebox{2}{%
\hbox{%
	\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
	\hbox{\sffamily\bfseries\Huge T}%
	\hspace{-.5ex}%
	\boxshow{.4 w 0 0 1 RG}{}{}%
	\boxbaselineat{0}\hbox{acoma}%
}
\hspace{3.5ex}
\hbox{%
	\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
	\hbox{\sffamily\bfseries\Huge Y}%
	\hspace{-.5ex}%
	\boxshow{.4 w 0 0 1 RG}{}{}%
	\boxbaselineat{0}\hbox{akima}%
}
}

\paragraph{Second group.}
This group applies medium negative spacing.  By default it contains
\texttt{V} and \texttt{W}.

\vspace{.1cm}
\hspace{4cm}%
\scalebox{2}{%
	\hbox{%
		\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
		\hbox{\sffamily\bfseries\Huge V}%
		\hspace{0ex}%
		\boxshow{.4 w 0 0 1 RG}{}{}%
		\boxbaselineat{0}\hbox{allejo}%
	}
	\hspace{3ex}
	\hbox{%
		\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
		\hbox{\sffamily\bfseries\Huge W}%
		\hspace{0ex}%
		\boxshow{.4 w 0 0 1 RG}{}{}%
		\boxbaselineat{0}\hbox{aco}%
	}
}

\vspace{.1cm}
\hspace{4cm}%
\scalebox{2}{%
	\hbox{%
		\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
		\hbox{\sffamily\bfseries\Huge V}%
		\hspace{-.3ex}%
		\boxshow{.4 w 0 0 1 RG}{}{}%
		\boxbaselineat{0}\hbox{allejo}%
	}
	\hspace{3.3ex}
	\hbox{%
		\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
		\hbox{\sffamily\bfseries\Huge W}%
		\hspace{-.3ex}%
		\boxshow{.4 w 0 0 1 RG}{}{}%
		\boxbaselineat{0}\hbox{aco}%
	}
}

\paragraph{Third group.}
This group applies milder negative spacing.  By default it contains
\texttt{P} and \texttt{F}.

\vspace{.1cm}
\hspace{4cm}%
\scalebox{2}{%
	\hbox{%
		\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
		\hbox{\sffamily\bfseries\Huge P}%
		\hspace{0ex}%
		\boxshow{.4 w 0 0 1 RG}{}{}%
		\boxbaselineat{0}\hbox{aco}%
	}
	\hspace{3ex}
	\hbox{%
		\boxshow{.4 w 1 .5 .5 RG}{[10 5]0 d}{}%
		\hbox{\sffamily\bfseries\Huge P}%
		\hspace{-.1ex}%
		\boxshow{.4 w 0 0 1 RG}{}{}%
		\boxbaselineat{0}\hbox{aco}%
	}
}

All these settings may be changed with \texttt{\textbackslash renewcommand}, as
shown in this manual.

\subsection{Detecting the start of a group}

The line

\begin{lstlisting}
\newif\iffil@indexgroupstart
\end{lstlisting}

creates a conditional switch that marks whether the next index item is the
first item of a new effective group.

The package does not try to interpret alphabetical order by itself.  It does
not compare words lexicographically.  Instead it relies on the structure of the
generated index: \texttt{\textbackslash lettergroup} provides the group name,
and the package compares the effective group names derived from those
lettergroups.

\subsection{The \texttt{\textbackslash fil@grabfirst} macro}

The key internal macro is \texttt{\textbackslash fil@grabfirst}.  It takes the
first two tokens following the next \texttt{\textbackslash item}.  The macro
stores these tokens as a pair and compares the pair with known Hungarian
multi-character initials using \texttt{\textbackslash ifx}.

\begin{enumerate}
\item The first two tokens are stored in \texttt{\textbackslash fil@currentpair}.
\item The pair is compared with Hungarian two-character initials such as
      \texttt{Cs}, \texttt{Gy}, \texttt{Ly}, \texttt{Ny}, \texttt{Sz},
      \texttt{Ty} and \texttt{Zs}.
\item If a match is found, the package calls
      \texttt{\textbackslash fil@doublepair}.
\item The special case is \texttt{Dzs}.  When the first two tokens are
      \texttt{Dz}, the package reads one more token with
      \texttt{\textbackslash fil@grabthirdforDzs}.
\item If the third token is \texttt{s}, the package can treat the beginning as
      \texttt{Dzs}; otherwise the word beginning is treated as \texttt{Dz}.
\end{enumerate}

\subsection{Redefining the \texttt{theindex} environment}

The central hook is:

\begin{lstlisting}
\let\fil@oldtheindex\theindex
\renewcommand\theindex{...}
\end{lstlisting}

The original definition of \texttt{theindex} is saved as
\texttt{\textbackslash fil@oldtheindex}; the package then defines a wrapper
around it.  This preserves the normal index layout and applies only the extra
local behavior needed by the package.

The new definition does four important things.

\paragraph{1. Check whether the package is enabled.}
At the beginning of the environment the package checks
\texttt{\textbackslash iffil@enabled}. \\
 If \texttt{\textbackslash FirstIndexLetterEnable} has not been used, the package
does not interfere with index processing.

\paragraph{2. Process \texttt{lettergroup}.}
In enabled mode the package redefines
\texttt{\textbackslash lettergroup} so that its argument is passed to
\texttt{\textbackslash fil@handlelettergroup}.  That helper macro decides
whether the received group name represents a new effective group.

\paragraph{3. Mark the first item.}
When a real new effective group is detected, the package marks the next
\texttt{\textbackslash item} as the first item of that group.

\paragraph{4. Delay \texttt{\textbackslash indexspace}.}
The original \texttt{\textbackslash indexspace} definition is saved.  The new
definition does not insert the space immediately; it sets a pending-space flag.
After the next \texttt{\textbackslash lettergroup} has been processed, the
package decides whether the original spacing is really needed.

This avoids unnecessary vertical space when \texttt{Dz} or \texttt{Dzs} are
merged into another effective group.

\subsection{Local redefinition of \texttt{\textbackslash item}}

Inside \texttt{theindex}, \texttt{\textbackslash item} is redefined as follows:

\begin{lstlisting}
\let\fil@olditem\item
\def\item{%
  \fil@olditem
  \iffil@indexgroupstart
    \global\fil@indexgroupstartfalse
    \expandafter\fil@grabfirst
  \fi
}%
\end{lstlisting}

First the original \texttt{\textbackslash item} behavior is executed, so the
normal index-list structure remains intact.  Then the package checks whether
the item is the first item of an effective group.  If so, the flag is reset and
the following tokens are passed to \texttt{\textbackslash fil@grabfirst}.

The \texttt{\textbackslash expandafter} is needed so that the first tokens after
\texttt{\textbackslash item} are consumed by
\texttt{\textbackslash fil@grabfirst}.  This is a low-level TeX technique and
is one reason why multi-character initials require careful handling.

\subsection{Why not rewrite the \texttt{.ind} file?}

One possible approach would be to post-process the generated \texttt{.ind} file
with a script written in \texttt{sed}, \texttt{awk} or Python.  This package
does not use that approach.

The macro-level approach has several advantages:

\begin{itemize}
\item it is more platform-independent;
\item it does not require a separate shell-level post-processing step;
\item it is contained in a single \texttt{.sty} file;
\item it can work in online systems when the necessary index generation itself
      is available;
\item typographic parameters can be controlled directly from LaTeX.
\end{itemize}

The drawback is that TeX token scanning makes multi-character language units
more complex to handle than simple one-character initials.

\subsection{Recommended Hungarian setup}

For Hungarian text, especially when multi-character initials occur, a typical
index declaration is:

\begin{lstlisting}
\usepackage{firstindexletter}
\FirstIndexLetterEnable
\makeindex[
  name=places,
  title=Place names,
  columns=3,
  noautomatic,
  program=texindy,
  options=-L hungarian -M hungarian-utf8
]
\end{lstlisting}

The \texttt{noautomatic} option means that the index-generation program is run
manually.  The initial-letter index style itself is created by
\texttt{\textbackslash FirstIndexLetterEnable} together with a suitable
\texttt{texindy}-generated \texttt{.ind} structure.

\subsection{Mathematical and special index entries}

Some index entries containing mathematical material may be problematic if the
sort key and the printed form are not clearly separated.  A stable practice is
to keep the sort key as simple text and put the mathematical form only after
the \texttt{@} separator, in the printed part.

For example:

\begin{lstlisting}
\index[places]{deviation xi@\(D^2\xi\)}
\end{lstlisting}

The sort key is plain text, while the mathematical notation appears only in
the printed index entry.

\subsection{What can be customized safely?}

The following settings are intended for user-level customization:

\begin{itemize}
\item the size of the highlighted initial;
\item the font family and style of the highlighted initial;
\item the color of the highlighted initial;
\item the ascender list;
\item the letter lists of kerning groups 1, 2 and 3;
\item the normal and ascender-specific negative spacing values;
\item separate or merged effective treatment of \texttt{Dz} and \texttt{Dzs}.
\end{itemize}

The following parts should not be changed without solid TeX knowledge:

\begin{itemize}
\item the parameter structure of \texttt{\textbackslash fil@grabfirst};
\item the redefinition logic of \texttt{\textbackslash item};
\item the use of \texttt{\textbackslash expandafter};
\item the internal handling of two- and three-character Hungarian initials.
\end{itemize}

\subsection{Technical limitations}

\begin{enumerate}
\item The package expects an index structure that contains
      \texttt{\textbackslash lettergroup} information.
\item The spacing correction is not font-level OpenType/TrueType kerning.  It
      is a static, configurable optical correction based on negative
      \texttt{\textbackslash hspace}.
\item Group handling relies on the generated index structure, not on linguistic
      or semantic analysis.
\item The package is primarily intended for Latin-script indexes with a
      conventional index structure.
\end{enumerate}

\subsection{Final note}

The \texttt{firstindexletter} package offers a compact typographic solution for
indexes where separate letter-group headings are replaced by a visually
emphasized initial letter in the first entry of each group.  It is small,
simple to use, and provides configurable optical correction.

\section{Example section}

The following list of place names is used to generate the sample index in this
manual.  The entries are inserted with commands such as:

\begin{lstlisting}
Amsterdam\index[places]{Amsterdam} 
Austin\index[places]{Austin}
...
\end{lstlisting}

For the english sorting rules used in this example, run \texttt{texindy} as
follows:

\begin{lstlisting}
pdflatex firstindexletter-doc.tex
texindy -L english places.idx
pdflatex firstindexletter-doc.tex
pdflatex firstindexletter-doc.tex
\end{lstlisting}

The first LaTeX run creates the \texttt{.idx} file.  The \texttt{texindy} run
turns it into a sorted \texttt{.ind} file.  The final LaTeX runs include and
typeset that formatted index.

\bigskip \noindent
Amsterdam\index[places]{Amsterdam} Austin\index[places]{Austin} Atlanta\index[places]{Atlanta} Athens\index[places]{Athens} Accra\index[places]{Accra} Adelaide\index[places]{Adelaide} Albany\index[places]{Albany} Anchorage\index[places]{Anchorage} Boston\index[places]{Boston} Baltimore\index[places]{Baltimore} Brisbane\index[places]{Brisbane} Belfast\index[places]{Belfast} Berlin\index[places]{Berlin} Birmingham\index[places]{Birmingham} Buffalo\index[places]{Buffalo} Boise\index[places]{Boise} Chicago\index[places]{Chicago} Cleveland\index[places]{Cleveland} Cairo\index[places]{Cairo} Calgary\index[places]{Calgary} Colombo\index[places]{Colombo} Charlotte\index[places]{Charlotte} Cincinnati\index[places]{Cincinnati} Columbus\index[places]{Columbus} Dallas\index[places]{Dallas} Denver\index[places]{Denver} Detroit\index[places]{Detroit} Dublin\index[places]{Dublin} Dakar\index[places]{Dakar} Darwin\index[places]{Darwin} Dayton\index[places]{Dayton} Dover\index[places]{Dover} Edmonton\index[places]{Edmonton} Eugene\index[places]{Eugene} Elpaso\index[places]{Elpaso} Erie\index[places]{Erie} Evansville\index[places]{Evansville} Everett\index[places]{Everett} Entebbe\index[places]{Entebbe} Europe\index[places]{Europe} Frankfurt\index[places]{Frankfurt} Florence\index[places]{Florence} Fargo\index[places]{Fargo} Fresno\index[places]{Fresno} Flint\index[places]{Flint} Fremont\index[places]{Fremont} Fukuoka\index[places]{Fukuoka} Freetown\index[places]{Freetown} Geneva\index[places]{Geneva} Glasgow\index[places]{Glasgow} Galveston\index[places]{Galveston} Gary\index[places]{Gary} Genoa\index[places]{Genoa} Georgetown\index[places]{Georgetown} Glendale\index[places]{Glendale} Guangzhou\index[places]{Guangzhou} Houston\index[places]{Houston} Honolulu\index[places]{Honolulu} Halifax\index[places]{Halifax} Havana\index[places]{Havana} Hartford\index[places]{Hartford} Helsinki\index[places]{Helsinki} Hobart\index[places]{Hobart} Hanoi\index[places]{Hanoi} Indianapolis\index[places]{Indianapolis} Islamabad\index[places]{Islamabad} Irvine\index[places]{Irvine} Ithaca\index[places]{Ithaca} Incheon\index[places]{Incheon} Ibadan\index[places]{Ibadan} Iquique\index[places]{Iquique} Izmir\index[places]{Izmir} Jacksonville\index[places]{Jacksonville} Juneau\index[places]{Juneau} Jakarta\index[places]{Jakarta} Johannesburg\index[places]{Johannesburg} Jeddah\index[places]{Jeddah} Jersey\index[places]{Jersey} Joliet\index[places]{Joliet} Juba\index[places]{Juba} Kansas\index[places]{Kansas} Kyoto\index[places]{Kyoto} Kingston\index[places]{Kingston} Knoxville\index[places]{Knoxville} Kampala\index[places]{Kampala} Kobe\index[places]{Kobe} Karachi\index[places]{Karachi} Kabul\index[places]{Kabul} London\index[places]{London} Lisbon\index[places]{Lisbon} Lagos\index[places]{Lagos} Lima\index[places]{Lima} Lincoln\index[places]{Lincoln} Lansing\index[places]{Lansing} Laredo\index[places]{Laredo} Lubbock\index[places]{Lubbock} Miami\index[places]{Miami} Memphis\index[places]{Memphis} Milwaukee\index[places]{Milwaukee} Manila\index[places]{Manila} Melbourne\index[places]{Melbourne} Mumbai\index[places]{Mumbai} Madison\index[places]{Madison} Mobile\index[places]{Mobile} Nairobi\index[places]{Nairobi} Naples\index[places]{Naples} Nashville\index[places]{Nashville} Newark\index[places]{Newark} Norfolk\index[places]{Norfolk} Norman\index[places]{Norman} Nagoya\index[places]{Nagoya} Niamey\index[places]{Niamey} Orlando\index[places]{Orlando} Omaha\index[places]{Omaha} Oakland\index[places]{Oakland} Osaka\index[places]{Osaka} Oslo\index[places]{Oslo} Odessa\index[places]{Odessa} Ostrava\index[places]{Ostrava} Oxford\index[places]{Oxford} Paris\index[places]{Paris} Portland\index[places]{Portland} Phoenix\index[places]{Phoenix} Philadelphia\index[places]{Philadelphia} Pittsburgh\index[places]{Pittsburgh} Perth\index[places]{Perth} Pretoria\index[places]{Pretoria} Peoria\index[places]{Peoria} Queens\index[places]{Queens} Quito\index[places]{Quito} Quebec\index[places]{Quebec} Quanzhou\index[places]{Quanzhou} Qingdao\index[places]{Qingdao} Quetta\index[places]{Quetta} Quilmes\index[places]{Quilmes} Quimper\index[places]{Quimper} Rome\index[places]{Rome} Reno\index[places]{Reno} Richmond\index[places]{Richmond} Raleigh\index[places]{Raleigh} Riverside\index[places]{Riverside} Rochester\index[places]{Rochester} Rockford\index[places]{Rockford} Roswell\index[places]{Roswell} Seattle\index[places]{Seattle} Sydney\index[places]{Sydney} Seoul\index[places]{Seoul} Savannah\index[places]{Savannah} Spokane\index[places]{Spokane} Syracuse\index[places]{Syracuse} Springfield\index[places]{Springfield} Tokyo\index[places]{Tokyo} Toronto\index[places]{Toronto} Tampa\index[places]{Tampa} Tucson\index[places]{Tucson} Tulsa\index[places]{Tulsa} Toledo\index[places]{Toledo} Tacoma\index[places]{Tacoma} Utah\index[places]{Utah} Utica\index[places]{Utica} Uppsala\index[places]{Uppsala} Ulaanbaatar\index[places]{Ulaanbaatar} Ulsan\index[places]{Ulsan} Ufa\index[places]{Ufa} Ushuaia\index[places]{Ushuaia} Vancouver\index[places]{Vancouver} Venice\index[places]{Venice} Vienna\index[places]{Vienna} Victoria\index[places]{Victoria} Vallejo\index[places]{Vallejo} Verona\index[places]{Verona} Varna\index[places]{Varna} Washington\index[places]{Washington} Wichita\index[places]{Wichita} Waco\index[places]{Waco} Wilmington\index[places]{Wilmington} Winston\index[places]{Winston} Warsaw\index[places]{Warsaw} Wuhan\index[places]{Wuhan} Xiamen\index[places]{Xiamen} Xuzhou\index[places]{Xuzhou} Xining\index[places]{Xining} Xian\index[places]{Xian} Xanthus\index[places]{Xanthus} Xalapa\index[places]{Xalapa} Xingu\index[places]{Xingu} York\index[places]{York} Yokohama\index[places]{Yokohama} Yonkers\index[places]{Yonkers} Yakima\index[places]{Yakima} Yantai\index[places]{Yantai} Yuma\index[places]{Yuma} Ypsilanti\index[places]{Ypsilanti} Zurich\index[places]{Zurich} Zagreb\index[places]{Zagreb} Zhengzhou\index[places]{Zhengzhou} Zaria\index[places]{Zaria} Zamboanga\index[places]{Zamboanga} Zinder\index[places]{Zinder} Zibo\index[places]{Zibo}

Zibo\index[places]{Zibo} Zinder\index[places]{Zinder} Zamboanga\index[places]{Zamboanga} Zaria\index[places]{Zaria} Zhengzhou\index[places]{Zhengzhou} Zagreb\index[places]{Zagreb} Zurich\index[places]{Zurich} Ypsilanti\index[places]{Ypsilanti} Yuma\index[places]{Yuma} Yantai\index[places]{Yantai} Yakima\index[places]{Yakima} Yonkers\index[places]{Yonkers} Yokohama\index[places]{Yokohama} York\index[places]{York} Xingu\index[places]{Xingu} Xalapa\index[places]{Xalapa} Xanthus\index[places]{Xanthus} Xian\index[places]{Xian} Xining\index[places]{Xining} Xuzhou\index[places]{Xuzhou} Xiamen\index[places]{Xiamen} Wuhan\index[places]{Wuhan} Warsaw\index[places]{Warsaw} Winston\index[places]{Winston} Wilmington\index[places]{Wilmington} Waco\index[places]{Waco} Wichita\index[places]{Wichita} Washington\index[places]{Washington} Varna\index[places]{Varna} Verona\index[places]{Verona} Vallejo\index[places]{Vallejo} Victoria\index[places]{Victoria} Vienna\index[places]{Vienna} Venice\index[places]{Venice} Vancouver\index[places]{Vancouver} Ushuaia\index[places]{Ushuaia} Ufa\index[places]{Ufa} Ulsan\index[places]{Ulsan} Ulaanbaatar\index[places]{Ulaanbaatar} Uppsala\index[places]{Uppsala} Utica\index[places]{Utica} Utah\index[places]{Utah} Tacoma\index[places]{Tacoma} Toledo\index[places]{Toledo} Tulsa\index[places]{Tulsa} Tucson\index[places]{Tucson} Tampa\index[places]{Tampa} Toronto\index[places]{Toronto} Tokyo\index[places]{Tokyo} Springfield\index[places]{Springfield} Syracuse\index[places]{Syracuse} Spokane\index[places]{Spokane} Savannah\index[places]{Savannah} Seoul\index[places]{Seoul} Sydney\index[places]{Sydney} Seattle\index[places]{Seattle} Roswell\index[places]{Roswell} Rockford\index[places]{Rockford} Rochester\index[places]{Rochester} Riverside\index[places]{Riverside} Raleigh\index[places]{Raleigh} Richmond\index[places]{Richmond} Reno\index[places]{Reno} Rome\index[places]{Rome} Quimper\index[places]{Quimper} Quilmes\index[places]{Quilmes} Quetta\index[places]{Quetta} Qingdao\index[places]{Qingdao} Quanzhou\index[places]{Quanzhou} Quebec\index[places]{Quebec} Quito\index[places]{Quito} Queens\index[places]{Queens} Peoria\index[places]{Peoria} Pretoria\index[places]{Pretoria} Perth\index[places]{Perth} Pittsburgh\index[places]{Pittsburgh} Philadelphia\index[places]{Philadelphia} Phoenix\index[places]{Phoenix} Portland\index[places]{Portland} Paris\index[places]{Paris} Oxford\index[places]{Oxford} Ostrava\index[places]{Ostrava} Odessa\index[places]{Odessa} Oslo\index[places]{Oslo} Osaka\index[places]{Osaka} Oakland\index[places]{Oakland} Omaha\index[places]{Omaha} Orlando\index[places]{Orlando} Niamey\index[places]{Niamey} Nagoya\index[places]{Nagoya} Norman\index[places]{Norman} Norfolk\index[places]{Norfolk} Newark\index[places]{Newark} Nashville\index[places]{Nashville} Naples\index[places]{Naples} Nairobi\index[places]{Nairobi} Mobile\index[places]{Mobile} Madison\index[places]{Madison} Mumbai\index[places]{Mumbai} Melbourne\index[places]{Melbourne} Manila\index[places]{Manila} Milwaukee\index[places]{Milwaukee} Memphis\index[places]{Memphis} Miami\index[places]{Miami} Lubbock\index[places]{Lubbock} Laredo\index[places]{Laredo} Lansing\index[places]{Lansing} Lincoln\index[places]{Lincoln} Lima\index[places]{Lima} Lagos\index[places]{Lagos} Lisbon\index[places]{Lisbon} London\index[places]{London} Kabul\index[places]{Kabul} Karachi\index[places]{Karachi} Kobe\index[places]{Kobe} Kampala\index[places]{Kampala} Knoxville\index[places]{Knoxville} Kingston\index[places]{Kingston} Kyoto\index[places]{Kyoto} Kansas\index[places]{Kansas} Juba\index[places]{Juba} Joliet\index[places]{Joliet} Jersey\index[places]{Jersey} Jeddah\index[places]{Jeddah} Johannesburg\index[places]{Johannesburg} Jakarta\index[places]{Jakarta} Juneau\index[places]{Juneau} Jacksonville\index[places]{Jacksonville} Izmir\index[places]{Izmir} Iquique\index[places]{Iquique} Ibadan\index[places]{Ibadan} Incheon\index[places]{Incheon} Ithaca\index[places]{Ithaca} Irvine\index[places]{Irvine} Islamabad\index[places]{Islamabad} Indianapolis\index[places]{Indianapolis} Hanoi\index[places]{Hanoi} Hobart\index[places]{Hobart} Helsinki\index[places]{Helsinki} Hartford\index[places]{Hartford} Havana\index[places]{Havana} Halifax\index[places]{Halifax} Honolulu\index[places]{Honolulu} Houston\index[places]{Houston} Guangzhou\index[places]{Guangzhou} Glendale\index[places]{Glendale} Georgetown\index[places]{Georgetown} Genoa\index[places]{Genoa} Gary\index[places]{Gary} Galveston\index[places]{Galveston} Glasgow\index[places]{Glasgow} Geneva\index[places]{Geneva} Freetown\index[places]{Freetown} Fukuoka\index[places]{Fukuoka} Fremont\index[places]{Fremont} Flint\index[places]{Flint} Fresno\index[places]{Fresno} Fargo\index[places]{Fargo} Florence\index[places]{Florence} Frankfurt\index[places]{Frankfurt} Europe\index[places]{Europe} Entebbe\index[places]{Entebbe} Everett\index[places]{Everett} Evansville\index[places]{Evansville} Erie\index[places]{Erie} Elpaso\index[places]{Elpaso} Eugene\index[places]{Eugene} Edmonton\index[places]{Edmonton} Dover\index[places]{Dover} Dayton\index[places]{Dayton} Darwin\index[places]{Darwin} Dakar\index[places]{Dakar} Dublin\index[places]{Dublin} Detroit\index[places]{Detroit} Denver\index[places]{Denver} Dallas\index[places]{Dallas} Columbus\index[places]{Columbus} Cincinnati\index[places]{Cincinnati} Charlotte\index[places]{Charlotte} Colombo\index[places]{Colombo} Calgary\index[places]{Calgary} Cairo\index[places]{Cairo} Cleveland\index[places]{Cleveland} Chicago\index[places]{Chicago} Boise\index[places]{Boise} Buffalo\index[places]{Buffalo} Birmingham\index[places]{Birmingham} Berlin\index[places]{Berlin} Belfast\index[places]{Belfast} Brisbane\index[places]{Brisbane} Baltimore\index[places]{Baltimore} Boston\index[places]{Boston} Anchorage\index[places]{Anchorage} Albany\index[places]{Albany} Adelaide\index[places]{Adelaide} Accra\index[places]{Accra} Athens\index[places]{Athens} Atlanta\index[places]{Atlanta} Austin\index[places]{Austin} Amsterdam\index[places]{Amsterdam}

Amsterdam\index[places]{Amsterdam} Atlanta\index[places]{Atlanta} Accra\index[places]{Accra} Albany\index[places]{Albany} Boston\index[places]{Boston} Brisbane\index[places]{Brisbane} Berlin\index[places]{Berlin} Buffalo\index[places]{Buffalo} Chicago\index[places]{Chicago} Cairo\index[places]{Cairo} Colombo\index[places]{Colombo} Cincinnati\index[places]{Cincinnati} Dallas\index[places]{Dallas} Detroit\index[places]{Detroit} Dakar\index[places]{Dakar} Dayton\index[places]{Dayton} Edmonton\index[places]{Edmonton} Elpaso\index[places]{Elpaso} Evansville\index[places]{Evansville} Entebbe\index[places]{Entebbe} Frankfurt\index[places]{Frankfurt} Fargo\index[places]{Fargo} Flint\index[places]{Flint} Fukuoka\index[places]{Fukuoka} Geneva\index[places]{Geneva} Galveston\index[places]{Galveston} Genoa\index[places]{Genoa} Glendale\index[places]{Glendale} Houston\index[places]{Houston} Halifax\index[places]{Halifax} Hartford\index[places]{Hartford} Hobart\index[places]{Hobart} Indianapolis\index[places]{Indianapolis} Irvine\index[places]{Irvine} Incheon\index[places]{Incheon} Iquique\index[places]{Iquique} Jacksonville\index[places]{Jacksonville} Jakarta\index[places]{Jakarta} Jeddah\index[places]{Jeddah} Joliet\index[places]{Joliet} Kansas\index[places]{Kansas} Kingston\index[places]{Kingston} Kampala\index[places]{Kampala} Karachi\index[places]{Karachi} London\index[places]{London} Lagos\index[places]{Lagos} Lincoln\index[places]{Lincoln} Laredo\index[places]{Laredo} Miami\index[places]{Miami} Milwaukee\index[places]{Milwaukee} Melbourne\index[places]{Melbourne} Madison\index[places]{Madison} Nairobi\index[places]{Nairobi} Nashville\index[places]{Nashville} Norfolk\index[places]{Norfolk} Norman\index[places]{Norman} Orlando\index[places]{Orlando} Oakland\index[places]{Oakland} Oslo\index[places]{Oslo} Ostrava\index[places]{Ostrava} Paris\index[places]{Paris} Phoenix\index[places]{Phoenix} Pittsburgh\index[places]{Pittsburgh} Pretoria\index[places]{Pretoria} Queens\index[places]{Queens} Quebec\index[places]{Quebec} Qingdao\index[places]{Qingdao} Quilmes\index[places]{Quilmes} Rome\index[places]{Rome} Richmond\index[places]{Richmond} Riverside\index[places]{Riverside} Rockford\index[places]{Rockford} Seattle\index[places]{Seattle} Seoul\index[places]{Seoul} Spokane\index[places]{Spokane} Springfield\index[places]{Springfield} Tokyo\index[places]{Tokyo} Tampa\index[places]{Tampa} Tulsa\index[places]{Tulsa} Tacoma\index[places]{Tacoma} Utah\index[places]{Utah} Uppsala\index[places]{Uppsala} Ulsan\index[places]{Ulsan} Ushuaia\index[places]{Ushuaia} Vancouver\index[places]{Vancouver} Vienna\index[places]{Vienna} Vallejo\index[places]{Vallejo} Varna\index[places]{Varna} Washington\index[places]{Washington} Waco\index[places]{Waco} Winston\index[places]{Winston} Wuhan\index[places]{Wuhan} Xiamen\index[places]{Xiamen} Xining\index[places]{Xining} Xanthus\index[places]{Xanthus} Xingu\index[places]{Xingu} York\index[places]{York} Yonkers\index[places]{Yonkers} Yantai\index[places]{Yantai} Ypsilanti\index[places]{Ypsilanti} Zurich\index[places]{Zurich} Zhengzhou\index[places]{Zhengzhou} Zamboanga\index[places]{Zamboanga} Zibo\index[places]{Zibo} Austin\index[places]{Austin} Athens\index[places]{Athens} Adelaide\index[places]{Adelaide} Anchorage\index[places]{Anchorage} Baltimore\index[places]{Baltimore} Belfast\index[places]{Belfast} Birmingham\index[places]{Birmingham} Boise\index[places]{Boise} Cleveland\index[places]{Cleveland} Calgary\index[places]{Calgary} Charlotte\index[places]{Charlotte} Columbus\index[places]{Columbus} Denver\index[places]{Denver} Dublin\index[places]{Dublin} Darwin\index[places]{Darwin} Dover\index[places]{Dover} Eugene\index[places]{Eugene} Erie\index[places]{Erie} Everett\index[places]{Everett} Europe\index[places]{Europe} Florence\index[places]{Florence} Fresno\index[places]{Fresno} Fremont\index[places]{Fremont} Freetown\index[places]{Freetown} Glasgow\index[places]{Glasgow} Gary\index[places]{Gary} Georgetown\index[places]{Georgetown} Guangzhou\index[places]{Guangzhou} Honolulu\index[places]{Honolulu} Havana\index[places]{Havana} Helsinki\index[places]{Helsinki} Hanoi\index[places]{Hanoi} Islamabad\index[places]{Islamabad} Ithaca\index[places]{Ithaca} Ibadan\index[places]{Ibadan} Izmir\index[places]{Izmir} Juneau\index[places]{Juneau} Johannesburg\index[places]{Johannesburg} Jersey\index[places]{Jersey} Juba\index[places]{Juba} Kyoto\index[places]{Kyoto} Knoxville\index[places]{Knoxville} Kobe\index[places]{Kobe} Kabul\index[places]{Kabul} Lisbon\index[places]{Lisbon} Lima\index[places]{Lima} Lansing\index[places]{Lansing} Lubbock\index[places]{Lubbock} Memphis\index[places]{Memphis} Manila\index[places]{Manila} Mumbai\index[places]{Mumbai} Mobile\index[places]{Mobile} Naples\index[places]{Naples} Newark\index[places]{Newark} Nagoya\index[places]{Nagoya} Niamey\index[places]{Niamey} Omaha\index[places]{Omaha} Osaka\index[places]{Osaka} Odessa\index[places]{Odessa} Oxford\index[places]{Oxford} Portland\index[places]{Portland} Philadelphia\index[places]{Philadelphia} Perth\index[places]{Perth} Peoria\index[places]{Peoria} Quito\index[places]{Quito} Quanzhou\index[places]{Quanzhou} Quetta\index[places]{Quetta} Quimper\index[places]{Quimper} Reno\index[places]{Reno} Raleigh\index[places]{Raleigh} Rochester\index[places]{Rochester} Roswell\index[places]{Roswell} Sydney\index[places]{Sydney} Savannah\index[places]{Savannah} Syracuse\index[places]{Syracuse} Toronto\index[places]{Toronto} Tucson\index[places]{Tucson} Toledo\index[places]{Toledo} Topeka\index[places]{Topeka} Tehran\index[places]{Tehran} Vancouver\index[places]{Vancouver} Venice\index[places]{Venice} Victoria\index[places]{Victoria} Verona\index[places]{Verona} Wichita\index[places]{Wichita} Wilmington\index[places]{Wilmington} Warsaw\index[places]{Warsaw} Xuzhou\index[places]{Xuzhou} Xian\index[places]{Xian} Xalapa\index[places]{Xalapa} Yokohama\index[places]{Yokohama} Yakima\index[places]{Yakima} Yuma\index[places]{Yuma} Zagreb\index[places]{Zagreb} Zaria\index[places]{Zaria} Zinder\index[places]{Zinder}

Tyukfalva\index[places]{Tyukfalva}
Tyukmajor\index[places]{Tyukmajor}
Tyukos\index[places]{Tyukos}
Tyukod\index[places]{Tyukod}
Tyukostanya\index[places]{Tyukostanya}
Tyukospuszta\index[places]{Tyukospuszta}

Lyukfalva\index[places]{Lyukfalva}
Lyukos\index[places]{Lyukos}
Lyukasd\index[places]{Lyukasd}
Lyukostanya\index[places]{Lyukostanya}
Lyukospatak\index[places]{Lyukospatak}
Lyukvolgy\index[places]{Lyukvolgy}

Csongrád\index[places]{Csongrád}
Csikszereda\index[places]{Csikszereda}
Csorna\index[places]{Csorna}

Zsámbék\index[places]{Zsámbék}
Zsira\index[places]{Zsira}
Zsombolya\index[places]{Zsombolya}

Szada\index[places]{Szada}
Szarvas\index[places]{Szarvas}
Szeged\index[places]{Szeged}
Szeghalom\index[places]{Szeghalom}
Szentendre\index[places]{Szentendre}
Szekszard\index[places]{Szekszard}
Szentes\index[places]{Szentes}
Szigetvar\index[places]{Szigetvar}
Szolnok\index[places]{Szolnok}
Szombathely\index[places]{Szombathely}

Dzsungelfalva\index[places]{Dzsungelfalva}
Dzsunka-tó\index[places]{Dzsunka-tó}
Dzeta-függvény-tó\index[places]{Dzeta-függvény-tó}

\bigskip

\noindent \textbf{Mathematical index-entry examples:}

The symbol $D^2\xi$ denotes a variance-like expression%
\index[places]{deviation xi@\(D^2\xi\)}.

The $\Gamma$ distribution is indexed with a plain textual sort key%
\index[places]{gamma distribution@$\Gamma$ distribution}.

% Example of a mathematical printed index entry.
% The sort key is deliberately simple text; the mathematical form appears
% only after the @ separator, in the printed part of the index entry.
The variance symbol is $D^2\xi$\index[places]{deviation xi@\(D^2\xi\)}.

% Further examples containing mathematical notation in the printed entry.
The $\Gamma$ distribution\index[places]{distribution!gamma@$\Gamma$}
is a $\Gamma$ distribution\index[places]{gamma distribution@$\Gamma$ distribution!distribution function}.

\smallskip
\hrule

\clearpage
\printindex[places]

\end{document}
