diff options
author | Norbert Preining <norbert@preining.info> | 2022-04-05 03:01:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-04-05 03:01:24 +0000 |
commit | a4e931576165d0a4a143915f4725399272e06fee (patch) | |
tree | ef5b6d71c2223b9f58e61fbb25423d4042430198 /support/TeX4ht/source/tex4ht-sty.tex | |
parent | 7548e4d37c2aaefd32fe0a9bcd83f8e71326dde1 (diff) |
CTAN sync 202204050301
Diffstat (limited to 'support/TeX4ht/source/tex4ht-sty.tex')
-rw-r--r-- | support/TeX4ht/source/tex4ht-sty.tex | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/support/TeX4ht/source/tex4ht-sty.tex b/support/TeX4ht/source/tex4ht-sty.tex index 6a5c7ed0e1..7bf410fe7a 100644 --- a/support/TeX4ht/source/tex4ht-sty.tex +++ b/support/TeX4ht/source/tex4ht-sty.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-sty.tex 981 2021-09-14 20:14:03Z michal_h21 $ +% $Id: tex4ht-sty.tex 1104 2022-03-30 12:06:52Z michal_h21 $ % tex tex4ht-sty or ht tex tex4ht-sty % % Copyright 2009-2020 TeX Users Group @@ -9082,18 +9082,25 @@ and \`'\Configure{SUP}{ before }{ after }' get into effect. \<defs for early latex subs/sups\><<< \append:def\:RestoreCatcodes{\early:sub\early:sup} \let\:IfFileExists\IfFileExists -\long\def\IfFileExists#1#2#3{% - \csname recall:sub\endcsname - \csname recall:sup\endcsname - \expandafter\let\csname #1:sub\endcsname=\early:sub - \expandafter\let\csname #1:sup\endcsname=\early:sup - \let\early:sub=\relax \let\recall:sub\relax - \let\early:sup=\relax \let\recall:sup\relax - \:IfFileExists{#1}{#2}{#3}% - \expandafter\let\expandafter\early:sub\csname #1:sub\endcsname - \expandafter\let\expandafter\early:sup\csname #1:sup\endcsname - \early:sub \early:sup -} + +% I am not sure why we used this declaration. It is from the original +% TeX4ht sources, so it probably had some reason. The problem is that it +% inserts extra tokens after \:IfFileExists, and if some package uses +% something like \IfFileExists{foo.sty}{\@firstoftwo}{\@secondoftwo}{aa}{bb}, +% then it fails. I've found this issue with the Standalone class. +% See https://tex.stackexchange.com/a/638965/2891 for example where it fails. +% \long\def\IfFileExists#1#2#3{% +% \csname recall:sub\endcsname +% \csname recall:sup\endcsname +% \expandafter\let\csname #1:sub\endcsname=\early:sub +% \expandafter\let\csname #1:sup\endcsname=\early:sup +% \let\early:sub=\relax \let\recall:sub\relax +% \let\early:sup=\relax \let\recall:sup\relax +% \:IfFileExists{#1}{#2}{#3}% +% \expandafter\let\expandafter\early:sub\csname #1:sub\endcsname +% \expandafter\let\expandafter\early:sup\csname #1:sup\endcsname +% \early:sub \early:sup +% } \ifx \o:document\:UnDef \pend:def\Preamble{% \csname recall:sub\endcsname |