I use \addcontentsline
for putting an entry for the index in the table of contents, but I don't want the page number and I want a hyperlink. How can I do this?
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[makeindex]{splitidx}
\usepackage{hyperref}
\newcommand{\ITerm}{IndexTerms}
\newcommand{\IServ}{IndexServs}
\newcommand{\MyLarge}{\Large}
\newcommand{\smindexxspecial}[2]{{\MyLarge#2} \sindex[#1]{#2}}
\newcommand{\smindexspecial}[2]{{\MyLarge#2}\sindex[#1]{#2}}
\newcommand{\smindexvspecial}[2]{{\MyLarge#2}\sindex[#1]{#2}}
\newcommand{\smsindexspecial}[2]{{\MyLarge \url{#2}}\sindex[#1]{#2}}
\newindex[General Index]{IndexTerms}
\newindex[Websites]{IndexServs}
\tableofcontents
%\addcontentsline{toc}{chapter}{General Index}
\addtocontents{toc}{\protect\contentsline {chapter}{General Index}{}{}}
\printindex[\ITerm]
\addcontentsline{toc}{chapter}{Websites}
\printindex[\IServ]
And this is the end of the story.
\end{document}
When I do this one
\addtocontents{toc}{\protect\contentsline {chapter}{General Index}{}{}}
It appears without pagenumber in table of contents, but without hyperlink.
But when I use this one
%\addcontentsline{toc}{chapter}{General Index}
I have page number and a hyperlink.
Also I want it without pagenumber and with hyperlink.
I should mention that this is nothing to do with index termns page but with index names.. I have two index. The first one named as General Index and the other one Websites. I want this index names in table of contents.
;-)