Undefined control sequence \ifnumcomp and idxlayout

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:

\documentclass[12pt]{article}
\usepackage{makeidx}
\makeindex

\usepackage{idxlayout}

\begin{document}

\tableofcontents

\section{Test}

Test\index{test}

\printindex

\end{document}


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 '14 at 13:18
• I get no problem if I compile the file. – user31729 Dec 3 '14 at 13:19
• According to the documentation, \ifnumcomp has been added to etoolbox in version 1.8, released 2009-08-06. – egreg Dec 3 '14 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 '14 at 13:34
• @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 '14 at 13:42

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