Martin Görg schrieb:
On Mon, 06 Apr 2009 11:40:13 +0200, Florian Rubach wrote:

do you want the text of the index entry to be a link? I could not figure
out any reasonable way to achieve this. But when you are using hyperref,
the page number will be the clickable link to the text location.
You can simply specify the index entry in bf font and it will then
appear bold in your index.

Hi Florian,

Thanks for the reply. I want the page number to be clickable *and* bold. I know how to get it clickable (just use hyperref) and I know how to get it bold (add |textbf) but it doesn't work simultaneously.

Cheers,
Martin

Ah, now I see your problem.
The main issue is, that makeindex allows only one command to specify what to do with the page number, and hyperref needs this command to set up the linkage.
As suggested in the hypperref-readme, you can circumvent the problem:

 * The encap mechanism of Makeindex allows to use one command only
   (see documentation of Makeindex).
   If the user sets such a command, hyperref suppresses its
   \hyperpage command. With logical markup this situation
   can easily be solved:
     \usepackage{makeidx}
     \makeindex
     \usepackage[hyperindex]{hyperref}
     \newcommand*{\main}[1]{\textbf{\hyperpage{#1}}}
     ...
     \index{Some example|main}



So you just need to put the statement \newcommand*{\main}[1]{\textbf{\hyperpage{#1}}} in your document preamble and use |main whereever you want a pagenumber in the index to be bold and clickable.

Regards,
Florian

Reply via email to