我的文档中的尾注没有链接。
- 我如何链接
endnotes
并返回到原始页面? - 如何将没有垂直空格的标题设置
theendnotes
为零?
梅威瑟:
\documentclass[]{scrartcl}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{2}
\usepackage[english]{babel}
\usepackage{endnotes}
\let\endnote=\endnote{}
\def\enotesize{\footnotesize}
\counterwithin*{endnote}{section}
\renewcommand{\notesname}{}
\usepackage{blindtext}
\usepackage[]{hyperref}
\begin{document}
\tableofcontents
\section{This is the first Article 1}
\textbf{Hello all!} In this collection of different articles I need to put the footnotes to the end of each article. But these footnotes are not linked, and I would like to have also the backreference to the page of origine. Is this possible? Supplemental question: How to avoid the ``Title'' of endnotes and the resulting space, setting it to none with
\verb!\renewcommand{\notesname}{}! \endnote{comp. \url{https://tex.stackexchange.com/questions/238403/change-the-heading-for-endnotes}}
While editing this posting, I discovered the package \verb!endnotes-hy! Perhaps the solution? \endnote{comp. /usr/local/texlive/2022/texmf-dist/tex/latex/endnotes-hy/endnotes-hy.sty}
\blindtext\endnote{third footnote}
\subsection{First Subsection 1.1}
\blindtext\endnote{fourth footnote}
\blindtext\endnote{fifth footnote}
\subsection{Second Subsection 1.2}
\blindtext\endnote{sixth footnote}
\blindtext\endnote{seventh footnote}
\subsubsection{Here a Subsubsection 1.2.1}
\blindtext\endnote{eighth footnote}
\blindtext\endnote{ninth footnote}
\subsection{Annotations}
\begingroup
\parindent 0pt
\parskip 0pt
\theendnotes
\endgroup
\section{This is the second Article 2}
\blindtext\endnote{first footnote}
\blindtext\endnote{second footnote}
\subsection{Annotations}
\begingroup
\parindent 0pt
\parskip 0pt
\theendnotes
\endgroup
\end{document}
答案1
使用该endnotes
包,您可以使用endnotes-hy
获取以下超链接标记从标记到文本的注释,但没有反向链接。
使用endnotes
+后endnotes-hy
,文档看起来应如下所示:
\documentclass{article}
\usepackage{endnotes}
\usepackage{endnotes-hy}
\usepackage{hyperref}
% You can remove the heading with:
\renewcommand{\enoteheading}{}
\begin{document}
\endnote{Foo.}\label{en:1}
% Non-labeled notes are not linked.
\endnote{Bar.}
\clearpage{}
% And there are no backlinks.
\theendnotes
\end{document}
但是,由于您也需要反向链接,因此提供此功能的唯一软件包是enotez
和postnotes
。enotez
您可以按如下方式进行设置:
\documentclass{scrartcl}
\usepackage[english]{babel}
\usepackage{enotez}
% Enabling backlinks.
\setenotez{backref}
% You could remove the notes heading with:
% \DeclareInstance{enotez-list}{plain}{paragraph}{heading=}
% But I think you'd do better by letting the package do its job for you:
\DeclareInstance{enotez-list}{plain}{paragraph}{
heading=\subsection{Annotations}}
\counterwithin*{endnote}{section}
\usepackage{blindtext}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\section{This is the first Article 1}
\blindtext\endnote{first footnote}
\blindtext\endnote{second footnote}
\blindtext\endnote{third footnote}
\subsection{First Subsection 1.1}
\blindtext\endnote{fourth footnote}
\blindtext\endnote{fifth footnote}
\subsection{Second Subsection 1.2}
\blindtext\endnote{sixth footnote}
\blindtext\endnote{seventh footnote}
\subsubsection{Here a Subsubsection 1.2.1}
\blindtext\endnote{eighth footnote}
\blindtext\endnote{ninth footnote}
\printendnotes
\section{This is the second Article 2}
\blindtext\endnote{first footnote}
\blindtext\endnote{second footnote}
\printendnotes
\end{document}
与postnotes
:
\documentclass{scrartcl}
\usepackage[english]{babel}
\usepackage{postnotes}
% You could remove the notes heading with:
% \postnotesetup{heading=}
% But I think you'd do better by letting the package do its job for you:
\postnotesetup{heading=\subsection{Annotations}}
\counterwithin*{postnote}{section}
\usepackage{blindtext}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\section{This is the first Article 1}
\blindtext\postnote{first footnote}
\blindtext\postnote{second footnote}
\blindtext\postnote{third footnote}
\subsection{First Subsection 1.1}
\blindtext\postnote{fourth footnote}
\blindtext\postnote{fifth footnote}
\subsection{Second Subsection 1.2}
\blindtext\postnote{sixth footnote}
\blindtext\postnote{seventh footnote}
\subsubsection{Here a Subsubsection 1.2.1}
\blindtext\postnote{eighth footnote}
\blindtext\postnote{ninth footnote}
\printpostnotes
\section{This is the second Article 2}
\blindtext\postnote{first footnote}
\blindtext\postnote{second footnote}
\printpostnotes
\end{document}