[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: remove contentsline (25b3b9e)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Mar 28 22:38:52 CEST 2022
Repository : https://github.com/latex3/hyperref
On branch : cleanup-patches
Link : https://github.com/latex3/hyperref/commit/25b3b9e95975f80be4013004300f9f4f74a31d70
>---------------------------------------------------------------
commit 25b3b9e95975f80be4013004300f9f4f74a31d70
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Mar 28 22:38:52 2022 +0200
remove contentsline
>---------------------------------------------------------------
25b3b9e95975f80be4013004300f9f4f74a31d70
hyperref.dtx | 26 ++++----------------------
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/hyperref.dtx b/hyperref.dtx
index a9ba2ec..c1a0f44 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -9527,6 +9527,8 @@
% Write some stuff into the aux file so if the next run is done
% without hyperref, then |\contentsline| and |\newlabel| are defined
% to cope with the extra arguments.
+% change 2022-03-28: removed the code for contentsline, it is no
+% longer needed as contentsline has now always four arguments.
% \begin{macrocode}
\if at filesw
\ifHy at typexml
@@ -9539,11 +9541,6 @@
\string\AtBeginDocument}^^J%
\string\HyperFirstAtBeginDocument{%
\string\ifx\string\hyper at anchor\string\@undefined^^J%
- \string\global\string\let\string\oldcontentsline\string\contentsline^^J%
- \string\gdef\string\contentsline%
- \string#1\string#2\string#3\string#4{%
- \string\oldcontentsline%
- {\string#1}{\string#2}{\string#3}}^^J%
\string\global\string\let\string\oldnewlabel\string\newlabel^^J%
\string\gdef\string\newlabel\string#1\string#2{%
\string\newlabelxx{\string#1}\string#2}^^J%
@@ -9557,7 +9554,6 @@
% \begin{macrocode}
\string\AtEndDocument{%
\string\ifx\string\hyper at anchor\string\@undefined^^J%
- \string\let\string\contentsline\string\oldcontentsline^^J%
\string\let\string\newlabel\string\oldnewlabel^^J%
\string\fi%
}^^J%
@@ -9582,24 +9578,10 @@
% or an old version of hyperref was used, don't use that TOC at all
% but generate a warning. Not ideal, but better than failing
% with pre-5.0 hyperref TOCs.
+% change 2022-03-28: removed the test for an old toc. contentsline
+% has now always four arguments.
% \begin{macrocode}
\ifx\hyper at last\@undefined
- \def\@starttoc#1{%
- \begingroup
- \makeatletter
- \ltx at ifpackageloaded{parskip}{\parskip\z@}{}%
- \IfFileExists{\jobname.#1}{%
- \Hy at WarningNoLine{%
- old #1 file detected, not used; run LaTeX again%
- }%
- }{}%
- \if at filesw
- \expandafter\newwrite\csname tf@#1\endcsname
- \immediate\openout\csname tf@#1\endcsname \jobname.#1\relax
- \fi
- \@nobreakfalse
- \endgroup
- }%
\def\newlabel#1#2{\@newl at bel r{#1}{#2{}{}{}{}}}%
\fi
}
More information about the latex3-commits
mailing list.