I am creating a document in Marathi, using the package marathi. I want to add a subject index at the end of the document, which I can add by using the imakeidx package. But the sorting order of the index I get, is not the standard alphabetic order in Marathi. But it is the order of Unicode chart available at unicode.org.

My MWE is given bellow. It gives the output of index as

  • कला
  • क्षमता
  • जातीयता
  • ज्ञानदर्शी
  • भारतीय

But as per the standard sorting order of Marathi it should be as

  • कला
  • जातीयता
  • भारतीय
  • क्षमता
  • ज्ञानदर्शी

This problem arises because, क्ष and ज्ञ are actually consonant clusters. The are made of क ् ष (U+0915 U+094D U+0937) and ज ् ञ (U+091C U+094D U+091E) respectively. Thus they are getting sorted as per their order. But in Marathi, they are placed at the last of the alphabets as special conjuncts.

Is there any solution to solve this problem and get language-specific sorting order in LaTeX?

Though I have used a specific package here (imakeidx), but my problem is of language-specific sorting order, which can be faced in any situation, where the sorting of text is required.


\makeindex[title=विषयसूची, name=W]

त्यांनी क्षमतेनिशी\index[W]{क्षमता} भारतातील जातीयतेवर\index[W]{जातीयता} कोरडे
ओढले आहेत.  नाटक  ही इतर कलांच्या\index[W]{कला} आश्रयाने जगणारी कला नाही.
भारतीय\index[W]{भारतीय} मूल्यव्यवस्थेला धोकादायक ठरेल असे ते म्हणतात. 
कला सर्वार्थाने ज्ञानदर्शी\index[W]{ज्ञानदर्शी} असली पाहिजे.

  • Not related to the question: Do you mean "...जातीयतेवर\index[W]{जातीयता} ओरडे ओढले आहेत."? Commented Apr 5, 2023 at 20:44
  • 1
    @ApoorvPotnis, nope! कोरडे ओढणे is a valid phrase of Marathi meaning condemning/criticizing something.
    – Niranjan
    Commented Apr 6, 2023 at 5:17
  • 1
    @Niranjan Thanks! You learn something new everyday! Commented Apr 6, 2023 at 6:24

1 Answer 1


this won't work with makeindex. You need an index program that knows about unicode. I would suggest to use upmendex.

Create a style file W.ist with (at least, you can add more options)

icu_locale "mr_IN"

Disable the automatic makeindex call of imakeidx:

\makeindex[title=विषयसूची, name=W,noautomatic]

Then after the lualatex run, run manually

upmendex -s W.ist W.idx

and then lualatex again. This then (in texlive 2023) gives this index (the spacing is due to the \indexspace between the groups and can be adjusted):

enter image description here

  • Thanks @UlrikeFischer for the answer, I was also facing the same problem. Your solution seems to work. I wanted to ask some questions though. 1. You mentioned about setting "other options" in the .ist file. Where can we read about them? 2. \indexspace needs to be adjusted, but I trust automated and standard typesetting more than setting things manually myself, so is there any set parameter which I can use to this which will give me a standard output? Also, where to put it exactly?
    – Niranjan
    Commented Apr 5, 2023 at 13:21
  • @Niranjan upmendex uses more or less similar options in style files as makeindex, so most makeindex documentation should apply, you can use texdoc -l upmendex to access the man page and learn about special options. And you can read more about upmendex and how to configure an index in the soon to appear new edition of the LaTeX companion. Commented Apr 5, 2023 at 13:24
  • @UlrikeFischer Thanks for the answer.
    – Sushant
    Commented Apr 5, 2023 at 15:02
  • @UlrikeFischer Thanks a lot! I will have a look at it.
    – Niranjan
    Commented Apr 5, 2023 at 15:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .