% mathjax-latex-4ht.4ht (2024-07-28-13:12), generated from tex4ht-mathjax.tex % Copyright 2018-2024 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 % https://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 . % % If you modify this program, changing the % version identification would be appreciated. \immediate\write-1{version 2024-07-28-13:12} \ExplSyntaxOn \cs_new_protected:Npn \alteqtoks #1 { % save tokens, but preserve spaces % https://tex.stackexchange.com/a/44444/2891 \tl_set:Nn \l_tmpa_tl {#1} \regex_replace_all:nnN { . } { \c{string} \0 } \l_tmpa_tl \tl_set:Nx \l_tmpa_tl { \l_tmpa_tl } % % replace < > and & with xml entities \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\b } {\x{A}\x{A}} \l_tmpa_tl \tl_set:Ne \l_tmpb_tl{ \l_tmpa_tl } \HCode{\l_tmpb_tl} } \ExplSyntaxOff \NewConfigure{MathJaxConfig}{1} \NewConfigure{MathJaxMacros}[1]{% \Configure{@BODY}{\bgroup\NoFonts\ttfamily\detokenize{\(}% \special{t4ht*<#1}% \detokenize{\)}\EndNoFonts\egroup}% } \long\def\AltlMath#1\){\expandafter\alteqtoks{\(#1\)}\)} \long\def\AltlDisplay#1\]{\alteqtoks{\[#1\]}\]} \long\def\AltMathOne#1${\alteqtoks{\(#1\)}$} % this seems a bit hacky -- we need to skip some code inserted at the % beginning of each display math \long\def\AltlDisplayDollars#1$${\alteqtoks{\[#1\]}$$} \newcommand\VerbMathToks[2]{% \alteqtoks{\begin{#2} #1 \end{#2}}% } \ExplSyntaxOn \seq_new:N\:savedmathjaxenvs \newcommand\:savemathjaxenv[1]{% \seq_gput_right:Nn\:savedmathjaxenvs{#1} \expandafter\let\csname mathjax-#1\expandafter\endcsname\csname #1\endcsname% \expandafter\let\csname mathjax-end#1\expandafter\endcsname\csname end#1\endcsname% } % we must not reintroduce the matrix environmeint in TikZ, because it interferes with the \matrix command \newcommand\:ignoretikzmatrix{\seq_remove_all:Nn\:savedmathjaxenvs{matrix}} \newcommand\RestoreMathJaxEnvironment[1]{% \expandafter\let\csname #1\expandafter\endcsname\csname mathjax-#1\endcsname% \expandafter\let\csname end#1\expandafter\endcsname\csname mathjax-end#1\endcsname% } \newcommand\RestoreMathJaxEnvironments{% \seq_map_function:NN\:savedmathjaxenvs\RestoreMathJaxEnvironment% } \ExplSyntaxOff \ExplSyntaxOn \cs_generate_variant:Nn \regex_extract_once:nnNTF {nV} \newcommand\VerbMath[2][]{% \cs_if_exist:cTF{#2}{ \:savemathjaxenv{#2}% \RenewDocumentEnvironment{#2}{+!b}{% \NoFonts\expandafter\VerbMathToks\expandafter{\detokenize{##1}}{#2}\EndNoFonts% \ifx\relax#1\relax\else% \refstepcounter{#1}% \regex_extract_once:nVNTF { label\s* \x{7B}([^\x{7D}]*)\x{7D}} {\l_tmpb_tl} \l_tmp_seq {\label{\seq_item:Nn\l_tmp_seq{2}}} {}% \fi }{} }{}% } \ExplSyntaxOff \def\fixmathjaxtoc#1{\Configure{writetoc}{\def#1{\detokenize{#1}}}} \AtBeginDocument{% \VerbMath{subarray} \VerbMath{smallmatrix} \VerbMath{matrix} \VerbMath{pmatrix} \VerbMath{bmatrix} \VerbMath{Bmatrix} \VerbMath{vmatrix} \VerbMath{Vmatrix} \VerbMath{cases} \VerbMath{subequations} \VerbMath{aligned} \VerbMath{alignedat} \VerbMath{gathered} \VerbMath{gather} \VerbMath{gather*} \VerbMath{alignat} \VerbMath{alignat*} \VerbMath{xalignat} \VerbMath{xalignat*} \VerbMath{xxalignat} \VerbMath{align} \VerbMath{align*} \VerbMath{flalign} \VerbMath{flalign*} \VerbMath{split} \VerbMath{multline} \VerbMath{multline*} \VerbMath[equation]{equation} \VerbMath{equation*} \VerbMath{math} \VerbMath{displaymath} \VerbMath{eqnarray} \VerbMath{eqnarray*} \ConfigureEnv{gather}{}{}{}{} \ConfigureEnv{gather*}{}{}{}{} \ConfigureEnv{multline}{}{}{}{} \ConfigureEnv{multline*}{}{}{}{} \fixmathjaxtoc\int \fixmathjaxtoc\, \fixmathjaxtoc\sin \fixmathjaxtoc\cos \fixmathjaxtoc\tan \fixmathjaxtoc\arcsin \fixmathjaxtoc\arccos \fixmathjaxtoc\arctan \fixmathjaxtoc\csc \fixmathjaxtoc\sec \fixmathjaxtoc\cot \fixmathjaxtoc\sinh \fixmathjaxtoc\cosh \fixmathjaxtoc\tanh \fixmathjaxtoc\coth \fixmathjaxtoc\log \fixmathjaxtoc\ln \fixmathjaxtoc\sum \fixmathjaxtoc\( \fixmathjaxtoc\) \fixmathjaxtoc\begin \fixmathjaxtoc\end \fixmathjaxtoc\\ \fixmathjaxtoc\exp \fixmathjaxtoc\left \fixmathjaxtoc\right \@ifpackageloaded{mhchem}{% \def\:tempa#1{\texttt{\detokenize{\(\ce{#1}\)}}} \HLet\ce\:tempa }{} \@ifpackageloaded{tikz}{% \tikzset{every picture/.append code={\:ignoretikzmatrix\RestoreMathJaxEnvironments}} }{} } \endinput \endinput