真的不明白为什么,但是这个代码不起作用
\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{nomencl}
\makenomenclature
\makeatletter
\usepackage{etoolbox}
\tracingpatches
\patchcmd{\thenomenclature}{\section*}{\section}{}{}
\makeatother
\usepackage{babel}
\def\nomname{Things}
\begin{document}
\tableofcontents{}\clearpage
\section{section 1}
1 \nomenclature{a}{b}
\section{section 2}
\printnomenclature{}
\end{document}
具体来说 patchcmd 行,命名法仍然使用\section*
,日志显示以下内容
(c:/texlive/2019/texmf-dist/tex/latex/etoolbox/etoolbox.def
File: etoolbox.def 2018/08/19 v2.5f etoolbox debug messages (JAW)
)
[debug] tracing \patchcmd on input line 15
[debug] analyzing '\thenomenclature'
[debug] ++ control sequence is defined
[debug] ++ control sequence is a macro
[debug] ++ macro can be retokenized cleanly
[debug] ++ search pattern found in replacement text
[debug] ++ patching possible
[debug] == retokenizing macro now
这里发生了什么?
答案1
找到了导致此问题的原因,是因为 nomencl 软件包的新版本。现在要向 guthub 报告此问题。