![修补命名法不起作用](https://linux22.com/image/400922/%E4%BF%AE%E8%A1%A5%E5%91%BD%E5%90%8D%E6%B3%95%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
真的不明白为什么,但是这个代码不起作用
\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 报告此问题。