diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty index 4e13e17cc3b..e9aac1ca3c3 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty @@ -6,7 +6,7 @@ %% %% lwarp.dtx (with options: `amsmath') %% This is a generated file. -%% Copyright 2016-2019 Brian Dunn +%% Copyright 2016-2020 Brian Dunn %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -35,6 +35,8 @@ } }% not mathjax +\newcounter{LWR@amsmathdepth} +\setcounter{LWR@amsmathdepth}{0} \newcommand*{\LWR@amsmathenv@@before}[1]{% \begin{BlockClass}{displaymathnumbered} \LWR@newautoidanchor% @@ -43,31 +45,37 @@ \LWR@applyxfakebold% } \newcommand*{\LWR@amsmathenv@before}[1]{% - \LWR@stoppars% - \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% - { - \LWR@syncmathjax - \boolfalse{LWR@amsmultline} - \ifstrequal{#1}{multline}{\booltrue{LWR@amsmultline}}{} - \ifstrequal{#1}{multline*}{\booltrue{LWR@amsmultline}}{} - \LWR@beginhideamsmath - } - { - \LWR@amsmathenv@@before{#1} - } + \ifnumequal{\value{LWR@amsmathdepth}}{0}{% + \LWR@stoppars% + \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% + { + \LWR@syncmathjax + \boolfalse{LWR@amsmultline} + \ifstrequal{#1}{multline}{\booltrue{LWR@amsmultline}}{} + \ifstrequal{#1}{multline*}{\booltrue{LWR@amsmultline}}{} + \LWR@beginhideamsmath + } + { + \LWR@amsmathenv@@before{#1} + } + }{} + \addtocounter{LWR@amsmathdepth}{1} } \newcommand*{\LWR@amsmathenv@@after}{% \end{lateximage}\end{BlockClass}\LWR@startpars% } \newcommand*{\LWR@amsmathenv@after}[1]{% - \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% - { - \LWR@endhideamsmath - \boolfalse{LWR@amsmultline} - \LWR@addmathjax{#1}{\the\@envbody} - } - {\LWR@amsmathenv@@after} -\gdef\LWR@ThisAltText{}% + \ifnumequal{\value{LWR@amsmathdepth}}{1}{% + \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% + { + \LWR@endhideamsmath + \boolfalse{LWR@amsmultline} + \LWR@addmathjax{#1}{\the\@envbody} + } + {\LWR@amsmathenv@@after} + \gdef\LWR@ThisAltText{}% + }{} + \addtocounter{LWR@amsmathdepth}{-1} } \BeforeBeginEnvironment{multline}{\LWR@amsmathenv@before{multline}} @@ -109,6 +117,9 @@ \BeforeBeginEnvironment{alignat*}{\LWR@amsmathenv@before{alignat*}} \AfterEndEnvironment{alignat*}{\LWR@amsmathenv@after{alignat*}} +\begin{warpMathJax} +\CustomizeMathJax{\newcommand{\intertext}[1]{\\ \text{#1}\notag \\}} +\end{warpMathJax} \endinput %% %% End of file `lwarp-amsmath.sty'. |