尾注未链接

尾注未链接

我的文档中的尾注没有链接。

  1. 我如何链接endnotes并返回到原始页面?
  2. 如何将没有垂直空格的标题设置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}

但是,由于您也需要反向链接,因此提供此功能的唯一软件包是enotezpostnotesenotez您可以按如下方式进行设置:

\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}

相关内容