[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: assume pdftex newer than 1.10 (87af49f)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Feb 21 16:03:08 CET 2022
Repository : https://github.com/latex3/hyperref
On branch : cleanup-patches
Link : https://github.com/latex3/hyperref/commit/87af49fe9c475cb3cb9000ca5aeaa31aaae8fa6f
>---------------------------------------------------------------
commit 87af49fe9c475cb3cb9000ca5aeaa31aaae8fa6f
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Feb 21 16:03:08 2022 +0100
assume pdftex newer than 1.10
>---------------------------------------------------------------
87af49fe9c475cb3cb9000ca5aeaa31aaae8fa6f
hyperref.dtx | 173 +++++++++++++++++++++++++++--------------------------------
1 file changed, 79 insertions(+), 94 deletions(-)
diff --git a/hyperref.dtx b/hyperref.dtx
index 8eee052..2aea661 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -12892,111 +12892,96 @@
% \item pdf\TeX\ 1.30, 2005-08-081: \cs{pdfminorversion}
% \end{itemize}
% \begin{macrocode}
-\let\Hy at pdfminorversion\relax
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdfminorversion\endcsname\relax
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname pdfoptionpdfminorversion\endcsname\relax
- \else
- \def\Hy at pdfminorversion{\pdfoptionpdfminorversion}%
+\def\Hy at pdfminorversion{\pdfoptionpdfminorversion}%
+\def\Hy at pdfminorversion{\pdfminorversion}%
+\ifHy at ocgcolorlinks
+ \ifnum\Hy at pdfmajorminor@version<105 %
+ \kvsetkeys{Hyp}{pdfversion=1.5}%
\fi
-\else
- \def\Hy at pdfminorversion{\pdfminorversion}%
\fi
-\@ifundefined{Hy at pdfminorversion}{%
- \PackageInfo{hyperref}{%
- PDF version is not set, because pdfTeX is too old (<1.10a)%
- }%
-}{%
- \ifHy at ocgcolorlinks
- \ifnum\Hy at pdfmajorminor@version<105 %
- \kvsetkeys{Hyp}{pdfversion=1.5}%
- \fi
+\ifHy at setpdfversion
+ \ifnum\Hy at pdf@majorminor at version<105 %
+ \ltx at IfUndefined{pdfobjcompresslevel}{%
+ }{%
+ \ifHy at verbose
+ \Hy at InfoNoLine{%
+ PDF object streams are disabled, because they are%
+ \MessageBreak
+ not supported in requested PDF version %
+ \Hy at pdf@majorversion.\Hy at pdf@minorversion
+ }%
+ \fi
+ \pdfobjcompresslevel=\ltx at zero
+ }%
\fi
- \ifHy at setpdfversion
- \ifnum\Hy at pdf@majorminor at version<105 %
- \ltx at IfUndefined{pdfobjcompresslevel}{%
- }{%
- \ifHy at verbose
- \Hy at InfoNoLine{%
- PDF object streams are disabled, because they are%
+ \ifnum\Hy at pdfmajorminor@version=\Hy at pdf@majorminor at version\relax
+ \else
+ \let\Hy at temp\ltx at empty
+ \def\Hy at temp@A#1#2{%
+ \ifnum#1>\ltx at zero
+ \edef\Hy at temp{%
+ \Hy at temp
+ \space\space
+ \the#1\space #2%
+ \ifnum#1=\ltx at one\else s\fi
+ \MessageBreak
+ }%
+ \fi
+ }%
+ \Hy at temp@A\pdflastobj{PDF object}%
+ \Hy at temp@A\pdflastxform{form XObject}%
+ \Hy at temp@A\pdflastximage{image XObject}%
+ \Hy at temp@A\pdflastannot{annotation}%
+ \ltx at IfUndefined{pdflastlink}{%
+ }{%
+ \Hy at temp@A\pdflastlink{link}%
+ }%
+ \ifx\Hy at temp\ltx at empty
+ \Hy at pdfmajorversion=\Hy at pdf@majorversion\relax
+ \Hy at pdfminorversion=\Hy at pdf@minorversion\relax
+ \else
+ \let\Hy at temp@A\ltx at empty
+ \ifnum\Hy at pdf@majorminor at version=104 %
+ \IfFileExists{pdf14.sty}{%
+ \def\Hy at temp@A{%
\MessageBreak
- not supported in requested PDF version %
- \Hy at pdf@majorversion.\Hy at pdf@minorversion
+ Or \string\RequirePackage{pdf14} can be used%
+ \MessageBreak
+ before \string\documentclass\space as shortcut%
}%
- \fi
- \pdfobjcompresslevel=\ltx at zero
- }%
- \fi
- \ifnum\Hy at pdfmajorminor@version=\Hy at pdf@majorminor at version\relax
- \else
- \let\Hy at temp\ltx at empty
- \def\Hy at temp@A#1#2{%
- \ifnum#1>\ltx at zero
- \edef\Hy at temp{%
- \Hy at temp
- \space\space
- \the#1\space #2%
- \ifnum#1=\ltx at one\else s\fi
+ }{}%
+ \fi
+ \Hy at WarningNoLine{%
+ The PDF version number could not be set,\MessageBreak
+ because some PDF objects are already written:%
+ \MessageBreak
+ \Hy at temp
+ The version should be set as early as possible:%
+ \MessageBreak
+ \space\space
+ \expandafter\string\Hy at pdfmajorversion=\Hy at pdf@majorversion, %
+ \expandafter\string\Hy at pdfminorversion=\Hy at pdf@minorversion
+ \string\relax
+ \ifnum\Hy at pdf@majorminor at version<105 %
+ \ltx at ifundefined{pdfobjcompresslevel}{%
+ }{%
\MessageBreak
+ \space\space
+ \string\pdfobjcompresslevel=0\string\relax
}%
\fi
+ \Hy at temp@A
}%
- \Hy at temp@A\pdflastobj{PDF object}%
- \Hy at temp@A\pdflastxform{form XObject}%
- \Hy at temp@A\pdflastximage{image XObject}%
- \Hy at temp@A\pdflastannot{annotation}%
- \ltx at IfUndefined{pdflastlink}{%
- }{%
- \Hy at temp@A\pdflastlink{link}%
- }%
- \ifx\Hy at temp\ltx at empty
- \Hy at pdfmajorversion=\Hy at pdf@majorversion\relax
- \Hy at pdfminorversion=\Hy at pdf@minorversion\relax
- \else
- \let\Hy at temp@A\ltx at empty
- \ifnum\Hy at pdf@majorminor at version=104 %
- \IfFileExists{pdf14.sty}{%
- \def\Hy at temp@A{%
- \MessageBreak
- Or \string\RequirePackage{pdf14} can be used%
- \MessageBreak
- before \string\documentclass\space as shortcut%
- }%
- }{}%
- \fi
- \Hy at WarningNoLine{%
- The PDF version number could not be set,\MessageBreak
- because some PDF objects are already written:%
- \MessageBreak
- \Hy at temp
- The version should be set as early as possible:%
- \MessageBreak
- \space\space
- \expandafter\string\Hy at pdfmajorversion=\Hy at pdf@majorversion, %
- \expandafter\string\Hy at pdfminorversion=\Hy at pdf@minorversion
- \string\relax
- \ifnum\Hy at pdf@majorminor at version<105 %
- \ltx at ifundefined{pdfobjcompresslevel}{%
- }{%
- \MessageBreak
- \space\space
- \string\pdfobjcompresslevel=0\string\relax
- }%
- \fi
- \Hy at temp@A
- }%
- \fi
\fi
- \PackageInfo{hyperref}{%
- \expandafter\string\Hy at pdfmajorversion.%
- \expandafter\string\Hy at pdfminorversion
- :=\number\Hy at pdf@majorversion.\number\Hy at pdf@minorversion\space
- }%
\fi
- \edef\Hy at pdf@majorversion{\number\Hy at pdfmajorversion}%
- \edef\Hy at pdf@minorversion{\number\Hy at pdfminorversion}%
-}
+ \PackageInfo{hyperref}{%
+ \expandafter\string\Hy at pdfmajorversion.%
+ \expandafter\string\Hy at pdfminorversion
+ :=\number\Hy at pdf@majorversion.\number\Hy at pdf@minorversion\space
+ }%
+\fi
+\edef\Hy at pdf@majorversion{\number\Hy at pdfmajorversion}%
+\edef\Hy at pdf@minorversion{\number\Hy at pdfminorversion}%
\Hy at DisableOption{pdfversion}%
% \end{macrocode}
%
More information about the latex3-commits
mailing list.