The following MWE works fine:
\documentclass{book}
\usepackage{makeidx}
% \usepackage[greek,english]{babel}
\makeindex
\begin{document}
\frontmatter
foo\index{foo}
\mainmatter
\printindex
\end{document}
But if I uncomment the \usepackage[greek,english]{babel}
I get an error (even though the MWE doesn't contain any Greek text). My .idx
file has changed from
\indexentry{foo}{i}
to
\indexentry{foo}{{\fontencoding {OT1}\selectfont i}}
and the .ilg
file says
!! Input index error (file = test.idx, line = 1):
-- Illegal space within numerals in second argument.
How can I get rid of the unwanted font encoding?
The document was compiled with latexmk
(with the default options) in TexLive 2016.