xpatch bug ใน texlive 2019?
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}