[pdftex] hyperref + makeindex + font change
Marc LAZAREFF
Marc.Lazareff at onera.fr
Wed Mar 27 11:15:45 CET 2002
Heiko Oberdiek wrote:
> On Tue, 26 Mar 2002, Marc LAZAREFF wrote:
>
> > but I just stumbled on a fine point :
> >
> > - latex + makeindex + font change commands :
> >
> > \newcommand{\eldfindx}[1]{{\bfseries#1}} % definition for some elsA
> > notion
> > \newcommand{\fcname}[2][]{{\nobreak\sttfont #2}\cohchk{fcname :
> > #2}\ifthenelse{\equal{#1}{def}}{\index{#2|eldfindx}}{\index{#2}}}
>
> > already uses the font change command for its own use, through the
> > 'hyperpage' macro :
>
> \eldfindx and \hyperpage cannot be nested through
> the |-syntax of \index command. But a \hypereldfindx
> can be defined:
>
> \newcommand*{\hypereldfindx}[1]{{\bfseries\hyperpage{#1}}}
> ...\index{#2|hypereldfindx}...
>
> or
>
> \providecommand*{\hyperpage}[1]{#1}
> \newcommand*{\eldfindx}[1]{{\bfseries\hyperpage{#1}}}
> ...\index{#2|eldfindx}...
>
> Yours sincerely
> Heiko <oberdiek at uni-freiburg.de>
I was certainly looking in the wrong direction (deadline stress, perhaps),
probably because I didn't understand \hyperpage.
Now it reads, using your solution :
\ifthenelse{\boolean{@pdf}}{\relax}{\providecommand{\hyperpage[1]{#1}}}
% font change commands
\newcommand{\eldfindx}[1]{\bfseries\hyperpage{#1}}
\newcommand{\atdfindx} ...
...
% tagging macros for various language elements
\newcommand{\fcname}[2][]{{\nobreak\sttfont
#2}\ifthenelse{\equal{#1}{def}}{\index{#2|eldfindx}}{\index{#2}}}
\newcommand{\atname}[2] ...
\ifthenelse{\equal{#1}{def}}{\index{#2|vadfindx}}{\index{#2|varfindx}}}
...
Thank you very much for your prompt reply.
Yours sincerely,
Marc
--
Marc Lazareff Phone : 01 46 73 42 73
DSNA/ELSA E-Mail : Marc.Lazareff at onera.fr
ONERA 29,Ave de la Division Leclerc 92320 CHATILLON FRANCE
More information about the pdftex
mailing list