0

I'm using Imakeidx to auto-generate an author index for my bibentries, but I have a problem with the sorting of some special characters such as umlauts. As suggested, I tried to use xindy as a engine for the sorting, but the only result I got is that I have to process also the .idx file (without xindy I didn't need to), but the sorting is still wrong.

In my example, I need first Döllinger and then Dull.

I'm dying on it, really.

MWE:

% !BIB TS-program = biber
% !BIB program = biber
% !TEX encoding = UTF-8 Unicode
% !TeX TS-program = xelatexmk

\begin{filecontents}{archivio.bib}

@book{Dull,
    Address = {Cambridge},
    Author = {Mark Dull},
    Publisher = {Amazon KDP},
    Title = {Hello world},
    Year = {1999}}

@book{Dol2,
    Address = {Moskwa},
    Author = {Philip Döllinger},
    Publisher = {Sinodal'naja tip.},
    Title = {Sistematičeskoe opisanie rukopisej moskovskoj Sinodal'noj (patriaršej) biblioteki},
    Year = {1894}}


\end{filecontents}

\documentclass[11pt, openany]{book}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguages{latin, english, french}

\usepackage[]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
            language=auto,
            ibidpage=true,
            autolang=other,
            useprefix=true,
            giveninits=true,
            indexing=true,
            dateabbrev=false,
            backend=biber,
        ]{biblatex}



\addbibresource{archivio.bib}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\usepackage[xindy]{imakeidx}
\makeindex[program=xindy, name=nomi, intoc=true, title=Indice dei nomi]

\renewbibmacro*{citeindex}{%
  \ifciteindex
    {\ifnameundef{namea}{\indexnames{labelname}}{\indexnames{namea}}}
    {}}

\DeclareIndexNameFormat{default}{%      Formato del nome dell'autore
  \usebibmacro{index:name}
    {\index[nomi]}
    {\namepartfamily}
    {\namepartgiveni}
    {\namepartprefix}
    {\namepartsuffix}}


\begin{document}


I should like to sort properly \cite{Dull} and \cite{Dol2}.



\printindex[nomi]       % Indice dei nomi   
\end{document}
  • I guess this is at least somewhat related to tex.stackexchange.com/q/426811/35864 As I mentioned in my comment under that question it would be good to know which exact sorting rules/algorithm you intend to follow, not just the outcome of your MWE – moewe Jun 4 '18 at 18:37
  • simply alphabetic, ignoring the umlauts at all – Teodoro Jun 4 '18 at 19:11
  • 1
    Do you actually have a latexmkrc file that defines makeindex as xindy with the proper encoding? – Herb Schulz Jun 5 '18 at 0:40
  • 1
    You don't have to run the .idx with makeindex you have to run it with xindy! It works if you run makeindex and you get an index, but you don't get xindy's features. If you want xindy you need to run xindy. – moewe Jun 5 '18 at 8:20
  • 3
    imakeidx tries to run texindy through the shell escape, but if it can't, it writes the command you need to call in the transcript. In this case texindy nomi.idx, but you also need to specify the language as well. For example texindy -L german-din5007 -C utf8 nomi.idx. To incorporate it into TeXshop, try Adding a new engine in TeXShop. In this case, you need to explicitly use nomi.ist rather than appending .ist to the basename. – Nicola Talbot Jun 5 '18 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.