I am struggling with idxlayout for generating a formatted index (my intent is to be able to group all subentries in one paragraph). Here is a minimal example:









When I compile it

$ latex $docname
$ makeindex $idxfile
$ latex $docname

the last command fails with this error (and other subsequent errors):

! Undefined control sequence.
\theindex ...umnnote}{}{\ila@prenote }}\ifnumcomp 
                                              {\theidxcols }{<}{\tw@ }{\...
l.1 \begin{theindex}

If I ignore the errors, I get a document with two indices (the first one is empty) and there are some symbols appearing around the second index (namely "2¡Θ" and "2¡Θ").

Could you help? Thanks in advance!

  • Can you look in the .log file for the version number and release date of etoolbox.sty?
    – egreg
    Dec 3, 2014 at 13:18
  • I get no problem if I compile the file.
    – user31729
    Dec 3, 2014 at 13:19
  • According to the documentation, \ifnumcomp has been added to etoolbox in version 1.8, released 2009-08-06.
    – egreg
    Dec 3, 2014 at 13:24
  • OK, that was the problem: my version was outdated (2008). I have updated etoolbox.sty and everything works fine now. Many thanks!
    – mzi
    Dec 3, 2014 at 13:34
  • 1
    @mzi: You should update your whole TeX distribution, not just one package -- if some of your packages are from 2008, their might occur more inconsistencies
    – user31729
    Dec 3, 2014 at 13:42

1 Answer 1


Update your TeX distribution: the \ifnumcomp macro has been added to etoolbox in version 1.8, released 2009-08-06.

Note that just updating the package doesn't guarantee everything works, so it's better to upgrade the whole distribution.

You must log in to answer this question.

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