(SECOND POST) Here is an updated code which shows that when commenting the index package I get in the index two separate entries in the index for the term alldifferent (one for its definition and one for its occurrence). But if I put the index package I get only one entry for alldifferent (as it should be), but I dont get the explanatory text anymore.
\documentclass[]{book}
\usepackage{etex}
\usepackage{makeidx}
\usepackage[totoc,columns=1]{idxlayout}
%\usepackage{index}
\usepackage[plainpages=false,pdfpagelabels,colorlinks,linkcolor=cyan,citecolor=cyan,urlcolor=cyan,bookmarks,hyperindex=false,pagebackref=true]{hyperref}
\sloppy
\makeindex
\newcommand*{\indexuse}[1]{\hyperpage{#1}}
\newcommand*{\indexdef}[1]{\textbf{\hyperpage{#1}}}
\newcommand*{\indexsyn}[1]{\textbf{\textit{\hyperpage{#1}}}}
\def\constraint#1{\textsc{#1}}
\def\ctrref#1{$\constraint{#1}$\index{#1@$\constraint{#1}$|indexuse}}
\pagestyle{headings}
\begin{document}
\pagenumbering{Alph}% to avoid spurious warnings
\title{\Huge Title}
\author{toto}
\maketitle
\thispagestyle{empty}
\frontmatter
\tableofcontents
\chapter{Preface}
abc abc
toto \index{toto|indexuse}
def
\index{alldifferent@$\constraint{alldifferent}$|indexdef}
\mainmatter
\chapter{First chapter}
tutu \index{tutu|indexuse}
titi \index{titi|indexuse}
aaa aaa \index{toto|indexdef} bbb
tutu \index{tutu|indexdef}
titi \index{titi|indexdef}
\index{toto|indexsyn}
\ctrref{alldifferent}
\setindexprenote{%
Page numbers in bold face (as in \textbf{160}) point to a definition
of a constraint, keyword, restriction or system. Page numbers in
bold-italic face (as in \textbf{\textit{160}}) notify an abbreviation
of a constraint name. Finally, page numbers in serif face (as in 160)
indicate an occurrence of constraint name, keyword, system or author name.%
}
\printindex
\end{document}
(INITIAL POST) Is there a way to add an explanatory small text to an index page when using makeidx together with the book class (note that since I am using an .ist style file I prefer to stay with makeidx and not to use the splitidx or imakeidx packages suggested in some posts; since I also use the book class I dont want to switch to the memoir class as suggested in some other post).
Since I am not completely sure where to exactly add your suggested code, I add a tiny example of my document that compile:
\documentclass[]{book}
\usepackage{makeidx}
\usepackage{index}
\usepackage[plainpages=false,pdfpagelabels,colorlinks,linkcolor=cyan,
citecolor=cyan,urlcolor=cyan,bookmarks,
hyperindex=false,pagebackref=true]{hyperref}
\sloppy
\makeindex
\newcommand*{\indexuse}[1]{\hyperpage{#1}}
\begin{document}
\pagestyle{headings}
\title{\Huge Title}
\author{toto}
\maketitle
\thispagestyle{empty}
\frontmatter
\chapter{Preface}
abc abc
toto \index{toto|indexuse}
def
\mainmatter
\chapter{First chapter}
tutu \index{tutu|indexuse}
titi \index{titi|indexuse}
\cleardoublepage
\markboth{INDEX}{INDEX}
\phantomsection
\addcontentsline{toc}{chapter}{Index}
% Page numbers in bold face (as in \textbf{160}) point to a definition
% of a constraint, keyword, restriction or system. Page numbers in
% bold-italic face (as in \textbf{\textit{160}}) notify an abbreviation
% of a constraint name. Finally, page numbers in serif face (as in 160)
% indicate an occurrence of constraint name, keyword, system or author name.
\printindex
\end{document}
Finally the catalog.ist file contains the following lines:
preamble "\\begin{theindex} {\\small\\onecolumn\\newcounter{idxl}\n"
postamble "\n\n} \\end{theindex} \n"
group_skip "\n\n \\vspace*{12mm}\n"
heading_prefix "{
\\bfseries\\Large\\hfill "
heading_suffix "\\hfill}\\nopagebreak\\vspace*{4mm}\\stepcounter{idxl}\n"
symhead_positive "1..."
headings_flag 1
\makeatletter
and\makeatother