The .ilg file is fulll of errors, and no \index command is accepted.
This is makeindex, version 2.15 [TeX Live 2011] (kpathsea + Thai support).
Scanning input file thesis.idx...
!! Input index error (file = thesis.idx, line = 1):
-- Illegal page number \thepage.
...
-- Illegal page number \thepage.
!! Input index error (file = thesis.idx, line = 28):
-- Illegal page number \thepage.
done (0 entries accepted, 28 rejected).
Nothing written in thesis.ind.
Transcript written in thesis.ilg.
There is issued \makeindex before document, and the \printindex command is redefined (and issued at the end after \bibliography).
\let\my@prnt@nd@x\printindex
\renewcommandx\printindex{%
\cleardoublepage%
\addcontentsline{toc}{chapter}{\indexname}%
\my@prnt@nd@x%
}
The .idx file has these lines (among others):
...
\indexentry{oscila\textcommabelow tie,~ecua\textcommabelow tie}{\thepage }
\indexentry{natural~numbers}{\thepage }
\indexentry{category,!balanced~definition}{\thepage }
...
For some reasons, in the class .dtx, i have redefined \protected@write which seems to be used by \@wrindex.
% \begin{macro}{\protected@write}
% \begin{macro}{\protected@write@immediate}
% \begin{macro}{\immediateaddtocontents}
% \begin{macro}{\addtocontentsline}
% \begin{macrocode}
% redefine \protected@write to use \protected@write@immediate below
\long\def\protected@write#1#2#3{\protected@write@immediate#1{#3}[#2]}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Code borrowed from `multitoc.dtx' CTAN /macros/latex/contrib/ms %%
%%% Copyright [1998..1999] Martin Schr\"oder. All rights reserved. %%
% \write with appropriate handling of |\protect| and |\thepage|; args:
% an output stream, some text to write, and some initialization code.
\newcommandx*\protected@write@immediate[3][3]{%
\begingroup
\let\thepage\relax
#3%
\let\protect\string
\edef\reserved@a{\immediate\write#1{#2}}%
\reserved@a
\endgroup
\if@nobreak\ifvmode\nobreak\fi\fi%
}
%%% %%
%%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
There is only a blank page after the bibilography, and usually i had all index entries in the following page, but nothing is generated; appreciate any help or fix on this. Thank s.
\protected@writeto begin with. Of course, if you declare\let\thepage\relax,\thepagebecomes unexpandable and will be written literally in the file. It's quite unclear why you want to make all writes\immediate: it's a plainly wrong thing to do. – egreg May 31 '12 at 15:58\TeXnique has resolved it. – sjbiaga May 31 '12 at 18:22