페이지 번호를 굵게 표시하면 Hyperref 및 분할 인덱스가 작동하지 않습니다.

페이지 번호를 굵게 표시하면 Hyperref 및 분할 인덱스가 작동하지 않습니다.

다음 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}

test-sci.idx는 pdflatex 및 Splitindex로 컴파일하여 보여줍니다.

\indexentry{Thymelicus lineola|textbf}{1}

즉, test-dt.idx에 있는 것처럼 hyperpage 속성이 존재하지 않습니다.

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

이 문제를 해결할 방법이 있나요?

답변1

\textbf와 \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}

관련 정보