Hyperref e splitindex não funcionam se o número da página estiver em negrito

Hyperref e splitindex não funcionam se o número da página estiver em negrito

Eu tenho o seguinte MWE test.tex:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{splitidx}
\newindex[Wissenschaftliche Namen]{sci}
\newindex[Deutsche Namen]{dt}
\newcommand{\BTS}[1]{\textbf{\textit{#1\sindex[sci]{#1|textbf}}}} %Index Scientific
\newcommand{\BTD}[1]{#1\sindex[dt]{#1}} %Index deutsch
\usepackage{hyperref}
\makeindex
\begin{document}
\BTS{Thymelicus lineola} (\BTD{Schwarzkolbiger Braun-Dickkopffalter}

    \printindex*

\end{document}

Compilado com pdflatex e splitindex o test-sci.idx mostra

\indexentry{Thymelicus lineola|textbf}{1}

ou seja, o atributo hyperpage não está presente como está no test-dt.idx:

\indexentry{Schwarzkolbiger Braun-Dickkopffalter|hyperpage}{1}

Alguma maneira de resolver isso?

Responder1

Você pode definir um novo comando que combine \textbf e \hyperpage:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{splitidx,xparse}
\newindex[Wissenschaftliche Namen]{sci}
\newindex[Deutsche Namen]{dt}
\NewDocumentCommand\boldhyperpage{ m } {\textbf{\hyperpage{#1}}}
\newcommand{\BTS}[1]{\textbf{\textit{#1\sindex[sci]{#1|boldhyperpage}}}} %Index Scientific
\newcommand{\BTD}[1]{#1\sindex[dt]{#1}} %Index deutsch
\usepackage{hyperref}
\makeindex
\begin{document}
\BTS{Thymelicus lineola} (\BTD{Schwarzkolbiger Braun-Dickkopffalter}

    \printindex*

\end{document}

informação relacionada