Set up an index for a book and everything works well, except the page numbers listed for the words in the Index are all underlined---EXCEPT when I add bold face, then they look fine. Any ideas what the problem is? Thanks!
Okay, here it is:
\documentclass[final, leqno]{book}
\usepackage{natbib}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{color}
\usepackage{hyperref}
\usepackage{rotating}
\usepackage{lscape}
\usepackage{latexsym}
\usepackage{CJK}
\usepackage{pinyin}
\usepackage{setspace}
\usepackage[outercaption]{sidecap}
\usepackage{ccaption}
\usepackage{verbatim}
\usepackage{fancyhdr}
\usepackage{makeidx}
\renewcommand{\figurename}{Fig.}
% Different font in captions
\newcommand{\captionfonts}{\small}
\makeatletter % Allow the use of @ in command names
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{{\captionfonts #1: #2}}%
\ifdim \wd\@tempboxa >\hsize
{\captionfonts #1: #2\par}
\else
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
\makeatother % Cancel the effect of \makeatletter
\renewcommand{\topfraction}{0.85}
\renewcommand{\textfraction}{0.1}
\renewcommand{\floatpagefraction}{0.75}
\oddsidemargin = 0.75 in \evensidemargin = 0.75 in
\title{------------------------------ \\
-----------------}
\author{------ -------- \\
{\small\em \copyright \ Draft date \today}}
\date{}
\makeindex
\setcounter{secnumdepth}{-1}
\begin{document}
\begin{CJK}{GB}{gbsn}
\maketitle
\thispagestyle{empty}
\begin{center}
Copyright $\copyright$ 2005 by ------ --------
\end{center}
\newpage
\addcontentsline{toc}{chapter}{Contents}
\pagenumbering{roman}
\newpage
\tableofcontents
\include{Preface}
\pagestyle{headings} \pagenumbering{arabic}
\include{PartOne}
\include{PartTwo}
\include{PartThree}
\include{Glossary}
\include{Biblo}
\cleardoublepage \addcontentsline{toc}{chapter}{Index} \printindex
%\include{index}
%\cleardoublepage\addcontentsline{toc}{Chapter}{Index} \printindex
\end{CJK}
\end{document}
The page entries for the Index are underlined when I key \index{text} They are
bold, not underlined and look fine when I use: \index{text|bf}
I understand that I'm supposed to place: \index{Selected text} after my index word and it should then come out like: Selected text, 34 in the Index, but when I do this & compile, the number is boldly underlined in the Yap assemblage. There must be some very simple solution, right? This version of LaTeX is fairly old---maybe eight years or so.
Apologies for not being equipped to discuss this properly---I obviously don't know anything about LaTeX (my wife set it up & convinced me to use it but she's too swamped to deal with it right now), but have been using it with little problem, finding quick solutions using GOOGLE searches. Surprised I've had no luck with this one, though. The Index is the last task of this 790 page book, which looks fantastic in all other respects---LaTeX really is the way to go.
Thanks, everyone, for trying to help me out.
\index{...}and we do not know what is in your included files ... Your example does not provide real informations about your problem. – Feb 16 '11 at 17:02figurenameandcaptionfonthave anything to do with your problem? You should leave out anything that does not relate to your problem. – Jan Hlavacek Feb 16 '11 at 17:06