diff options
author | Norbert Preining <norbert@preining.info> | 2022-07-02 03:03:53 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-07-02 03:03:53 +0000 |
commit | cd3bef34bd0bfcf1625056fd2f2832328c516179 (patch) | |
tree | c7337e2acdc9c8e9f18518ee8cf09a985a9d94c8 /support/TeX4ht | |
parent | 360c779f505ae5d8baf567f534861a7a9c7afcb2 (diff) |
CTAN sync 202207020303
Diffstat (limited to 'support/TeX4ht')
-rw-r--r-- | support/TeX4ht/source/ChangeLog | 6 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 36 |
2 files changed, 37 insertions, 5 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 5190ec8992..7f361c46d9 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,9 @@ +2022-07-01 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (hyperref.4ht): fixed handling of undefined + references in the \hyperref command. + https://tex.stackexchange.com/a/649552/2891 + 2022-06-30 Michal Hoftich <michal.h21@gmail.com> * tex4ht-mathml.tex (mathml.4ht): retain text formatting inside diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index f99c6fbd42..bd8a32515b 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1161 2022-06-27 10:03:53Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1164 2022-07-01 14:16:09Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -5321,16 +5321,42 @@ which requires 5 fields instead of 2. % \Configure{ref}{}{}{}\ref{#1}}} \<config hyperref\><<< -\def\label@hyperref[#1]#2{{% - \def\hyperrefLabel{#2}% - \Configure{ref} - {\Link}{\EndLink}{\Configure{ref}{}{}{}#2}\ref{#1}}} +|<label@@hyperref|> |<autoref references|> |<restore pre hyperref|> |<nameref.sty NOT HERE|> \csname ReadBookmarks\endcsname >>> +% We don't use this code anymore +% \def\label@hyperref[#1]#2{{% +% \def\hyperrefLabel{#2}% +% \Configure{ref} +% {\Link}{\EndLink}{\Configure{ref}{}{}{}#2}\ref{#1}}} + +The \Verb+\hyperref[label]{title}+ command should print the +title when label is undefined. The older configuration printed +?? instead. This should fix this issue. +\Link{https://tex.stackexchange.com/a/649552/2891}{}More info\EndLink. + +\<label@@hyperref\><<< +\def\label@@hyperref#1#2#3{% + \ifx#1\relax + \protect\G@refundefinedtrue + \@latex@warning{% + Hyper reference `#2' on page \thepage \space undefined% + }% + \begingroup + \hyperrefundefinedlink{#3}% + \endgroup + \else% + \def\hyperrefLabel{#3}% + \Configure{ref}% + {\Link}{\EndLink}{\Configure{ref}{}{}{}#3}\ref{#2}% + \fi +} +>>> + A \Verb+\def\@@hyperref#1#2#3{\Link[#2]{}{}#1\EndLink}+ got removed since it fails the second case below. |