summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog9
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex3
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex91
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/breqn.4ht77
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/xr-hyper.4ht13
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/xrhyper-hooks.4ht8
6 files changed, 190 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index 7b7268dd0ac..578132db29e 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,3 +1,12 @@
+2022-04-25 Michal Hoftich <michal.h21@gmail.com>
+
+ * 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 <michal.h21@gmail.com>
* tex4ht-4ht.tex (latex.4ht): fixed spurious space inserted after
diff --git a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
index 5a1bcfbba61..484ec3721ef 100644
--- a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/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/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
index a77c0644d3b..5e3d3106bd5 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/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\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Master/texmf-dist/tex/generic/tex4ht/breqn.4ht b/Master/texmf-dist/tex/generic/tex4ht/breqn.4ht
new file mode 100644
index 00000000000..6bb34515fd4
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex4ht/breqn.4ht
@@ -0,0 +1,77 @@
+% breqn.4ht (2022-04-25-13:36), generated from tex4ht-4ht.tex
+% Copyright 2021 TeX Users Group
+% Copyright 2009-2022 TeX Users Group
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any
+% later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions
+% of LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work
+% is the TeX4ht Project <http://tug.org/tex4ht>.
+%
+% If you modify this program, changing the
+% version identification would be appreciated.
+\immediate\write-1{version 2022-04-25-13:36}
+
+\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
+
+
+\Hinput{breqn}
+\endinput
+
+
diff --git a/Master/texmf-dist/tex/generic/tex4ht/xr-hyper.4ht b/Master/texmf-dist/tex/generic/tex4ht/xr-hyper.4ht
index 9b55d050be6..5563be7ba4d 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/xr-hyper.4ht
+++ b/Master/texmf-dist/tex/generic/tex4ht/xr-hyper.4ht
@@ -1,6 +1,6 @@
-% xr-hyper.4ht (2016-12-21-15:03), generated from tex4ht-4ht.tex
+% xr-hyper.4ht (2022-04-25-13:36), generated from tex4ht-4ht.tex
% Copyright 2003-2009 Eitan M. Gurari
-% Copyright 2009-2016 TeX Users Group
+% Copyright 2009-2022 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -17,7 +17,7 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2016-12-21-15:03}
+\immediate\write-1{version 2022-04-25-13:36}
\let\XR:loop=\XR@loop
\def\XR@loop#1{%
@@ -52,8 +52,11 @@
\ifeof\@inputcheck\expandafter\XR@aux
\else\expandafter\XR@read\fi}
- \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}}
diff --git a/Master/texmf-dist/tex/generic/tex4ht/xrhyper-hooks.4ht b/Master/texmf-dist/tex/generic/tex4ht/xrhyper-hooks.4ht
index 07b0c5a3f9a..a45f83dda3f 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/xrhyper-hooks.4ht
+++ b/Master/texmf-dist/tex/generic/tex4ht/xrhyper-hooks.4ht
@@ -1,4 +1,4 @@
-% xrhyper-hooks.4ht (2020-10-17-13:53), generated from tex4ht-4ht.tex
+% xrhyper-hooks.4ht (2022-04-25-13:36), generated from tex4ht-4ht.tex
% Copyright 2020 TeX Users Group
%
% This work may be distributed and/or modified under the
@@ -16,10 +16,14 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2020-10-17-13:53}
+\immediate\write-1{version 2022-04-25-13:36}
\: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}}
}%
}