Non ho capito cosa vole dire annullare i comandi \chaptermark e \sectionmark.
Cioè devo scrivere così?
`
\usepackage{makeidx,fancyhdr,fixmarks}
\renewcommand{\chaptermark}{}
\renewcommand{\sectionmark}{}
\makeatletter
\let\@@theindex\theindex
\def\theindex{\@@theindex
\let\chaptermark\@gobble
\let\sectionmark\@gobble
\let\index@item\item
\def\item##1,{\markboth{##1}{##1}\index@item #1,}%
\fancyhead[LE]{\leftmark}%
\fancyhead[RO]{\rightmark}%
\fancyhead[RE,LO]{\thepage}%
}
\makeatother%e poi le testatine dei capitoli in cui ridefinisco \chaptermark e \sectionmark
\pagestyle{fancy}
….`oppure la struttura è diversa?
No, vanno annullati dove hai l’esigenza particolare. Infatti il codice che ti ho dato li annulla localmente:
`\let\chaptermark\@gobble`
rende \chaptermark un comando con un argomento che semplicemente lo butta via.
Il comando \endtheindex, che viene eseguito alla fine dell’ambiente theindex, esegue un clearpage, quindi non dovrebbero esserci problemi con l’ultima pagina.
Ciao
Enrico