[tex4ht-commits] [SCM] tex4ht updated: r1717 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Wed Jul 9 22:02:50 CEST 2025
Author: michal_h21
Date: 2025-07-09 20:02:50 +0000 (Wed, 09 Jul 2025)
New Revision: 1717
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-jats.tex
trunk/lit/tex4ht-options.tex
Log:
fixed support for tables and equations in jats
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2025-07-06 20:00:56 UTC (rev 1716)
+++ trunk/lit/ChangeLog 2025-07-09 20:02:50 UTC (rev 1717)
@@ -1,3 +1,11 @@
+2025-07-09 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-jats.tex (jats.4ht, jats-mml.4ht): fixed suport for
+ table*, tabular, eqution and equation* environments.
+
+ * tex4ht-options.tex (tex4ht.4ht): use jats-mml.4ht with the jats
+ option.
+
2025-07-06 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-html5.tex (html5.4ht): we need to put the bibliography
Modified: trunk/lit/tex4ht-jats.tex
===================================================================
--- trunk/lit/tex4ht-jats.tex 2025-07-06 20:00:56 UTC (rev 1716)
+++ trunk/lit/tex4ht-jats.tex 2025-07-09 20:02:50 UTC (rev 1717)
@@ -10,7 +10,7 @@
%%%%%%%%%%%%%%%%%% load style files %%%%%%%%%%%%%%%%%%%%%%%%%%
\ifx \HTML\UnDef
- \def\HTML{jats}
+ \def\HTML{jats,jats-mml}
\def\CONFIG{\jobname}
\def\MAKETITLE{\author{Eitan M. Gurari}}
\def\next{\input mktex4ht.4ht \endinput}
@@ -26,10 +26,16 @@
\<jats\><<<
% jats.4ht (|version), generated from |jobname.tex
-% Copyright 2022-2024 TeX Users Group
+% Copyright 2022-2025 TeX Users Group
|<TeX4ht copywrite|>
>>>
+\<jats-mml\><<<
+% jats-mml.4ht (|version), generated from |jobname.tex
+% Copyright 2025 TeX Users Group
+|<TeX4ht copywrite|>
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Basic information}
@@ -212,7 +218,18 @@
|<latex chapters|>
>>>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\chapter{Utilities}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\<inline end-par comment\><<<
+\ifvmode\else \HCode{<!--tex4ht:inline-->}\fi
+>>>
+
+\<try inline par\><<<
+\ShowPar\par{\HCondtrue\noindent}%
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Basic system configurations}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -454,6 +471,72 @@
>>>
+\section{Equations}
+Some basic configuration for equations. It is based on html-mml, but with JATS tags
+
+\<configure jats-mml latex\><<<
+\Configure{equation}
+ {\IgnorePar|<inline end-par comment|>\EndP
+ \HCode{<disp-formula>}\IgnorePar
+ |<math display in equation|>%
+ |<ignore dvimathml in equation|>%
+ }
+ {\ifvmode \IgnorePar\fi\EndP\HCode{<label>}}
+ {\HCode{</label></disp-formula>}|<try inline par|>}
+
+>>>
+
+\<configure jats-mml amsmath\><<<
+
+\Configure{equation}
+ {\ifvmode \IgnorePar\fi\EndP
+ \HCode{<disp-formula>}%
+ |<amsmath equation july 2000|>%
+ |<math display in equation|>%
+ |<ignore dvimathml in equation|>%
+ }
+ {\ifvmode \IgnorePar\fi\EndP
+ \HCode{<label>}%
+ }
+ {\ifvmode \IgnorePar\fi\EndP \HCode{</label></disp-formula>}%
+ \par\ShowPar\noindent}
+\Configure{equation*}
+ {\ifvmode \IgnorePar\fi\EndP
+ \HCode{<disp-formula>}%
+ |<amsmath equation july 2000|>%
+ |<math display in equation|>%
+ |<ignore dvimathml in equation|>%
+ }
+ {\ifvmode \IgnorePar\fi\EndP \HCode{</disp-formula>}%
+ \ShowPar\IgnoreIndent\par}
+>>>
+
+\<math display in equation\><<<
+\Configure{$$}
+ {\Configure{@math}{|<block display|>%
+ \mml:class="equation"}\IgnorePar\EndP\DviMath}
+ {\EndDviMath\EndP}
+ {\DisplayMathtrue}%
+>>>
+
+\<ignore dvimathml in equation\><<<
+\Configure{DviMathML}{}{}
+>>>
+
+\<amsmath equation july 2000\><<<
+\Configure{gather}
+ {\HCode{<\a:mathml mtable\Hnewline
+ \mml:class="equation"><\a:mathml mtr><\a:mathml mtd>}\IgnorePar
+ |<math display in equation|>}
+ {\HCode{</\a:mathml mtd></\a:mathml mtr></\a:mathml mtable>}}
+ {}
+ {}
+ {\ifnum\HCol=2 \IgnorePar
+ \HCode{</\a:mathml mtd><\a:mathml mtd>}\fi }
+ {}
+>>>
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Fonts}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -752,21 +835,44 @@
}
{\ifvmode \IgnorePar\fi \EndP \HCode{</table-wrap>}\par\ShowPar}
{}{}
+
+\ConfigureEnv{table*}
+ {\ifvmode \IgnorePar\fi \EndP \HCode{<table-wrap position="float">}
+ \Configure{float}{}{}{}{}
+ }
+ {\ifvmode \IgnorePar\fi \EndP \HCode{</table-wrap>}\par\ShowPar}
+ {}{}
+|<tabular environment|>
+>>>
+
+
+\<configure jats-mml latex\><<<
+|<tabular environment|>
+>>>
+
+\<configure jats-mml array\><<<
+|<tabular environment|>
+>>>
+
+This configuration should remove the div element around tables inserted by the default HTML configurations.
+
+\<tabular environment\><<<
\ConfigureEnv{tabular}
{\Configure{noalign}%
-{\f:tabular\d:tabular \HCode{<tr><td colspan="\ar:cnt">}}
-{\HCode{</td></tr>}\pend:def\TableNo{0}\c:tabular\e:tabular}%
+ {\f:tabular\d:tabular \HCode{<tr><td colspan="\ar:cnt">}}
+ {\HCode{</td></tr>}\pend:def\TableNo{0}\c:tabular\e:tabular}%
%
-\IgnorePar\ifvmode\else\HCode{<!--tex4ht:inline-->}\fi
-\EndP\PushStack\Col:Marg\AllColMargins
-}
-{\PopStack\Col:Marg\AllColMargins\ShowPar
-\Configure{noalign}{}{}%
+ \IgnorePar\ifvmode\else\HCode{<!--tex4ht:inline-->}\fi
+\EndP\HCode{}%
+ \PushStack\Col:Marg\AllColMargins
+ }
+ {\HCode{}\PopStack\Col:Marg\AllColMargins\ShowPar
+ \Configure{noalign}{}{}%
%
-\ShowPar
+ \ShowPar
%
-}{}{}
+ }{}{}
>>>
%%%%%%%%%%%%%%%%%%%%%
Modified: trunk/lit/tex4ht-options.tex
===================================================================
--- trunk/lit/tex4ht-options.tex 2025-07-06 20:00:56 UTC (rev 1716)
+++ trunk/lit/tex4ht-options.tex 2025-07-09 20:02:50 UTC (rev 1717)
@@ -331,6 +331,7 @@
\Hinclude[*]{jats.4ht}%
\Hinclude[*]{mathml.4ht}%
\Hinclude[*]{html-mml.4ht}%
+ \Hinclude[*]{jats-mml.4ht}%
\Hinclude[*]{unicode.4ht}%
}
>>>
More information about the tex4ht-commits
mailing list.