这是我之前的问题。我的目标是按照repeatindex
设计的方式工作:在每个新页面的顶部重复主索引项。我之前的问题的答案适用于我最初给出的简化 MWE。但是,当我尝试在我正在处理的实际项目中实施解决方案时,包glossaries
和/或一些简单的自定义命令似乎正在创建多个 LaTeX 错误。这个新的 MWE 中重现了错误:
\documentclass[10pt, paper=156mm:235mm, BCOR=12mm, headings=optiontotocandhead, headings=openany]{scrbook}
\usepackage[splitindex]{imakeidx}
\makeindex[options= -s index_style2.ist, intoc,name=A,title=\mbox{Appendix A},columns=1]
\makeatletter
\newcommand{\Dotfill}{\leavevmode \leaders \hb@xt@ 0.75em{\hss .\hss }\hfill \kern \z@}
\makeatother
\usepackage{repeatindex}
\newcommand{\testing}{\Gls{test}, \emph{testing}, one, two, three, three, four (\emph{1, 2, 3, 4})}
\usepackage[toc]{glossaries}
\makeglossaries
\newglossaryentry{test}
{
name=test,
description={test},
text=testing,
sort=test
}
\begin{document}
\frontmatter
\mainmatter
\chapter{The First Chapter}
\index[A]{\testing!1@One!A}\index[A]{\testing!1@One!B}\index[A]{\testing!1@One!C}\index[A]{\testing!1@One!D}\index[A]{\testing!1@One!E}\index[A]{\testing!1@One!F}\index[A]{\testing!1@One!G}\index[A]{\testing!1@One!H}\index[A]{\testing!1@One!I}\index[A]{\testing!1@One!J}\index[A]{\testing!1@One!K}\index[A]{\testing!1@One!L}\index[A]{\testing!1@One!M}\index[A]{\testing!1@One!N}\index[A]{\testing!1@One!O}\index[A]{\testing!1@One!P}\index[A]{\testing!1@One!Q}\index[A]{\testing!1@One!R}\index[A]{\testing!1@One!S}\index[A]{\testing!1@One!T}\index[A]{\testing!1@One!U}\index[A]{\testing!1@One!V}\index[A]{\testing!1@One!X}\index[A]{\testing!1@One!Y}\index[A]{\testing!1@One!Z}\index[A]{\testing!2@Two!A}\index[A]{\testing!2@Two!B}\index[A]{\testing!2@Two!C}\index[A]{\testing!2@Two!D}\index[A]{\testing!2@Two!E}\index[A]{\testing!2@Two!F}\index[A]{\testing!2@Two!G}\index[A]{\testing!2@Two!H}\index[A]{\testing!2@Two!I}\index[A]{\testing!2@Two!J}\index[A]{\testing!2@Two!K}\index[A]{\testing!2@Two!L}\index[A]{\testing!2@Two!M}\index[A]{\testing!2@Two!N}\index[A]{\testing!2@Two!O}\index[A]{\testing!2@Two!P}\index[A]{\testing!2@Two!Q}\index[A]{\testing!2@Two!R}\index[A]{\testing!2@Two!S}\index[A]{\testing!2@Two!T}\index[A]{\testing!2@Two!U}\index[A]{\testing!2@Two!V}\index[A]{\testing!2@Two!X}\index[A]{\testing!2@Two!Y}\index[A]{\testing!2@Two!Z}\index[A]{\testing!3@Three!A}\index[A]{\testing!3@Three!B}\index[A]{\testing!3@Three!C}\index[A]{\testing!3@Three!D}\index[A]{\testing!3@Three!E}\index[A]{\testing!3@Three!F}\index[A]{\testing!3@Three!G}\index[A]{\testing!3@Three!H}\index[A]{\testing!3@Three!I}\index[A]{\testing!3@Three!J}\index[A]{\testing!3@Three!K}\index[A]{\testing!3@Three!L}\index[A]{\testing!3@Three!M}\index[A]{\testing!3@Three!N}\index[A]{\testing!3@Three!O}\index[A]{\testing!3@Three!P}\index[A]{\testing!3@Three!Q}\index[A]{\testing!3@Three!R}\index[A]{\testing!3@Three!S}\index[A]{\testing!3@Three!T}\index[A]{\testing!3@Three!U}\index[A]{\testing!3@Three!V}\index[A]{\testing!3@Three!X}\index[A]{\testing!3@Three!Y}\index[A]{\testing!3@Three!Z} \index[A]{\testing!4@Four!A}\index[A]{\testing!4@Four!B}\index[A]{\testing!4@Four!C}\index[A]{\testing!4@Four!D}\index[A]{\testing!4@Four!E}\index[A]{\testing!4@Four!F}\index[A]{\testing!4@Four!G}\index[A]{\testing!4@Four!H}\index[A]{\testing!4@Four!I}\index[A]{\testing!4@Four!J}\index[A]{\testing!4@Four!K}\index[A]{\testing!4@Four!L}\index[A]{\testing!4@Four!M}\index[A]{\testing!4@Four!N}\index[A]{\testing!4@Four!O}\index[A]{\testing!4@Four!P}\index[A]{\testing!4@Four!Q}\index[A]{\testing!4@Four!R}\index[A]{\testing!4@Four!S}\index[A]{\testing!4@Four!T}\index[A]{\testing!4@Four!U}\index[A]{\testing!4@Four!V}\index[A]{\testing!4@Four!X}\index[A]{\testing!4@Four!Y}\index[A]{\testing!4@Four!Z}
\backmatter
\indexprologue{\small Description of Appendix A goes here.}
\makeatletter
\DeclareRobustCommand\itshape
{\not@math@alphabet\itshape\mathit
\fontshape\itdefault\selectfont}
\makeatother
\printindex[A]
\end{document}
该index_style2.ist
文件包含:
item_0 "\n \\small\\item ["
item_x1 "]\n \\subitem "
delim_0 "] \\Dotfill "
delim_1 " \\Dotfill "
delim_2 " \\Dotfill "
为什么现在会出现这么多的 LaTeX 错误以及如何预防它们?