TeX - LaTeX Asked by Caleb George on October 1, 2021
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 "{largebfseries "
heading_suffix "}nopagebreakn"
delim_0 "dotfill"
delim_1 "dotfill"
delim_2 "dotfill"
Resulting index:
How can I prevent this?
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"
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}
defotest{textbf{Old Testament}}
defntest{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:
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]
Correct answer by Marijn on October 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP