![如何使用 \bibleref 和 \imakeidx 对圣经书籍进行正确排序](https://linux22.com/image/462919/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20%5Cbibleref%20%E5%92%8C%20%5Cimakeidx%20%E5%AF%B9%E5%9C%A3%E7%BB%8F%E4%B9%A6%E7%B1%8D%E8%BF%9B%E8%A1%8C%E6%AD%A3%E7%A1%AE%E6%8E%92%E5%BA%8F.png)
我希望我的《圣经》索引能够将《撒母耳记上和记下》、《列王纪上和记下》和《历代志上和记下》等圣经书卷归类到《希伯来圣经》下。但它们的排序是在《新约》之后,我需要帮助才能正确排序。
我的 MWE:
%!TEX encoding = UTF-8 Unicode
\documentclass[openany]{book}
\usepackage{imakeidx}
\RequirePackage{bibleref}
\makeindex[name=scripture,title={Bible index}]
\renewcommand{\biblerefindex}{\index[scripture]}
%%%%%%%%%%%%%%%%% bibleref
\def\hb{\textbf{Hebrew Bible}}
\def\nt{\textbf{New Testament}}%
%%%%%%%%%%%%%%%%% bibleref map
\biblerefmap{Genesis}{1@\hb!01}%
\biblerefmap{IKings}{1@\hb!11}
\biblerefmap{IIKings}{1@\hb!12}
\biblerefmap{IChronicles}{1@\hb!13}
\biblerefmap{IIChronicles}{1@\hb!14}
\biblerefmap{Matthew}{3@\nt!01}
\biblerefmap{Mark}{3@\nt!02}
\biblerefmap{Luke}{3@\nt!03}
\biblerefmap{John}{3@\nt!04}
\begin{document}
This is a quote from \ibibleverse{Genesis}(2:17).
And another from the Gospel of \ibibleverse{Lk}(15:11).
Then one of \ibibleverse{IKgs}(9:3) and another from
\ibibleverse{IChr}(12:1).
The topic is the Bible.\ibibleverse{Mt}(25:3)
The beginning of \ibibleverse{Mk}(1:1).
\printindex[scripture]
\end{document}```
[1]: https://i.stack.imgur.com/AshPU.jpg
答案1
%!TEX encoding = UTF-8 Unicode
\documentclass[openany]{book}
\RequirePackage{bibleref}
\usepackage[makeindex]{imakeidx}
\makeindex[name=scripture, title={Bible index}]
\makeindex[name=topics, title=Index]
\renewcommand*{\biblerefindex}{\index[scripture]}
\begin{document}
%%%%%%%%%%%%%%%%% bibleref
\def\hb{\textbf{Hebrew Bible}}
\def\dc{\textbf{Deuterocanonicals}}
\def\nt{\textbf{New Testament}}%
%%%%%%%%%%%%%%%%% bibleref map
\biblerefmap{Genesis}{1@\hb!01}%
\biblerefmap{Kings1}{1@\hb!11}
\biblerefmap{Kings2}{1@\hb!12}
\biblerefmap{Chronicles1}{1@\hb!13}
\biblerefmap{Chronicles2}{1@\hb!14}
\biblerefmap{Wisdom}{2@\dc!05}%
\biblerefmap{Matthew}{3@\nt!01}
\biblerefmap{Mark}{3@\nt!02}
\biblerefmap{Luke}{3@\nt!03}
\biblerefmap{John3}{3@\nt!04}
\ibibleverse{Genesis}(2:17)\\
\ibibleverse{Luke}(15:11-32)\\
\ibibleverse{IKgs}(9:3)\\
\ibibleverse{IChr}(12:1)\\
\index[topics]{Bible}\\
\ibibleverse{Wisdom}(15:4)\\
\ibibleverse{Mt}(25:3)\\
\ibibleverse{IIIJohn}(1:5)\\
\ibibleverse{IIChr}(32:1)
\printindex[scripture]
\printindex[topics]
\end{document}