当我运行makeindex
一个大型(书长度)文档(我将doc
在这里称之为)时,它使用 documentclassmemoir
并包含......
\makenomenclature
\makeindex[names]
\makeindex
...我在文档中看到以下内容.ilg
:
This is makeindex, version 2.15 [TeX Live 2019] (kpathsea + Thai support).
Scanning style file /usr/local/texlive/2019/texmf-dist/makeindex/nomencl/nomencl.ist........
** Input style error (file = /usr/local/texlive/2019/texmf-dist/makeindex/nomencl/nomencl.ist, line = 36):
-- Unknown specifier lethead_prefix.
** Input style error (file = /usr/local/texlive/2019/texmf-dist/makeindex/nomencl/nomencl.ist, line = 37):
-- Unknown specifier lethead_suffix.
** Input style error (file = /usr/local/texlive/2019/texmf-dist/makeindex/nomencl/nomencl.ist, line = 38):
-- Unknown specifier lethead_flag.
....done (12 attributes redefined, 3 ignored).
Scanning input file doc.nlo....done (205 entries accepted, 0 rejected).
Sorting entries.....done (1532 comparisons).
Generating output file doc.nls....done (213 lines written, 0 warnings).
Output written in doc.nls.
Transcript written in doc.ilg.
这仅有的 nomencl.ist
我的系统上的文件是 TeXLive 2019 发行版中指示的文件。
怎么了?
添加:MWE
这是一个不需要任何nomencl.cfg
即可生成“错误”的小例子:
\documentclass{memoir}
\usepackage[refpage,norefeq,intoc,english,nocfg]{nomencl}
\renewcommand{\nomname}{Index of Notation}
\makenomenclature
\begin{document}
\mainmatter
A \emph{map} $f\colon X \to Y$%
\nomenclature{$f \colon X \to Y$}{map from $X$ to $Y$}%
consists of \dots.
\backmatter
\printnomenclature[3.5cm]
\end{document}
在这种情况下,.ilg
是:
This is makeindex, version 2.15 [TeX Live 2019] (kpathsea + Thai support).
Scanning style file /usr/local/texlive/2019/texmf-dist/makeindex/nomencl/nomencl.ist........
** Input style error (file = /usr/local/texlive/2019/texmf-dist/makeindex/nomencl/nomencl.ist, line = 36):
-- Unknown specifier lethead_prefix.
** Input style error (file = /usr/local/texlive/2019/texmf-dist/makeindex/nomencl/nomencl.ist, line = 37):
-- Unknown specifier lethead_suffix.
** Input style error (file = /usr/local/texlive/2019/texmf-dist/makeindex/nomencl/nomencl.ist, line = 38):
-- Unknown specifier lethead_flag.
....done (12 attributes redefined, 3 ignored).
Scanning input file nom.nlo....done (1 entries accepted, 0 rejected).
Sorting entries...done (0 comparisons).
Generating output file nom.nls....done (6 lines written, 0 warnings).
Output written in nom.nls.
Transcript written in nom.ilg.
笔记:既然没有条目被拒绝,也没有警告,我为什么要问这个问题?因为我的文档现在mathit allowed only in math mode
在处理过程中生成了奇怪的错误消息doc.ind
,我无法追踪其原因。我单独询问:索引错误:\mathit 仅允许在数学模式下使用。
答案1
Phelype Oleinik 在评论中写道:
这些
lethead_...
是当前选项的旧名称heading_...
,并保存在 makeindex 样式文件中,以与旧版本的 makeindex 兼容。
当查看该nomencl.ist
文件(在 TeX Live 2022 中)时,它明确指出:
%% The next lines will produce some warnings when
%% running Makeindex as they try to cover two different
%% versions of the program:
lethead_prefix "\\nomgroup{"
lethead_suffix "}"
lethead_flag 1
heading_prefix "\\nomgroup{"
heading_suffix "}"
headings_flag 1
因此,只需忽略这些“错误”即可。