I'm using xindy to make an index for my book, which is in Icelandic. 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. See my previous question.
There is a solution (see the answer), but it only works for utf-8-encoded files, and my document is in ANSI. I cannot change the encoding to utf-8 without creating some errors because there are labels with special characters.
What I'm hoping for is a solution analogous to the previous question that works for non-utf-8 files. Alternatively, if there was some easy way to change the alphabetical order xindy uses, that would be great. I can't seem to find any documentation for xindy that I can understand.
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
\usepackage[utf8]{inputenc}and it all comes out nicely. (Since my test file is saved in this encoding.) But now I'm not reproducing your situation at all. How to find the encoding? On Linux/OS X, I would usefile <filename>.texand it will tell me the file type, including encoding. If I 'save as...' my editor will show me the encoding, too. – cfr Jul 12 '15 at 00:29\usepackage[ansinew]{inputenc}. – Ulrike Fischer Jul 12 '15 at 09:25\usepackage[ansinew]{inputenc}compilation fails and I get a lot ofmissing \endcsname insertedandExtra \endcsnameerrors. I also get warnings likeCommand \" invalid in math mode on input line Nand the lines in question aren't in math mode at all. Also, all the citations and references are undefined. I think this may be due to labels that contains non-ASCII characters. Since there are hundreds of labels I'd rather avoid changing them. – Peter Jul 12 '15 at 10:22pdflatexthe document compiles and in the resulting pdf all the characters are displayed correctly. However, I get these aforementioned errors and I also get errors when I runxindyafterwards. – Peter Jul 12 '15 at 10:33