1

I've learned that I can use the NoHyper environment to prevent hyperlinks in the document, e.g.,

\begin{NoHyper}
\begin{itemize*}[label={}]
\item “Neural Named Entity Recognition and Temporal Relation
Extraction”,\footnote{\href{https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.832900}{“Neural Named Entity Recognition and Temporal Relation Extraction”} (Available via ethos.bl.uk.)\label{sa-nner}}
\end{itemize*}
\end{NoHyper}

This makes it so that I get a footnote, without a linked footnote marker. Great! But could I also locally turn hyperref back on inside the footnote, so that the \href is activated? I'm imagining a YesHyper command that would achieve the desired effect, but I don't know how to create it:

MNWE

\documentclass{article}
\usepackage{hyperref}
\usepackage[inline]{enumitem}
\begin{document}
\begin{NoHyper}
\begin{itemize*}[label={}]
\item “Neural Named Entity Recognition and Temporal Relation
Extraction”,\footnote{\begin{YesHyper}\href{https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.832900}{%
“Neural Named Entity Recognition and Temporal Relation Extraction”}\end{YesHyper}
(Available via ethos.bl.uk.)\label{sa-nner}}
\end{itemize*}
\end{NoHyper}
\end{document}
Joe Corneli
  • 4,340
  • BTW, in my actual use case I also turn the text white, so that it doesn't appear on the page at all, but the footnotes still appear below. The same overall effect could be achieved more elegantly with a variation on Supressing the footnote number but having explored the kludge above, I wanted to figure out if it could be completed! – Joe Corneli Oct 05 '22 at 12:47

1 Answers1

3

There is no interface in hyperref to reenable the links. hyperref relies on grouping. You would have to store internal commands and copy them to get this.

With the new pdfmanagement from the pdfmanagement-testphase bundle (which you activate in a current LaTeX with \DocumentMetadata) you can activate and deactivate links with \hypersetup:

\DocumentMetadata{}
\documentclass{article}
\usepackage{hyperref}
\textheight=3cm
\begin{document}
\section{abc}\label{sec}
\begin{itemize}\hypersetup{link=false,url=false}
\item no links: \ref{sec}, \href{https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.832900}{Link}
\item footnote\footnote{\hypersetup{link=true,url=true}%
         \ref{sec}, \href{https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.832900}{Link}}
\end{itemize}
\end{document}

enter image description here

Ulrike Fischer
  • 327,261