1

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?

3
  • 1
    Is this a duplicate of xpatch bug in texlive 2019?
    – Mico
    Sep 9, 2020 at 22:17
  • @Mico I've deleted the other one. I do not know what happened..
    – pluton
    Sep 9, 2020 at 22:22
  • @DavidCarlisle Not me. I have no clue why. I see this "xpatch.sty 2012/10/02 v0.3 Extending etoolbox patching commands". Not good.
    – pluton
    Sep 9, 2020 at 22:25

1 Answer 1

2

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
\patchcmd\tocbasic@listhead{\section*}{\@gobble}{}{}
\makeatother

\makenomenclature

\begin{document}
text
\nomenclature[1]{$\mu$}{variable}
\printnomenclature[0.9in]
\end{document}
2
  • ah ok done! Why is my xpatch package from 2012 though?
    – pluton
    Sep 9, 2020 at 22:26
  • And is there a new method achieving the same result? (removing the section title)
    – pluton
    Sep 9, 2020 at 22:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .