# How to use Xindy with TeXShop/LaTeX Mac OS X (error: sort åäö in index)

I am new to LaTeX since a year (old man trying...) and have some problem with index. I write in Swedish and the letters "å ä ö" are sorted wrongly in the index. (äåöabc...) Otherwise the indexing works well with MakeIndex.

I have tried with Xindy but something goes wrong. "Åäö" works well in text! How do I use Xindy? ( \usepackage{texindy} ? Anything more to add (TeXShop/LaTeX)? Please help!

This is part of my preamble:

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[swedish]{babel}
\usepackage[utf8]{inputenc}

\usepackage{makeidx}
\newcommand{\boldidx}[1]{{\bf #1}}

....
This kind of index in text:

\index{Säker plats|boldidx}Säker plats

....


Is TeXShop OK to use? Is there a better one for Mac OS X Mavericks?

texindy is the minimalistic form of xindy.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[swedish]{babel}
\usepackage[utf8]{inputenc}

\usepackage{makeidx}
\makeindex

\begin{document}
This kind of index in text:

\index{Säker plats|textbf}Säker plats \index{Säker platsXX@\textbf{Säker plats}}

foo\index{Åäö}\index{Aäö}
bar\index{äö}\index{aø}\index{ohne}\index{øæ}
\printindex
\end{document}


run it with

pdflatex <file>
texindy <file.idx>
pdflatex <file>
pdflatex <file>


and you'll get:

With xindy you can define your own module. See documentation. An alternative sorting is possible with:

 texindy -L swedish -M utf8 test7.idx


• Is there a default module that sorts å/ä/ö under their own headings at the end of the index, as expected in a swedish index? – You Jan 6 '14 at 14:37
• Hi. How do I Run texindy within Texshop? Can´t find it.. Also, I did mean this sort order: (Ärla, Adam, Bertil, Östen, Osten, Åre, Årtal) should be: (Adam, Bertil, Osten, Åre, Ärla, Östen). Did I explain that..:? o I have to run texindy manual; it´s not in the list in Texshop! – Mr_SEkh Jan 6 '14 at 15:01
• @user43352: in the configuration menu of TeXshop where you define the index program you must replace makeindex by the above commnad. As an alternative you can run the command in a terminal. However, I do not understand what you mean by sorting: - ??? – user2478 Jan 6 '14 at 15:29
• In Swedish we have alphabetic order abcdefghijklmnopqrstuvxyzåäö but MAKEINDEX is sorting in this order åäöabcdefghijklmnoprtstuvxyz which means that "å" is sorting before "a" instead of after "z"... – Mr_SEkh Jan 6 '14 at 16:12
• @user43352: the sorting order is defined in the xindy module for swedish which can easily be adopted. However, see my edited answer where the second example has the latter sorting. – user2478 Jan 6 '14 at 16:29