I have marked index entries in a document and get the following when I run \makeindex:
This is makeindex, version 2.15 [TeX Live 2020] (kpathsea + Thai support).
Scanning input file 2023_scl_002 copy.idx....done (171 entries accepted, 26 rejected).
Sorting entries....done (1400 comparisons).
Generating output file 2023_scl_002 copy.ind....done (240 lines written, 0 warnings).
Output written in 2023_scl_002 copy.ind.
Transcript written in 2023_scl_002 copy.ilg.
Why were 26 entries rejected? How can I determine the reasons for rejection?
Edit: I looked at the *.ilg file and saw this:
!! Input index error (file = 2023_scl_002 copy.idx, line = 157):
-- Extra `!' at position 46 of first argument.
So I went to the *.idx file and saw this entry:
\indexentry{Joint Stock Company!General Assembly!Meetings!Frequency}{81}
I don't see the problem. Are four levels prohibited? If so, how can I include them?
2nd Edit: Looks like 4 levels isn't permitted under \makeindex. Is there a package that permits 4 levels? Or five?
@egreg:
3rd Edit:
So to use xindex, you have to:
- Run LaTeX once.
- Run LaTeX again to get the ToC.
- Run
xindexagainst the LaTeX file - Run LaTeX again to get a pdf with the xindex-generated index.
4th Edit:
Running \makeindex in order to use xindex still rejects four level deep entries.


2023_scl_002 copy.ilg? Just a copy of this text? Otherwise you probably have to do some digging to figure out where the problems are. It can be that the index text contains incorrect use of special chars. Without example code we cannot say much. – daleif Sep 16 '22 at 10:55makeindex. I tend to usetexindy/xindyand it does not have such limitations. Though do remember that having these very deep indices makes them hard to read. – daleif Sep 16 '22 at 11:57xindexinstead ofmakeindex, which supports four levels. Not more. – egreg Sep 16 '22 at 12:49