3

I'm getting some odd behavior in my Scripture index using the bibleref package and a style file. The word "Numbers" is unexplicably appearing as a header in the index.

MWE:

\documentclass{article}
\usepackage{bibleref}
\usepackage{indextools}

\biblerefmap{Genesis}{1@Old Testament!01}
\makeindex[title=Scripture Index,name=scr,options= -s style.ist]
\renewcommand{\biblerefindex}{\index[scr]}

\begin{document}
\ibibleverse{Gen}(1:1).
\printindex[scr]
\end{document}

style.ist

headings_flag 1
heading_prefix "{\\large\\bfseries "
heading_suffix "}\\nopagebreak\n"
delim_0 "\\dotfill"
delim_1 "\\dotfill"
delim_2 "\\dotfill"

Resulting index:

enter image description here

How can I prevent this?

1

The issue is in the .ist file. It specifies headings_flag 1, which, according to the indextools documentation, creates a 'titled style' (page 16). Because the books are mapped to numbers (1@ etc.) makeindex thinks the header should be Numbers. Accordingly, if you specify for example \biblerefmap{Genesis}{~@Old Testament!01} then the header is Symbols.

Removing this part of the style results in an index with dot fill but without the Numbers heading:

delim_0 "\\dotfill"
delim_1 "\\dotfill"
delim_2 "\\dotfill"

enter image description here

This looks a bit odd because the actual reference is on top of the second column, but with a longer index this becomes more clear.

If you do want to customize the headers (for example Old Testament/New Testament in bold) then you can use a small macro in the \biblerefmap commands.

MWE:

\documentclass{article}
\usepackage{bibleref}
\usepackage{indextools}

\def\otest{\textbf{Old Testament}}
\def\ntest{\textbf{New Testament}}

\biblerefmap{Genesis}{1@\otest!01}
\biblerefmap{Leviticus}{1@\otest!03}
\biblerefmap{Deuteronomy}{1@\otest!05}
\biblerefmap{Matthew}{2@\ntest!01}
\biblerefmap{Luke}{2@\ntest!03}
\makeindex[title=Scripture Index,name=scr,options= -s style.ist]
\renewcommand{\biblerefindex}{\index[scr]}

\begin{document}
\ibibleverse{Lev}(5:2).
\ibibleverse{Gen}(1:1).
\ibibleverse{Gen}(2:3).
\ibibleverse{Gen}(2:4).
\ibibleverse{Luke}(1:2).
\ibibleverse{Luke}(1:5).
\ibibleverse{Mt}(1:3).
\ibibleverse{Deut}(1:4).
\ibibleverse{Deut}(2:1).
\ibibleverse{Deut}(3:1).
\printindex[scr]
\end{document}

Result:

enter image description here

You can also edit the style of the book titles in the index by redefining \BRbooktitlestyle. If you redefine it at the start of the document then the entries in the document itself will be affected, whereas if it is redefined just before typesetting the index then only index items will be affected and the entries in the document remain in the default style.

\renewcommand*{\BRbooktitlestyle}[1]{\textbf{#1}}
\printindex[scr]

enter image description here

| improve this answer | |
  • Thank you @Marijn! That is working great. Is there a way for me to set the book names in boldface as well? – Caleb George Jul 29 at 13:00
  • 1
    @CalebGeorge I've added an edit to the question. – Marijn Jul 29 at 13:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.