[latex3-commits] [git/LaTeX3-latex3-hyperref] detecthint: add drivertest (f79d36e)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Apr 13 20:46:01 CEST 2023


Repository : https://github.com/latex3/hyperref
On branch  : detecthint
Link       : https://github.com/latex3/hyperref/commit/f79d36e0b90e2597cc8a05d7f8e82677c7adc180

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

commit f79d36e0b90e2597cc8a05d7f8e82677c7adc180
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Apr 13 20:46:01 2023 +0200

    add drivertest


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

f79d36e0b90e2597cc8a05d7f8e82677c7adc180
 hyperref.dtx | 64 ++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 49 insertions(+), 15 deletions(-)

diff --git a/hyperref.dtx b/hyperref.dtx
index 73daa67..832099b 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -52,7 +52,7 @@
 %<puvnenc>\ProvidesFile{puvnenc.def}
 %<puarenc>\ProvidesFile{puarenc.def}
 %<psdextra>\ProvidesFile{psdextra.def}
-%<!none&!packageEnd>  [2023-02-07 v7.00v %
+%<!none&!packageEnd>  [2023-04-07 v7.00w %
 %<package>  Hypertext links for LaTeX]
 %<nohyperref>  Dummy hyperref (SR)]
 %<driver>  Hyperref documentation driver file]
@@ -5116,6 +5116,21 @@
    A current html.sty will do all necessary (re)definitions%
   }%
 }
+\DeclareVoidOption{hitex}{%
+  \ifhint
+   \IfFileExists{hhitex.def}
+     {\def\Hy at driver{hhitex}}%
+     {\Hy at Warning{%
+      Missing driver file `hhitex.def',\MessageBreak
+      ignoring hitex driver%
+     }}% 
+  \else
+    \Hy at Error{%
+      Wrong driver option `hitex',\MessageBreak
+      because HiTeX is not detected%
+    }\@ehc
+  \fi
+}
 %    \end{macrocode}
 % No more special treatment for ps2pdf. Let it sink or swim.
 %    \begin{macrocode}
@@ -7050,6 +7065,21 @@
     \fi
   \fi
   \ifx\Hy at driver\@empty
+  \else
+   \def\Hy at temp{hhitex}%
+   \ifhint    
+     \ifx\Hy at driver\Hy at temp
+     \else
+        \Hy at WarningNoLine{%
+          Wrong driver `\Hy at driver.def';\MessageBreak
+          hitex is running.\MessageBreak
+          Forcing driver `\Hy at temp.def'%
+        }%
+        \let\Hy at driver\Hy at temp
+     \fi        
+    \fi 
+  \fi    
+  \ifx\Hy at driver\@empty
   \else
     \def\Hy at temp{hvtexhtm}%
     \ifnum\ifvtex\OpMode\else\m at ne\fi=10 %
@@ -7103,27 +7133,31 @@
               \endinput
             }%
           \else
-            \ifnum\ifvtex\OpMode\else\m at ne\fi=\@ne
-              \def\Hy at driver{hvtex}%
+            \ifhint
+              \def\Hy at driver{hhitex}
             \else
-              \ifnum\ifvtex\OpMode\else\m at ne\fi=\tw@
+              \ifnum\ifvtex\OpMode\else\m at ne\fi=\@ne
                 \def\Hy at driver{hvtex}%
               \else
-                \ifx\HyOpt at DriverFallback\ltx at empty
-                  \let\Hy at driver\Hy at defaultdriver
-                  \def\HyOpt at DriverType{ (default)}%
+                \ifnum\ifvtex\OpMode\else\m at ne\fi=\tw@
+                  \def\Hy at driver{hvtex}%
                 \else
-                  \begingroup
-                    \toks@\expandafter{\HyOpt at DriverFallback}%
-                    \edef\x{\endgroup
-                      \noexpand\kvsetkeys{Hyp}{\the\toks@}%
-                    }%
-                  \x
-                  \ifx\Hy at driver\ltx at empty
+                  \ifx\HyOpt at DriverFallback\ltx at empty
                     \let\Hy at driver\Hy at defaultdriver
                     \def\HyOpt at DriverType{ (default)}%
                   \else
-                    \def\HyOpt at DriverType{ (fallback)}%
+                    \begingroup
+                      \toks@\expandafter{\HyOpt at DriverFallback}%
+                      \edef\x{\endgroup
+                        \noexpand\kvsetkeys{Hyp}{\the\toks@}%
+                      }%
+                    \x
+                    \ifx\Hy at driver\ltx at empty
+                      \let\Hy at driver\Hy at defaultdriver
+                      \def\HyOpt at DriverType{ (default)}%
+                    \else
+                      \def\HyOpt at DriverType{ (fallback)}%
+                    \fi
                   \fi
                 \fi
               \fi





More information about the latex3-commits mailing list.