The following MWE with showidx and imakeidx:


generates the error:

! Undefined control sequence.
<argument> \ifdefequal 
      {\imki@jobname }{\@idxfile }{}{[\@idxfile ]\space }xxxx
l.6 Test\index{xxxx}

TeXstudio with MiKTeX and Overleaf both give the same message.

Edit: I did a fresh install a few weeks ago. The log file reports the following version numbers:

("C:\Users\Joe\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\showidx.sty"
Package: showidx 2014/09/29 v1.0m Standard LaTeX package
("C:\Users\Joe\AppData\Local\Programs\MiKTeX 2.9\tex/latex/imakeidx\imakeidx.st
Package: imakeidx 2016/10/15 v1.3e Package for typesetting indices in a synchro
nous mode
  • 1
    Hmm, you also need etoolbox.
    – egreg
    May 24, 2019 at 14:38

1 Answer 1




and report it to @egreg:-)

  • This works! Thank you, and egreg. May 24, 2019 at 14:42
  • 1
    @JosephQuinsey oh it's just that imakeindex uses the command \ifdefequal which is defined in the etoolbox package, but it doesn't load that package. egreg will no doubt change imakeindex to either load etoolbox or write the test a different way May 24, 2019 at 14:54
  • The problem, I think, is with showidx? May 24, 2019 at 15:25
  • @JosephQuinsey no it is imakeidx that uses \ifdefequal without defining it, so we can quite happily blame egreg (but he'll fix it I'm sure) May 24, 2019 at 15:27
  • @JosephQuinsey look at line 175 of imakeidx.sty May 24, 2019 at 15:28

You must log in to answer this question.

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