%%
%% This is file `lwarp-amsmath.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `amsmath')
%% This is a generated file.
%% Copyright 2016-2018 Brian Dunn
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackagePass{amsmath}[2017/09/02]
\def\maketag@@@#1{\text{#1}}
\def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip)}}

\ifbool{mathjax}{}{% not mathjax

\LetLtxMacro\LWR@origmake@df@tag@@\make@df@tag@@
\LetLtxMacro\LWR@origmake@df@tag@@@\make@df@tag@@@

\renewcommand*{\make@df@tag@@}[1]{%
\LWR@remembertag{#1}%
\LWR@origmake@df@tag@@{#1}%
}

\renewcommand*{\make@df@tag@@@}[1]{%
\LWR@remembertag{#1}%
\LWR@origmake@df@tag@@@{#1}%
}

}% not mathjax
\newcommand*{\LWR@amsmathenv@@before}[1]{%
    \begin{BlockClass}{displaymathnumbered}
    \LWR@newautoidanchor%
    \booltrue{LWR@indisplaymathimage}%
    \begin{lateximage}[\LWR@amsmathbodynumbered{#1}]
    \LWR@applyxfakebold%
}
\newcommand*{\LWR@amsmathenv@before}[1]{%
    \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{multline}
    }
}
\newcommand*{\LWR@amsmathenv@@after}{%
    \end{lateximage}\end{BlockClass}
}
\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}
}
\BeforeBeginEnvironment{multline}{\LWR@amsmathenv@before{multline}}

\AfterEndEnvironment{multline}{\LWR@amsmathenv@after{multline}}

\BeforeBeginEnvironment{multline*}{\LWR@amsmathenv@before{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*}}

\AfterEndEnvironment{gather*}{\LWR@amsmathenv@after{gather*}}

\BeforeBeginEnvironment{align}{\LWR@amsmathenv@before{align}}

\AfterEndEnvironment{align}{\LWR@amsmathenv@after{align}}

\BeforeBeginEnvironment{align*}{\LWR@amsmathenv@before{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*}}

\AfterEndEnvironment{flalign*}{\LWR@amsmathenv@after{flalign*}}

\BeforeBeginEnvironment{alignat}{\LWR@amsmathenv@before{alignat}}

\AfterEndEnvironment{alignat}{\LWR@amsmathenv@after{alignat}}

\BeforeBeginEnvironment{alignat*}{\LWR@amsmathenv@before{alignat*}}

\AfterEndEnvironment{alignat*}{\LWR@amsmathenv@after{alignat*}}
\endinput
%%
%% End of file `lwarp-amsmath.sty'.
