I'm using Xindy
to make an index for my book. It sorts the words mostly correctly, but it doesn't sort accented characters (i.e. á é í ó ú ý) after the corresponding non-accented characters (a e i o u y), unless the words are otherwise identical. For example, Xindy
will sort 'ís' after 'is', but it will sort 'auga' after 'ás'.
I would like it to sort ás after auga, and in general I want it to sort the accented characters after the corresponding non-accented character. For the record, this is the correct sort order:
a, á, b, c, d, ð, e, é, f, g, h, i, í, j, k, l, m, n, o, ó, p, q, r, s, t, u, ú, v, w, x, y, ý, z, þ, æ, ö
Here's my MWE:
% filename alphabet.tex
\documentclass[a4paper,11pt]{book}
\usepackage[icelandic]{babel}
\usepackage[T1]{fontenc}
\usepackage{makeidx}
\makeindex
\title{My book}
\author{Me}
\begin{document}
\chapter{Stafrófið}
Ananas\index{ananas}, ás\index{ás},
banani\index{banani}, dagblað\index{dagblað}, epli\index{epli}, ég\index{ég}, flugvél\index{flugvél}, gíraffi\index{gíraffi}, hús\index{hús}, indíáni\index{indíáni}, ís\index{ís}, jörðin\index{jörðin}, kisa\index{kisa}, lykill\index{lykill}, mús\index{mús},
nef\index{nef}, ormur\index{ormur}, óbó\index{óbó}, píanó\index{píanó}, rós\index{rós}, skæri\index{skæri}, tré\index{tré}, ugla\index{ugla}, úr\index{úr}, varir\index{varir}, yddari\index{yddari}, ýta\index{ýta}, þvottavél\index{þvottavél}, æð\index{æð}, ör\index{ör}, auga\index{auga}, eyra\index{eyra}.
\printindex
\end{document}
I compile it using
pdflatex alphabet.tex
texindy -L icelandic alphabet.idx
pdflatex alphabet.tex
(you may have to update Xindy
, as I had to do).
What I'm hoping for is some kind of command, either in my .tex
document or in some file that Xindy
reads, but other solutions are appreciated.
This question is similar and has an answer that seems to work but it uses LuaTex
while I use LaTeX
(switching is not an option). It's also very long and technical for such a (seemingly) simple change.
Edit: I failed to mention that my LaTeX
file is not utf-8 encoded and I'm not using \usepackage[utf8]{inputenc}, which I think might matter. I'm working on a 300+ book and I'm afraid that changing the encoding might have unexpected effects, so if there's a solution that doesn't require utf-8, that would be preferred.
missing \endcsname inserted
. Some of them are probably due to special characters being used as labels (not very smart of those who worked on the document before me).