I am using the imakeidx package to generate an index for some course notes. The problem is that the document uses a different page numbering system: it is divided into "lectures" and numbers the pages within the lecture
\numberwithin{page}{lecture}
This causes imakeidx (and plain makeidx) to quit working. Any thoughts for how I can get around this?
Edit: here is a minimal example:
\documentclass{article}
\usepackage{amsmath}
\usepackage{imakeidx}
\makeindex
\numberwithin{page}{section}
\begin{document}
Test\index{Test1}
\printindex
\end{document}
Compiling this produces no errors but does not generate an index. Commenting out line number 5 (\numberwithin{page}{section}) causes the index to be generated.

quit workingis not really helpful. Can you provide us with a minimal working document that shows this feature? – Mar 11 '16 at 19:421.2as page number. Do you plan to have subitems? – egreg Mar 14 '16 at 19:04