[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: remove non-e-tex version of hypercalcbp (e1af7f0)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon Jul 19 12:59:00 CEST 2021


Repository : https://github.com/latex3/hyperref
On branch  : cleanup-patches
Link       : https://github.com/latex3/hyperref/commit/e1af7f0c00efcd2017c992323b6c40148f928b44

>---------------------------------------------------------------

commit e1af7f0c00efcd2017c992323b6c40148f928b44
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Jul 19 12:59:00 2021 +0200

    remove non-e-tex version of hypercalcbp


>---------------------------------------------------------------

e1af7f0c00efcd2017c992323b6c40148f928b44
 ChangeLog.txt |  3 +++
 hyperref.dtx  | 58 ++++------------------------------------------------------
 2 files changed, 7 insertions(+), 54 deletions(-)

diff --git a/ChangeLog.txt b/ChangeLog.txt
index 4a2cb5e..a391d49 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -6,6 +6,9 @@ XXXX-XX-XX Ulrike Fischer/David Carlisle
     * remove patch for titletoc, is now done by titletoc itself.
     * remove lastpage patch, is no longer used as lastpage supports
     hyperref directly.
+    * remove non-e-tex version of \hypercalcbp, e-tex is require
+    for hyperref now, removed the now unneeded internal command
+    \hypercalcbpdef.
 
 
 2021-06-07 Ulrike Fischer/David Carlisle
diff --git a/hyperref.dtx b/hyperref.dtx
index 27ec3c8..901719b 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -961,73 +961,24 @@
 %    LaTeX expands the options before package hyperref
 %    is loaded and \cmd{\hypercalcbp} is defined.
 %    \item
-%    With e-TeX extensions an expandable implementation
+%    With the now required e-TeX extensions an expandable implementation
 %    is very easy; \cmd{\hypercalcbp} can be used
 %    everywhere and is expanded at use.
-%    \item
-%    Without e-TeX's features \cmd{\hypercalcbp} cannot be
-%    implemented expandable (practically) and have to
-%    be supported by \cmd{\hypercalcbpdef}.
-%    Limitations:
-%      \begin{itemize}
-%      \item Works only in options that use \cmd{\hypercalcbpdef}
-%            (currently only |pdfstartview|).
-%      \item For calculations package |calc| has to be loaded.
-%      \item The expansion of the argument is done at definition time.
-%      \end{itemize}
 %    \end{itemize}
 %    Example (\TeX):
 %\begin{verbatim}
-%\usepackage{calc}
 %\usepackage[...]{hyperref}
 %\hypersetup{
 %  pdfstartview={FitBH \hypercalcbp{\paperheight-\topmargin-1in
-%    -\headheight-\headsep}
+%    -\headheight-\headsep}}
 %}
 %\end{verbatim}
 %    \begin{macro}{\hypercalcbp}
 %    \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname dimexpr\endcsname\relax
-  \def\hypercalcbpdef#1#2{%
-    \begingroup
-      \toks@{}%
-      \HyCal at scan#2\hypercalcbp\@nil
-    \expandafter\endgroup
-    \expandafter\def\expandafter#1\expandafter{\the\toks@}%
-  }%
-  \def\HyCal at scan#1\hypercalcbp#2\@nil{%
-    \toks@\expandafter{\the\toks@ #1}%
-    \ifx\\#2\\%
-    \else
-      \ltx at ReturnAfterFi{%
-        \HyCal at do#2\@nil
-      }%
-    \fi
-  }%
-  \def\HyCal at do#1#2\@nil{%
-    \@ifpackageloaded{calc}{}{%
-      \Hy at Warning{%
-        For calculations \string\hypercalcbp\space needs\MessageBreak
-        package calc or e-TeX%
-      }%
-    }%
-    \setlength{\dimen@}{#1}%
-    \setlength{\dimen@}{0.99626401\dimen@}%
-    \edef\x{%
-      \toks@{%
-        \the\toks@
-        \strip at pt\dimen@
-      }%
-    }\x
-    \HyCal at scan#2\@nil
-  }%
-\else
   \def\hypercalcbp#1{%
     \strip at pt\dimexpr 0.99626401\dimexpr(#1)\relax\relax
   }%
   \def\hypercalcbpdef{\def}%
-\fi
 %    \end{macrocode}
 %    \end{macro}
 %    \end{macro}
@@ -6485,7 +6436,7 @@
   \ifx\\#1\\%
     \let\@pdfstartview\ltx at empty
   \else
-    \hypercalcbpdef\@pdfstartview{/#1}%
+    \def\@pdfstartview{/#1}%
   \fi
 }
 \def\HyPat at NonNegativeReal/{%
@@ -6495,8 +6446,7 @@
   \ifx\\#1\\%
     \def\@pdfremotestartview{/Fit}%
   \else
-    \hypercalcbpdef\@pdfremotestartview{#1}%
-    \edef\@pdfremotestartview{\@pdfremotestartview}%
+    \edef\@pdfremotestartview{#1}%
     \Hy at Match\@pdfremotestartview{}{%
       ^(XYZ(%
             ()| %





More information about the latex3-commits mailing list.