TransWikia.com

xpatch bug in texlive 2019?

TeX - LaTeX Asked on June 29, 2021

I am running the slightly modified example with pdflatex and then makeindex (makeindex -s nomencl.ist -o myfile.nls myfile.nlo)

documentclass[]{article}
usepackage{xpatch}
usepackage{nomencl} 

patchcmd{thenomenclature}{section*{nomname}}{relax}{typeout{Success}}{typeout{Failure}}

makenomenclature 

begin{document}
text
nomenclature[1]{$mu$}{variable}
printnomenclature[0.9in]
end{document}

However, the section title Nomenclature is still there while it should not. The compilation also outputs success so I am lost. Is this a bug in the xpatch package?

One Answer

The nomencl package has been updated recently and now it uses by default the tocbasic package.

In order to use the old method, you need to call the package with the option notocbasic.

% arara: pdflatex
% arara: nomencl
% arara: pdflatex

documentclass[]{article}
usepackage{xpatch}
usepackage[notocbasic]{nomencl} 

patchcmd{thenomenclature}{section*{nomname}}{relax}{typeout{Success}}{typeout{Failure}}
makenomenclature 

begin{document}
text
nomenclature[1]{$mu$}{variable}
printnomenclature[0.9in]
end{document}

enter image description here

With the tocbasic method, you have to patch tocbasic@listhead, but this might have adverse effects on other parts of the document.

documentclass[]{article}
usepackage{xpatch}
usepackage{nomencl}

makeatletter
patchcmdtocbasic@listhead{section*}{@gobble}{}{}
makeatother

makenomenclature

begin{document}
text
nomenclature[1]{$mu$}{variable}
printnomenclature[0.9in]
end{document}

Correct answer by egreg on June 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP