summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-4ht.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-4ht.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex91
1 files changed, 88 insertions, 3 deletions
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
\<fix xr-hyper\><<<
-\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.
\<wait with xr-hyper\><<<
\: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\><<<
+% breqn.4ht (|version), generated from |jobname.tex
+% Copyright 2021 TeX Users Group
+|<TeX4ht copywrite|>
+|<breqn environments|>
+|<breqn commands|>
+\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.
+
+\<breqn environments\><<<
+\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}%
+}
+>>>
+
+\<breqn commands\><<<
+%% 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}
+%%%%%%%%%%%%%%%%%%%%%%%
\<nicefrac.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%