From 6f7554fc6cab67e3dc397ce7a942889eedbc4967 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 26 Apr 2022 03:02:04 +0000 Subject: CTAN sync 202204260302 --- support/TeX4ht/source/ChangeLog | 9 ++++ support/TeX4ht/source/mktex4ht-cnf.tex | 3 +- support/TeX4ht/source/tex4ht-4ht.tex | 91 ++++++++++++++++++++++++++++++++-- 3 files changed, 99 insertions(+), 4 deletions(-) (limited to 'support/TeX4ht') diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 7b7268dd0a..578132db29 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,12 @@ +2022-04-25 Michal Hoftich + + * tex4ht-4ht.tex (xr-hyper.4ht, + xrhyper-hooks.4ht): added support for external documents in + subdirectories. + https://puszcza.gnu.org.ua/bugs/?560 + * tex4ht-4ht.tex (breqn.4ht): added support for the Breqn package. + https://tex.stackexchange.com/a/641918/2891 + 2022-04-24 Michal Hoftich * tex4ht-4ht.tex (latex.4ht): fixed spurious space inserted after diff --git a/support/TeX4ht/source/mktex4ht-cnf.tex b/support/TeX4ht/source/mktex4ht-cnf.tex index 5a1bcfbba6..484ec3721e 100644 --- a/support/TeX4ht/source/mktex4ht-cnf.tex +++ b/support/TeX4ht/source/mktex4ht-cnf.tex @@ -1,4 +1,4 @@ -% $Id: mktex4ht-cnf.tex 1103 2022-03-29 15:46:43Z michal_h21 $ +% $Id: mktex4ht-cnf.tex 1116 2022-04-25 08:10:08Z michal_h21 $ % Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex. % Read by tex4ht-cond4ht. % @@ -292,6 +292,7 @@ \AddFile{9}{web} \AddFile{9}{exerquiz} \AddFile{9}{hyperxmp} +\AddFile{9}{breqn} \AddFile{9}{nicefrac} \AddFile{9}{multicol} \AddFile{2}{lettrine} diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index a77c0644d3..5e3d3106bd 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1115 2022-04-24 18:59:13Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1117 2022-04-25 13:31:56Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -3889,8 +3889,11 @@ got into the picture? Did \''\aXrefFile' introduced it? where? Hyperref pasess five arguments to \`|\newlabel|, we must adapt \`|\XR:rEfLiNK| to that \<<< -\def\XRrEfLiNK[#1]#2#3{\a:xr[#1]{#2}{}% - \ifx\hyperrefLabel\:UnDef #3\else \hyperrefLabel\fi \b:xr} +\def\XRrEfLiNK[#1]#2#3{% + \filename@parse{#1}% Get basename of the linked html file, + % xr:dir\filename@base contains file's directory + \a:xr[\csname xr:dir:\filename@base\endcsname#1]{#2}{}% + \ifx\hyperrefLabel\:UnDef #3\else \hyperrefLabel\fi \b:xr} \NewConfigure{xr}{2} \Configure{xr}{\Link}{\EndLink} \def\XR:rEfLiNK#1#2#3#4#5{{\xr:rEfLiNK#1}{\xr:rEfLiNK#2}{\xr:rEfLiNK#3}} @@ -3917,6 +3920,10 @@ it, so we can safely eat that. \<<< \:AtEndOfPackage{\let\XR:\XR@ \def\XR@[#1][#2]#3{% + % save directory for the linked file + \filename@parse{#3} + % \filename@base is filename, \filename@area directory + \expandafter\xdef\csname xr:dir:\filename@base\endcsname{\filename@area} \AtBeginDocument{\XR:[#1][#2]{#3}} }% } @@ -32405,7 +32412,85 @@ to prevent execution of the failing code. } >>>\AddFile{9}{datetime2-hooks} +%%%%%%%%%%%%%%%%%%%%%%%%% +\Section{breqn.sty} +%%%%%%%%%%%%%%%%%%%%%%%%% + +\<<< +% breqn.4ht (|version), generated from |jobname.tex +% Copyright 2021 TeX Users Group +| +| +| +\Hinput{breqn} +\endinput + +>>> \AddFile{9}{breqn} + +Breqn defines some environments, but their use ends with +fatal errors with TeX4ht. We redefine them to use standard +LaTeX math environments instead. We will lose some functionality, +but fatal error is a worse possibility. + +\<<< +\renewenvironment{dmath*}[1][]{\[}{\]} +\renewenvironment{dmath}[1][]{\begin{equation}}{\end{equation}} +\renewenvironment{dsuspend}{}{\par} + +% enumerate equation for \begin{dseries} +\def\@dseries[#1]{% + \if\eq@hasNumber% + \refstepcounter{equation}% + \fi + \begingroup% + \a:equation% + \ignorespaces% +} + + +% mimic the equatio environment +\def\end@dseries{% + \b:equation + \if\eq@hasNumber% + (\arabic{equation})% + \fi% +\c:equation% +} + +% this macro prints spurious equation number to the document, so we just reset it +\def\grp@finish{% + \setbox\GRP@wholebox\vbox{% + \let\breqn@elt\eqgrp@elt + \the\GRP@queue + }% + \unvbox\GRP@wholebox +} + +% the \EQ@displayinfo is used by other commands, it isn't useful in the HTML conversion +\def\eq@nulldisplay{% + \xdef\EQ@displayinfo{% + \relax}% +} +>>> + +\<<< +%% commands +% fix wrong handling of fonts in \condition +\newcommand\:condition@a[2][\conditionpunct]{% + \unpenalty\unskip\unpenalty\unskip % BRM Added + \mbox{#1}% + \hskip\conditionsep + \ \if@tempswa\mbox{#2}\else\mbox{$\textmath@setup #2$}\fi + \endgroup +} + +\HLet\condition@a\:condition@a + +>>> + +%%%%%%%%%%%%%%%%%%%%%%% \Section{nicefrac.sty} +%%%%%%%%%%%%%%%%%%%%%%% \<<< %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3