0

I’m trying to follow this example to combine bold and multi-page index numbering, but it’s not working for all my index entries. Although it’s working for most entries, I won’t get any bold for some page ranges for some entries.

I suspect it could be an issue between texindy and hyperref, but I was not able to solve the issue as per this solution.

I’ve got 4 types of warnings from texindy:

WARNING: unknown attribute `textbf '! (ignored)

WARNING: Found :open-range that was already opened! Location-references are 20 and 71 in keyword (-- domain). I'll continue and ignore this. WARNING: Found no :close-range matching an already opened one! Location-reference is 20 in keyword (-- domain). Maybe I lost some of the regular location-references.

WARNING: Found a :close-range in the index that wasn't opened before! Location-reference is 19 in keyword (Epistemology, epistemological) I'll continue and ignore this.

Found no :close-range matching an already opened one! Location-reference is 37 in keyword (discourse --). Maybe I lost some of the regular location-references.

My document is as follows:

\documentclass{book}

\RequirePackage{hyperref}

\RequirePackage[texindy,splitindex]{imakeidx}
\def\xindyopt{-M mystyle}
\makeindex[options=\xindyopt]
\makeindex[name=notions,title=Index of Notions,program=texindy, options=\xindyopt] 

\begin{document}

\index{single}
...
\index[notions]{Specialised!-- domain|(textbf}{20}
...
\index[notions]{Specialised!-- domain|)textbf}{23}
…
\index[notions]{Specialised!-- domain|(textbf}{71}
…
\index[notions]{Specialised!-- domain|)textbf}{73}
…

\printindex[notions]

\end{document}

My compilation process is as follows:

pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex
biber %
pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex
pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex
xindy -L english -M texindy -M mystyle.xdy %.idx
pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex
view-pdf

and my mystyle.xdy file is as follows:

; File mystyle.xdy
(require "page-ranges.xdy")

(define-location-class "arabic-page-numbers"
                      ("arabic-numbers") :min-range-length 1)

(markup-locref :open "\hyperpage{" :close "}")

;;; xindy style file
(markup-locclass-list :open ", " :sep " , ")

(sort-rule "Ø" "O~b")
(sort-rule "Ó" "O~b")
(sort-rule "Š" "S~b")
(sort-rule "č" "c~b")
(sort-rule "ć" "c~b")
(sort-rule "ï" "c~b")
(sort-rule "ö" "o~b")

My source.idx file looks correct:

\indexentry[notions]{Epistemology, epistemological|(textbf}{18}
\indexentry[notions]{Epistemology, epistemological|)textbf}{19}

\indexentry[notions]{Specialised!-- domain|(textbf}{20}
...
\indexentry[notions]{Specialised!-- domain|)textbf}{23}
...
\indexentry[notions]{Specialised!-- discourse|(textbf}{49}
\indexentry[notions]{Specialised!-- discourse|)textbf}{50}
...
\indexentry[notions]{Specialised!-- domain|(textbf}{71}
...
\indexentry[notions]{Specialised!-- domain|)textbf}{73}

But these page ranges won’t appear in bold.

Any idea how I can solve this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.