[tex4ht-commits] [SCM] tex4ht updated: r974 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Sun Aug 22 18:06:00 CEST 2021
Author: michal_h21
Date: 2021-08-22 16:06:00 +0000 (Sun, 22 Aug 2021)
New Revision: 974
Modified:
trunk/lit/ChangeLog
trunk/lit/mktex4ht-cnf.tex
trunk/lit/tex4ht-4ht.tex
trunk/lit/tex4ht-html4.tex
Log:
fixed siunitx support in the MathJax mode
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2021-08-14 10:42:30 UTC (rev 973)
+++ trunk/lit/ChangeLog 2021-08-22 16:06:00 UTC (rev 974)
@@ -1,3 +1,9 @@
+2021-08-22 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (siunitx.4ht),
+ * tex4ht-html4.tex (html4.4ht): fixed MathJax support for Siunitx.
+ https://github.com/josephwright/siunitx/issues/530
+
2021-08-14 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (biblatex.4ht): don't check for Hyperref when we define
Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex 2021-08-14 10:42:30 UTC (rev 973)
+++ trunk/lit/mktex4ht-cnf.tex 2021-08-22 16:06:00 UTC (rev 974)
@@ -222,6 +222,7 @@
\AddFile{9}{subeqnarray}
\AddFile{9}{eurosym}
\AddFile{9}{SIunits}
+\AddFile{9}{siunitx}
\AddFile{9}{sistyle}
\AddFile{9}{ushort}
\AddFile{9}{chapterbib}
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2021-08-14 10:42:30 UTC (rev 973)
+++ trunk/lit/tex4ht-4ht.tex 2021-08-22 16:06:00 UTC (rev 974)
@@ -28631,6 +28631,17 @@
{\ensuremath {\SI at fstyle {\no at qsk \ensuremath {\sp{\circ }}}}}
>>>
+%%%%%%%%%%%%%%%
+\Section{Siunitx}
+
+\<siunitx.4ht\><<<
+% siunitx.4ht (|version), generated from |jobname.tex
+% Copyright 2021 TeX Users Group
+|<TeX4ht license text|>
+\Hinput{siunitx}
+\endinput
+>>> \AddFile{9}{siunitx}
+
%%%%%%%%%%%%%
\Section{Ushort}
%%%%%%%%%%%%%
Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex 2021-08-14 10:42:30 UTC (rev 973)
+++ trunk/lit/tex4ht-html4.tex 2021-08-22 16:06:00 UTC (rev 974)
@@ -21401,7 +21401,29 @@
>>>
+%%%%%%%%%%%%%%%%%%%%
+\section{siunitx}
+%%%%%%%%%%%%%%%%%%%%
+\<configure html4 siunitx\><<<
+\ExplSyntaxOn
+\ifdefined\fixmathjaxtoc
+\AtBeginDocument{%
+\cs_gset_protected:Npn \__siunitx_print_math_auxii:n #1
+ {
+ \tl_set:Nn \l__siunitx_print_tmp_tl {#1}
+ \exp_args:NNnx \tl_replace_all:Nnn \l__siunitx_print_tmp_tl
+ { ^ } { \token_to_str:N ^ }
+ % escape special HTML characters
+ \regex_replace_all:nnN { \x{26} } { & } \l__siunitx_print_tmp_tl
+ \regex_replace_all:nnN { \x{3C} } { < } \l__siunitx_print_tmp_tl
+ \regex_replace_all:nnN { \x{3E} } { > } \l__siunitx_print_tmp_tl
+ \HCode{\detokenize{\(} \tl_to_str:N \l__siunitx_print_tmp_tl \detokenize{\)}}
+}
+}
+\fi
+\ExplSyntaxOff
+>>>
More information about the tex4ht-commits
mailing list.