[latex3-commits] [git/LaTeX3-latex3-hyperref] main: allow suppressing of footnote patches (6dcf329)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sat May 14 09:53:40 CEST 2022
Repository : https://github.com/latex3/hyperref
On branch : main
Link : https://github.com/latex3/hyperref/commit/6dcf3294c2d92daa6d5089ce66cfc60d81aefc27
>---------------------------------------------------------------
commit 6dcf3294c2d92daa6d5089ce66cfc60d81aefc27
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sat May 14 09:53:40 2022 +0200
allow suppressing of footnote patches
>---------------------------------------------------------------
6dcf3294c2d92daa6d5089ce66cfc60d81aefc27
ChangeLog.txt | 2 +-
doc/hyperref-doc.tex | 11 +++++++++++
hyperref.dtx | 5 ++++-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 8f97141..e2d01e4 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -2,7 +2,7 @@
* added new interface for package authors to create targets for internal
links
- * allow to suppress sectioning patches of hyperref
+ * allow to suppress sectioning and footnote patches of hyperref
* removed loading of memhfixc: memoir handles that now by itself.
* removed an old patch for KOMA before 2001
* removed compability code for pdftex 1.14
diff --git a/doc/hyperref-doc.tex b/doc/hyperref-doc.tex
index 5068971..4fb7091 100644
--- a/doc/hyperref-doc.tex
+++ b/doc/hyperref-doc.tex
@@ -490,6 +490,17 @@ so \cs{@currentHref} should get the correct meaning before
to add commands to store the title text in \cs{@currentlabelname}.
Check the \xpackage{nameref} documentation about a way to suppress these patches.
\end{itemize}
+
+\item[footnotes] To enable (partly) the linking of footnotes hyperref redefines or patches various commands, in part package dependant.
+\begin{itemize}
+\item hyperref redefines \cs{@xfootnotenext}, \cs{@xfootnotemark}, \cs{@mpfootnotetext},
+ \cs{@footnotetext}, \cs{@footnotemark}.
+ If \xpackage{tabularx} is loaded it changes \cs{TX at endtabularx}. If \xpackage{longtable} is loaded it changes \cs{LT at p@ftntext}.
+ If \xpackage{fancyvfb} is loaded it redefines \cs{V@@footnotetext}. It also redefines \cs{footref} and \cs{maketitle}.
+
+\item \emph{All} those redefinitions can be suppressed by defining \cs{hyper at nopatch@footnote}. Be aware that this can suppress links but also make unwanted links appear.
+\end{itemize}
+
\end{description}
\section{Package options}
diff --git a/hyperref.dtx b/hyperref.dtx
index e330d5c..6096fad 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -11100,8 +11100,10 @@
% text, separately from whatever labels the text assigns. Too hard
% to keep track of markers otherwise. If the raw forms |\footnotemark|
% and |\footnotetext| are used, force them to use un-hyper original.
-%
+% If |\hyper at nopatch@footnote| is defined we don't patch but assume
+% that addings links to footnotes is handled elsewhere.
% \begin{macrocode}
+\@ifundefined{hyper at nopatch@footnote}{%
\ifHy at hyperfootnotes
\newcounter{Hfootnote}%
\let\H@@footnotetext\@footnotetext
@@ -11356,6 +11358,7 @@
% \end{macrocode}
% \begin{macrocode}
\fi
+}{}
\Hy at DisableOption{hyperfootnotes}
% \end{macrocode}
% \end{macro}
More information about the latex3-commits
mailing list.