Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
3  
Welcome to TeX.SX! Please add a minimal example that illustrates your problem. Of particular interest is the way you set up the index. –  Caramdir Feb 16 '11 at 3:40
4  
Then you use a style file (extension .ist) which underlines such page numbers. –  Herbert Feb 16 '11 at 8:39
    
@Rotring: The example shows no \index{...} and we do not know what is in your included files ... Your example does not provide real informations about your problem. –  Herbert Feb 16 '11 at 17:02
    
I'd bet my lunch that this example isn't minimal to produce this problem. (p.s. I have already eaten my lunch) –  Seamus Feb 16 '11 at 17:02
1  
You say that the “number is underlined like a citation”. Citations typically aren't underlined. Are you sure it isn't just your pdf viewer highlighting links? –  Caramdir Feb 16 '11 at 17:43
show 11 more comments

1 Answer 1

up vote 3 down vote accepted

I am pretty sure it is the hyperref package. This package turns all page numbers in the index into links. Normally, without any special setting, links are indicated by being framed. It is possible that you have a version of hyperref that is set up to underline links instead? In that case, you need to read the hyperref package documentation to see how to turn this off. I believe the colorlinks option will do it. To use it, replace \usepackage{hyperref} by \usepackage[colorlinks]{hyperref}.

share|improve this answer
    
Jan: Thanks a lot. I did some searching on this and I am clearly out of my range---I'll see if I can beg one of my smart friends to look at your idea & then let you know if we get anywhere. Thanks again. –  user3629 Feb 16 '11 at 23:02
    
Based on your latest comments to the question, I am sure it is the hyperref package underlining the links. See my latest edit for something you should be able to try easily. –  Jan Hlavacek Feb 16 '11 at 23:40
1  
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.