texlive 2019의 xpatch 버그?
Sep 09 2020
pdflatex와 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}
그러나 섹션 제목 Nomenclature은 여전히 존재하지만 그렇지 않아야합니다. 컴파일도 출력 success되므로 길을 잃었습니다. xpatch패키지 의 버그 입니까?
답변
2 egreg Sep 09 2020 at 22:25
nomencl패키지는 최근에 업데이트 된 지금은 기본적으로 사용하는 tocbasic패키지를.
이전 방법을 사용하려면 옵션으로 패키지를 호출해야합니다 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}
이 tocbasic방법을 사용하면 을 패치해야 \tocbasic@listhead하지만 문서의 다른 부분에 악영향을 미칠 수 있습니다.
\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}