>cat t2.tex
\documentclass[titlepage]{report}%
\usepackage{minitoc}
\begin{document}
foo
\end{document}
now
htlatex t2.tex "html,4"
No errors. Now I name it to index.tex and try again:
>cp t2.tex index.tex
>htlatex index.tex "html,4"
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
....
(/usr/share/texmf/tex/generic/tex4ht/html4-math.4ht))
(/usr/share/texmf/tex/generic/tex4ht/index.4ht
! Undefined control sequence.
<argument> \printindex
l.41 ...name{\the\@nameuse{idxtitle@\@indextype}}}
?
any other name seems to work ok
cp index.tex indexx.tex
htlatex indexx.tex
no errors. Only when the name is index.tex. And this is ONLY when I include minitoc. If I remove minitoc, then it compiles ok:
>cat index.tex
\documentclass[titlepage]{report}%
%\usepackage{minitoc}
\begin{document}
foo
\end{document}
>htlatex index.tex
No error (just need to make sure to remove all old index.aux and other index.* stuff before trying again. but no error.
So. why is including package minitoc causes tex4ht error ONLY when the source LaTeX file is called index.tex?
specs:
>tex4ht -v
tex4ht.c (2009-01-31-07:33 kpathsea)
>latex -v
pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
>uname -a
Linux 3.5.0-17-generic #28-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
minitoccausestex4htto inputindex.4ht, which is when the error happens. – egreg Jan 16 at 23:54