diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-19 22:12:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-19 22:12:54 +0000 |
commit | a9e8ab5ea667e1e188595e49a7cc6fcc4e5ae18e (patch) | |
tree | c4b3736cc1ba6481af15c82b988ace32ad9436e7 /Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty | |
parent | 4701e1a772599af5699534ae4090999a79e04ecf (diff) |
lwarp (19feb20)
git-svn-id: svn://tug.org/texlive/trunk@53847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty index e9aac1ca3c3..69a5bff980b 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty @@ -37,26 +37,34 @@ }% not mathjax \newcounter{LWR@amsmathdepth} \setcounter{LWR@amsmathdepth}{0} -\newcommand*{\LWR@amsmathenv@@before}[1]{% - \begin{BlockClass}{displaymathnumbered} +\NewDocumentCommand{\LWR@amsmathenv@@before}{s m}{% + \IfBooleanTF{#1}{ + \begin{BlockClass}{displaymath} + }{ + \begin{BlockClass}{displaymathnumbered} + } \LWR@newautoidanchor% \booltrue{LWR@indisplaymathimage}% \begin{lateximage}[\LWR@amsmathbodynumbered{#1}]* \LWR@applyxfakebold% } -\newcommand*{\LWR@amsmathenv@before}[1]{% +\NewDocumentCommand{\LWR@amsmathenv@before}{s m}{% \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}}{} + \ifstrequal{#2}{multline}{\booltrue{LWR@amsmultline}}{} + \ifstrequal{#2}{multline*}{\booltrue{LWR@amsmultline}}{} \LWR@beginhideamsmath } { - \LWR@amsmathenv@@before{#1} + \IfBooleanTF{#1}{ + \LWR@amsmathenv@@before*{#2} + }{ + \LWR@amsmathenv@@before{#2} + } } }{} \addtocounter{LWR@amsmathdepth}{1} @@ -64,13 +72,13 @@ \newcommand*{\LWR@amsmathenv@@after}{% \end{lateximage}\end{BlockClass}\LWR@startpars% } -\newcommand*{\LWR@amsmathenv@after}[1]{% +\NewDocumentCommand{\LWR@amsmathenv@after}{s m}{% \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@addmathjax{#2}{\the\@envbody} } {\LWR@amsmathenv@@after} \gdef\LWR@ThisAltText{}% @@ -81,42 +89,42 @@ \AfterEndEnvironment{multline}{\LWR@amsmathenv@after{multline}} -\BeforeBeginEnvironment{multline*}{\LWR@amsmathenv@before{multline*}} +\BeforeBeginEnvironment{multline*}{\LWR@amsmathenv@before*{multline*}} -\AfterEndEnvironment{multline*}{\LWR@amsmathenv@after{multline*}} +\AfterEndEnvironment{multline*}{\LWR@amsmathenv@after*{multline*}} \BeforeBeginEnvironment{gather}{\LWR@amsmathenv@before{gather}} \AfterEndEnvironment{gather}{\LWR@amsmathenv@after{gather}} -\BeforeBeginEnvironment{gather*}{\LWR@amsmathenv@before{gather*}} +\BeforeBeginEnvironment{gather*}{\LWR@amsmathenv@before*{gather*}} -\AfterEndEnvironment{gather*}{\LWR@amsmathenv@after{gather*}} +\AfterEndEnvironment{gather*}{\LWR@amsmathenv@after*{gather*}} \BeforeBeginEnvironment{align}{\LWR@amsmathenv@before{align}} \AfterEndEnvironment{align}{\LWR@amsmathenv@after{align}} -\BeforeBeginEnvironment{align*}{\LWR@amsmathenv@before{align*}} +\BeforeBeginEnvironment{align*}{\LWR@amsmathenv@before*{align*}} -\AfterEndEnvironment{align*}{\LWR@amsmathenv@after{align*}} +\AfterEndEnvironment{align*}{\LWR@amsmathenv@after*{align*}} \BeforeBeginEnvironment{flalign}{\LWR@amsmathenv@before{flalign}} \AfterEndEnvironment{flalign}{\LWR@amsmathenv@after{flalign}} -\BeforeBeginEnvironment{flalign*}{\LWR@amsmathenv@before{flalign*}} +\BeforeBeginEnvironment{flalign*}{\LWR@amsmathenv@before*{flalign*}} -\AfterEndEnvironment{flalign*}{\LWR@amsmathenv@after{flalign*}} +\AfterEndEnvironment{flalign*}{\LWR@amsmathenv@after*{flalign*}} \BeforeBeginEnvironment{alignat}{\LWR@amsmathenv@before{alignat}} \AfterEndEnvironment{alignat}{\LWR@amsmathenv@after{alignat}} -\BeforeBeginEnvironment{alignat*}{\LWR@amsmathenv@before{alignat*}} +\BeforeBeginEnvironment{alignat*}{\LWR@amsmathenv@before*{alignat*}} -\AfterEndEnvironment{alignat*}{\LWR@amsmathenv@after{alignat*}} +\AfterEndEnvironment{alignat*}{\LWR@amsmathenv@after*{alignat*}} \begin{warpMathJax} \CustomizeMathJax{\newcommand{\intertext}[1]{\\ \text{#1}\notag \\}} \end{warpMathJax} |