I want to create a multilingual (Russian and English) alphabetical index. makeidx doesn't work with Cyrrilic symbols, so as far as I know the best solution is to use xindy option in imakeidx. I tried to run the code that was found here:

\usepackage[T1, T2A]{fontenc}
\usepackage[english, russian]{babel}

\definecolor{purpl}{RGB}{150, 120, 182} 

\makeindex[program=texindy, options=-M mystyle.xdy -L russian -C utf8]



    ;;; xindy style file
    (markup-locclass-list :open "\dotfill" :sep "") 
    ("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"))
    :run 0
    :rule-set ("latin-tolower"))
    :open-head "\nopagebreak\tikz\node at (0pt,0pt) [draw=none,fill=purpl!50,line width=1pt,inner sep=5pt]{\parbox{\linewidth-2\fboxsep-2\fboxrule-2pt}{\centering\large\sffamily\bfseries\textcolor{white}{ "
                :close-head "}}};\vspace*{0.2cm}\nopagebreak"


I use TeXstudio 4.5.2 on Windows 10 and I compiled the code with PDFLaTeX compiler for document and texindy option for index:

enter image description here

And what I got:

enter image description here

You can see that the index isn't sorted in the correct order. Moreover, the code in filecontents* environment doesn't work at all, because there aren't any purple rectangles as in example at the link above.

However, if I use xindex option: enter image description here

--- I will get a properly sorted index:

enter image description here

But the code in filecontents* environment still doesn't work.

What should I do to get an alphabetically sorted index?

  • An alternative is upmendex. See an example here: tex.stackexchange.com/a/650880/5735 Jul 31, 2023 at 14:53
  • @JavierBezos, great thank you for your helpful answer! upmendex seems to be working. But can I automatize this process? To compile idx file I need to launch cmd from folder where my file is and manually input upmendex -s names <your file>.idx command. And TeXstudio doesn't support upmendex compiler. Jul 31, 2023 at 15:22
  • No idea, sorry, I don’t use TeXstudio. Jul 31, 2023 at 16:17
  • @JavierBezos, anyway, thank you Jul 31, 2023 at 16:18


You must log in to answer this question.

Browse other questions tagged .