lỗi xpatch trong texlive 2019?
Sep 09 2020
Tôi đang chạy ví dụ được sửa đổi một chút với pdflatex và sau đó là 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}
Tuy nhiên, tiêu đề phần Nomenclaturevẫn ở đó trong khi nó không nên. Việc biên dịch cũng xuất ra successnên tôi bị lạc. Đây có phải là lỗi trong xpatchgói không?
Trả lời
2 egreg Sep 09 2020 at 22:25
Các nomenclgói đã được cập nhật gần đây và bây giờ nó sử dụng theo mặc định các tocbasicgói.
Để sử dụng phương pháp cũ, bạn cần gọi gói có tùy chọn 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}
Với tocbasicphương pháp này, bạn phải vá \tocbasic@listhead, nhưng điều này có thể gây ảnh hưởng xấu đến các phần khác của tài liệu.
\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}