
我正在使用endnotes
套件來創建尾註,並且由於我現有的文本正文已經包含大量腳註,I use \let\footnote=\endnote
因此將腳註轉換為尾註。
\documentclass{article}
\usepackage{endnotes}
\usepackage{hyperref}
\let\footnote=\endnote
\begin{document}
Sample text.\footnote{Sample footnote}.
\theendnotes
\end{document}
但是,雖然原始腳註很好地交叉引用,但轉換並沒有保留這一點。有沒有辦法在保留交叉引用的同時進行轉換?
答案1
為了使用hyperref
尾註,您可以使用enotez
。您所要做的就是加載enotez
而不是endnotes
並使用\printendnotes
而不是\theendnotes
:
\documentclass{article}
\usepackage[backref]{enotez} % <-- instead of \usepackage{endnotes}
\usepackage{hyperref}
\let\footnote=\endnote
\begin{document}
Sample text.\footnote{Sample footnote}.
\printendnotes % <-- instead of \theendnotes
\end{document}
編輯:如果您希望從註釋向後引用文本中的標記,請使用該選項backref
更新:較新版本的enotez
設定有所不同(請參閱評論中的備註)
\documentclass{article}
\usepackage{enotez}
\setenotez{backref=true} % <-- options are set like this nowadays
\usepackage{hyperref}
\let\footnote=\endnote
\begin{document}
Sample text.\footnote{Sample footnote}.
\printendnotes
\end{document}