2

The following MWE with showidx and imakeidx:

\documentclass{book}
\usepackage{showidx}
\usepackage{imakeidx}
\makeindex
\begin{document}
Test\index{xxxx}
\printindex
\end{document}

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
\indexbox=\insert199
)
("C:\Users\Joe\AppData\Local\Programs\MiKTeX 2.9\tex/latex/imakeidx\imakeidx.st
y"
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 at 14:38
2

add

\usepackage{etoolbox}

and report it to @egreg:-)

  • This works! Thank you, and egreg. – Joseph Quinsey May 24 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 – David Carlisle May 24 at 14:54
  • The problem, I think, is with showidx? – Joseph Quinsey May 24 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) – David Carlisle May 24 at 15:27
  • @JosephQuinsey look at line 175 of imakeidx.sty – David Carlisle May 24 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.