如何在 enotez pkg 中相关部分结束后的同一页上打印尾注

如何在 enotez pkg 中相关部分结束后的同一页上打印尾注

我需要打印使用 enotez 包创建的尾注,但不要将其打印在新页面上,而是打印在打印章节最后一行的同一页面上。(我使用带有重置选项的 enotez 为每个章节创建单独的尾注。)

\documentclass{book}
\usepackage[reset=true]{enotez}
\begin{document}
Near the beginning of his career, Einstein thought that Newtonian mechanics was no longer enough to reconcile the laws of classical mechanics with the laws of the electromagnetic field. This led to the development of his special theory of relativity. He realized, however, that the principle of relativity could also be extended to gravitational fields, and with his subsequent theory of gravitation in 1916, he published a paper on general relativity. He continued to deal with problems of statistical mechanics and quantum theory, which led to his explanations of particle theory and the motion of molecules. He also investigated the thermal properties of light which laid the foundation of the photon theory of light. In 1917, Einstein applied the general theory of relativity to model the 
        large-scale structure of the universe.\endnote{This text is from the wikipedia}
\printendnotes
\end{document}

就像下面的图片一样。

在此处输入图片描述

现在,它不仅会转到新的页面,而且在偶数页上会留下一个空白页,并转到新的奇数页作为注释的开始。

答案1

当您使用具有命令的类时\chapter,默认情况下enotez会将其用作\chapter*列表的标题。您可能已经知道解释新页面的\chapter调用。\clearpage

enotez这在文档的选项部分中有解释:

  • list-heading = {<sectioning command including argument>}

    您可以使用此选项手动设置列表标题命令,例如list-heading = {\chapter{#1}}用于编号标题。默认值取决于您使用的类是否提供\chapter。它要么使用\chapter*,要么使用\section*。您可以看到,您必须使用 来引用实际标题#1

解决方案:

\documentclass{book}
\usepackage{enotez}

\setenotez{
  reset = true ,
  list-heading = \section*{#1}
}

\begin{document}

Near the beginning of his career, Einstein thought that Newtonian mechanics
was no longer enough to reconcile the laws of classical mechanics with the
laws of the electromagnetic field. This led to the development of his special
theory of relativity. He realized, however, that the principle of relativity
could also be extended to gravitational fields, and with his subsequent theory
of gravitation in 1916, he published a paper on general relativity. He
continued to deal with problems of statistical mechanics and quantum theory,
which led to his explanations of particle theory and the motion of
molecules. He also investigated the thermal properties of light which laid the
foundation of the photon theory of light. In 1917, Einstein applied the
general theory of relativity to model the large-scale structure of the
universe.\endnote{This text is from the wikipedia}

\printendnotes

\end{document}

在此处输入图片描述

相关内容