在之前的几个查询中,例如将脚注改为尾注,但允许使用一些旧脚注我询问了如何以灵活的方式将脚注转换为尾注,而无需更改文本中\footnote{}
的实际命令\endnote{}
。我在以下代码中找到了令人满意的解决方案,我将其包含在input{endnotes}
。我在以下代码中找到了令人满意的解决方案,我将其包含在我的主要书籍文件中,如下所示,并引用了之前关于此主题的讨论。
\backmatter
但是,在看过最后一章之后,我仍然会得到每个章节类单元(参考书目、作者索引、主题索引)的虚假章节注释页面。我该如何隐藏这些内容?
我承认我不完全理解这个解决方案的逻辑,但对我当前问题的回答与以下行有关\pretocmd{\backmatter}{\printnotes*}{}{}%
endnotes.tex
% Change footnotes to endnotes
% https://tex.stackexchange.com/questions/56145/is-there-a-way-to-move-all-footnotes-to-the-end-of-the-document
% https://tex.stackexchange.com/questions/399527/change-footnotes-to-endnotes-but-allow-some-old-footnotes
\usepackage{pagenote}
\let\oldfootnote\footnote
\renewcommand{\FN}[1]{\oldfootnote{#1}}
\renewcommand{\thefootnote}{\alph{footnote}}
\makepagenote
\let\footnote\pagenote
% For endnotes at end of each chapter or at the very end of mainmatter
% https://tex.stackexchange.com/questions/83815/how-to-renew-chapter-command-to-include-endnotes-i-e-printnotes
\usepackage{etoolbox}
\newtoggle{chapternotes}
\toggletrue{chapternotes}
%\togglefalse{chapternotes}
\iftoggle{chapternotes}{%
% using chapternotes
\renewcommand{\notedivision}{\section*{\notesname\ to Chapter~\thechapter}}%
\renewcommand{\pagenotesubhead}[2]{}%
% \pretocmd{\chapter}{\printnotes*}{}{}%
\pretocmd{\chapter}{%
\ifnum\value{chapter}>0\relax\printnotes*\fi%
}{}{}
\pretocmd{\mainmatter}{\printnotes*}{}{}% Notes in Preface
\pretocmd{\backmatter}{\printnotes*}{}{}%
}{%
% using notes at end of book
\renewcommand{\notedivision}{\chapter*{\notesname}}
}