% indexing was originally based on 'introduction-to-latex.pdf'
% http://impact.byu.edu/computation_seminar/latex/introduction-to-latex.pdf
%
% version 2 uses
% http://tex.stackexchange.com/questions/140676/how-to-move-from-makeindex-to-xindy
% as a guide.  That actually does a bit more than I need, so I have ensured that
% the glossary and second index are not actually used.

\documentclass{article}
% This file uses oldstyle markup instead of UTF-8, so I have removed cyrillic text.
% I also removed the \AE and \TH entries because they do not index as expected.
% use this for esh (old long s)
\usepackage{tipa}
\usepackage{setspace}
\usepackage[xindy={language=english, codepage=utf8}, style=altlist]{glossaries}
\usepackage[xindy, splitindex]{imakeidx}
\usepackage[itemlayout=singlepar]{idxlayout}
% one way to get rid of the horrible red borders on the links in the index
\usepackage[hidelinks]{hyperref}
\usepackage[
  open,
  openlevel=2,
  atend
]{bookmark}[2011/12/02]

\BookmarkAtEnd{%
  \bookmarksetup{startatroot}%
  \bookmark[named=Index, level=0]{index}%
}


\makeglossaries

\def\xindylangopt{-M lang/english/utf8-lang}
\makeindex[options=\xindylangopt]

% these define *candidate* entries for the glossary
\newglossaryentry{first}{name = Philosophers, description = {An argumentative bunch}}
\newglossaryentry{third}{name = Religion, description = {gods and their followers}}

\begin{document}
\singlespacing

% separate the paragraphs - found at
% https://www.complang.tuwien.ac.at/anton/latex/parskip.html
\addtolength{\parskip}{\baselineskip}


\begin{center}
\Large
Mr. Zarniwhoope's Encyclopedium
\large %12pt text for the remainder
\end{center}

\begin{flushleft}
\pdfbookmark{Introduction}{intro}
Being ane unreliable guide to divers topics.  Firste publi\textesh{}ed in
ye Regne of ye Kingge Veltrick I.  Truste this at thine owne
risque.  Caveat Lector.

\textbf{Acknowledgements:}
\pdfbookmark{Acknowledgements}{acknowledgements}

Monty Python for subject matter and the quote re the Holy Hand Grenade.

Terry Pratchet for subject matter.

Wikipedia for some of the details.

introduction-to-latex.pdf from impact.byu.edu for a guide to
indexing.

http://tex.stackexchange.com/questions/140676/how-to-move-from-makeindex-to-xindy
for an example of indexing (using Czech) which actually works with
current xindy (uses 'glossaries' because that correctly invokes
xindy, and has two indexes).

\textbf{Philosophy}
\pdfbookmark{Philosophy}{philosophy}

It is probably OK to mention Political Philosophers so long as
we are clear that some of them were wrong.  I will not attempt to
decree which fell into that category.  You might say that not all
of these were Political philosophers, but I will assert that they
were.  So there!

Gil Scott Heron \index{Heron} -- a bluesologist, some
say he was the real author of The State and Revolution.

Immanuel Kant \index{Kant} -- he aimed to resolve
disputes between the empirical and rationalist approaches.  This
may have been why he was very rarely stable.

Groucho Marx \index{Marx} -- I think I might have got
the wrong Marx here.

John Stuart Mill \index{Mill} -- it is thought that he
could not, in fact, have been particularly ill on half a pint of
shandy because that drink was most probably not invented during his
lifetime, on account of small beer being safer than unpurified water.

Dennis Moore \index{Moore} (no, not the American one).
An early proponent of the redistribution of wealth.

Vladimir Ilyich Ulyanov (Lenin) \index{Lenin} -- The
revolution will not be televised.  Televisions were not invented
until some years later.

Fran\c{c}ois-Marie Arouet (Voltaire) \index{Voltaire} --
everything is for the best, in the best of all possible worlds.

Erratum: \index{Erratum} some of the entries in this
section appear to have become mangled around.  Please make
the best of it.


%\newpage
\textbf{Religion}
\pdfbookmark{Religion}{religion}

\textit{Or, how to lose friends and upset people.}

Bilious \index{Bilious} -- the Oh God of Hangovers.

Fedecks \index{Fedecks} -- the Messenger of the Gods.

Flying Spaghetti Monster \index{FSM} -- for all you
Pastafarians out there.  As with religions, liberation fronts, and
political sects, there is a schism, in this case between those who
refer to ``His Noodliness'' and those who refer to ``Her Noodliness''.

The Holy Hand Grenade \index{Holy Hand Grenade, the} -- as carried
by Brother Maynard.
``First shalt thou take out the Holy Pin, then shalt thou count to
three, no more, no less. Three shall be the number thou shalt count,
and the number of the counting shall be three. Four shalt thou not
count, neither count thou two, excepting that thou then proceed to
three. Five is right out. Once the number three, being the third
number, be reached, then lobbest thou thy Holy Hand Grenade of
Antioch towards thy foe, who being naughty in My sight, shall snuff
it.''

The Spanish Inquisition \index{Spanish Inquisition, the} -- cardinals
Xim\'{e}nez, Biggles, and Fang.  Among their many instruments of torture
was the comfy chair.

\end{flushleft}

\printglossary % REQUIRED when using glossary package, even if empty
\printindex
\pdfbookmark{Index}{index}

\end{document}
