[tex4ht-commits] [SCM] tex4ht updated: r1012 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Fri Nov 19 10:35:54 CET 2021
Author: michal_h21
Date: 2021-11-19 09:35:54 +0000 (Fri, 19 Nov 2021)
New Revision: 1012
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-mathjax.tex
Log:
use latex 3 commands for \VerbMath
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2021-11-09 09:00:24 UTC (rev 1011)
+++ trunk/lit/ChangeLog 2021-11-19 09:35:54 UTC (rev 1012)
@@ -1,3 +1,8 @@
+2021-11-19 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): use LaTeX 3 commands in
+ \VerbMath, this enables us to remove dependency on external packages.
+
2021-11-09 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-html4.tex (html4.4ht): added CSS declaration that enables table row
Modified: trunk/lit/tex4ht-mathjax.tex
===================================================================
--- trunk/lit/tex4ht-mathjax.tex 2021-11-09 09:00:24 UTC (rev 1011)
+++ trunk/lit/tex4ht-mathjax.tex 2021-11-19 09:35:54 UTC (rev 1012)
@@ -29,8 +29,10 @@
\endinput
>>>
+We don't require additional packages anymore, as everything necessary is included
+in LaTeX kernel now.
+% \RequirePackage{etoolbox,expl3,environ}
\<required packages\><<<
-\RequirePackage{etoolbox,expl3,environ}
>>>
The \verb|\alteqtoks| command saves the used command in HTML. It uses detokenize command
@@ -60,6 +62,8 @@
\regex_replace_all:nnN { \x{26} } { & } \l_tmpa_tl
\regex_replace_all:nnN { \x{3C} } { < } \l_tmpa_tl
\regex_replace_all:nnN { \x{3E} } { > } \l_tmpa_tl
+ % replace \par command with blank lines
+ \regex_replace_all:nnN { \x{5C}par } {\x{A}\x{A}} \l_tmpa_tl
\tl_set:Nx \l_tmpb_tl{ \l_tmpa_tl }
\HCode{\l_tmpb_tl}
}
@@ -90,13 +94,21 @@
#1
\end{#2}}%
}
+>>>
+
+The \verb|\VerbMath| command redefines environments to pass their content
+verbatim to the HTML output.
+
+\<defined commands\><<<
+\ExplSyntaxOn
\newcommand\VerbMath[1]{%
-\ifcsdef{#1}{%
- \RenewEnviron{#1}{%
- \NoFonts\expandafter\VerbMathToks\expandafter{\BODY}{#1}\EndNoFonts%
- }
-}{}%
+ \cs_if_exist:cTF{#1}{
+ \RenewDocumentEnvironment{#1}{+!b}{%
+ \NoFonts\expandafter\VerbMathToks\expandafter{##1}{#1}\EndNoFonts%
+ }{}
+ }{}%
}
+\ExplSyntaxOff
>>>
The \verb|\fixmathjaxtoc| command is used for patching commands which should
More information about the tex4ht-commits
mailing list.