[tex4ht-commits] [SCM] tex4ht updated: r1116 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Mon Apr 25 10:10:08 CEST 2022


Author: michal_h21
Date: 2022-04-25 08:10:08 +0000 (Mon, 25 Apr 2022)
New Revision: 1116

Modified:
   trunk/lit/ChangeLog
   trunk/lit/mktex4ht-cnf.tex
   trunk/lit/tex4ht-4ht.tex
Log:
Added support for the breqn package

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-04-24 18:59:13 UTC (rev 1115)
+++ trunk/lit/ChangeLog	2022-04-25 08:10:08 UTC (rev 1116)
@@ -1,3 +1,8 @@
+2022-04-25  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* 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 at gmail.com>
 
 	* tex4ht-4ht.tex (latex.4ht): fixed spurious space inserted after

Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex	2022-04-24 18:59:13 UTC (rev 1115)
+++ trunk/lit/mktex4ht-cnf.tex	2022-04-25 08:10:08 UTC (rev 1116)
@@ -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}

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2022-04-24 18:59:13 UTC (rev 1115)
+++ trunk/lit/tex4ht-4ht.tex	2022-04-25 08:10:08 UTC (rev 1116)
@@ -32405,7 +32405,85 @@
 }
 >>>\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 at hasNumber%
+    \refstepcounter{equation}%
+  \fi
+  \begingroup%
+   \a:equation%
+   \ignorespaces%
+}
+
+
+% mimic the equatio environment
+\def\end at dseries{%
+  \b:equation 
+  \if\eq at hasNumber%
+  (\arabic{equation})%
+  \fi%
+\c:equation%
+}
+
+% this macro prints spurious equation number to the document, so we just reset it
+\def\grp at finish{%
+  \setbox\GRP at wholebox\vbox{%
+    \let\breqn at elt\eqgrp at elt
+    \the\GRP at queue
+  }%
+  \unvbox\GRP at wholebox
+}
+
+% the \EQ at displayinfo is used by other commands, it isn't useful in the HTML conversion
+\def\eq at nulldisplay{%
+  \xdef\EQ at displayinfo{%
+    \relax}%
+}
+>>>
+
+\<breqn commands\><<<
+%% commands 
+% fix wrong handling of fonts in \condition
+\newcommand\:condition at a[2][\conditionpunct]{%
+  \unpenalty\unskip\unpenalty\unskip % BRM Added
+  \mbox{#1}%
+  \hskip\conditionsep
+  \ \if at tempswa\mbox{#2}\else\mbox{$\textmath at setup #2$}\fi
+  \endgroup
+}
+
+\HLet\condition at a\:condition at a
+
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%%
 \Section{nicefrac.sty}
+%%%%%%%%%%%%%%%%%%%%%%%
 
 \<nicefrac.4ht\><<<
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  



More information about the tex4ht-commits mailing list.