%%
%% This is file `lwarp-skmath.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `skmath')
%% This is a generated file.
%% Copyright 2016-2022 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{skmath}[2019/10/15]
\begin{warpMathJax}
\ExplSyntaxOn
\bool_if:NT\g__skmath_define_common_sets_bool{
\CustomizeMathJax{\newcommand{\N}{\mathbb{N}}}
\CustomizeMathJax{\newcommand{\Z}{\mathbb{Z}}}
\CustomizeMathJax{\newcommand{\Q}{\mathbb{Q}}}
\CustomizeMathJax{\newcommand{\R}{\mathbb{R}}}
\CustomizeMathJax{\newcommand{\C}{\mathbb{C}}}
}
\cs_gset_nopar:Npn\LWR__skmath_imaginary_unit:n#1{{#1}}
\cs_gset_nopar:Npn\LWR__skmath_natural_log_e:{{e}}
\cs_gset_nopar:Npn\LWR__skmath_integral_d:{{d}}
\cs_gset_nopar:Npn\LWR__skmath_total_derivative_d:{{d}}
\cs_if_eq:NNTF \__skmath_imaginary_unit:n \LWR__skmath_imaginary_unit:n
    {
        \CustomizeMathJax{\newcommand{ii}{\mathit{i}}}
        \CustomizeMathJax{\newcommand{jj}{\mathit{j}}}
    }
    {
        \CustomizeMathJax{\newcommand{ii}{\mathrm{i}}}
        \CustomizeMathJax{\newcommand{jj}{\mathrm{j}}}
    }
\cs_if_eq:NNTF \__skmath_natural_log_e: \LWR__skmath_natural_log_e:
    { \CustomizeMathJax{\newcommand{\ee}{\mathit{e}}} }
    { \CustomizeMathJax{\newcommand{\ee}{\mathrm{e}}} }
\cs_if_eq:NNTF \__skmath_integral_d: \LWR__skmath_integral_d:
    { \CustomizeMathJax{\newcommand{\d}{\mathit{d}}} }
    { \CustomizeMathJax{\newcommand{\d}{\mathrm{d}}} }
\CustomizeMathJax{\def\LWRskmathEND{}}
\CustomizeMathJax{\def\LWRskmathpdstarsub#1#2,#3,#4,#5,#6\LWRskmathEND{
    #1_{#2#3#4#5}%
}}

\CustomizeMathJax{\newcommand{\LWRskmathpdstar}[2]{%
    \LWRskmathpdstarsub{#1}#2,,,,\LWRskmathEND%
}}
\CustomizeMathJax{\def\LWRskmathpdnumerator#1^#2^#3\LWRskmathEND{%
    \ifblank{#1}{}{
        \ifblank{#2}{\LWRskmathpdplus\LWRskmathpdone}{\LWRskmathpdplus#2}
    }
}}
\CustomizeMathJax{\def\LWRskmathpddenominator#1^#2^#3\LWRskmathEND{%
    \ifblank{#1}{}{%
        \ifblank{#2}%
            {\partial{#1}}%
            {\partial{#1}^{#2}}%
    }%
}}
\CustomizeMathJax{\newcommand{\LWRskmathdonumerator}[5]{%
    \partial^{%
        \def\LWRskmathpdplus{}%
        \LWRskmathpdnumerator#2^{}^{}\LWRskmathEND%
        \def\LWRskmathpdplus{+}%
        \def\LWRskmathpdone{1}%
        \LWRskmathpdnumerator#3^{}^{}\LWRskmathEND%
        \LWRskmathpdnumerator#4^{}^{}\LWRskmathEND%
        \LWRskmathpdnumerator#5^{}^{}\LWRskmathEND%
    }%
    {#1}%
}}

\CustomizeMathJax{\newcommand{\LWRskmathdodenominator}[4]{%
    \LWRskmathpddenominator#1^{}^{}^{}\LWRskmathEND%
    \ifblank{#2}{}{\,}%
    \LWRskmathpddenominator#2^{}^{}^{}\LWRskmathEND%
    \ifblank{#3}{}{\,}%
    \LWRskmathpddenominator#3^{}^{}^{}\LWRskmathEND%
    \ifblank{#4}{}{\,}%
    \LWRskmathpddenominator#4^{}^{}^{}\LWRskmathEND%
}}
\CustomizeMathJax{\def\LWRskmathpdnostarsub#1#2,#3,#4,#5,#6\LWRskmathEND{
    \ifblank{#3}{\def\LWRskmathpdone{}}{\def\LWRskmathpdone{1}}
    \frac%
        {\LWRskmathdonumerator{#1}{#2}{#3}{#4}{#5}}%
        {\LWRskmathdodenominator{#2}{#3}{#4}{#5}}%
}}

\CustomizeMathJax{\newcommand{\LWRskmathpdnostar}[2]{%
    \LWRskmathpdnostarsub{#1}#2,,,,,,\LWRskmathEND%
}}
\CustomizeMathJax{\newcommand{\pd}{\ifstar\LWRskmathpdstar\LWRskmathpdnostar}}
\cs_if_eq:NNTF \__skmath_total_derivative_d: \LWR__skmath_total_derivative_d:
    { \CustomizeMathJax{\newcommand{\LWRskmathtd}{\mathit{d}}} }
    { \CustomizeMathJax{\newcommand{\LWRskmathtd}{\mathrm{d}}} }
\CustomizeMathJax{\def\LWRskmathtdsub#1#2^#3\LWRskmathEND{%
    \frac
        {\LWRskmathtd^{#3}{#1}}
        {\LWRskmathtd{#2}^{#3}}
}}

\CustomizeMathJax{\newcommand{\td}[2]{%
    \LWRskmathtdsub{#1}#2^{}\LWRskmathEND%
}}
\CustomizeMathJax{\newcommand{\E}[1]{%
    \operatorname{E}\left[#1\right]%
}}
\CustomizeMathJax{\let\given\mid}

\CustomizeMathJax{\newcommand{\P}[1]{%
    \operatorname{P}%
    \left(#1\right)%
}}
\CustomizeMathJax{\newcommand{\var}[1]{%
  \operatorname{Var}\left(#1\right)%
}}

\CustomizeMathJax{\newcommand{\cov}[2]{%
  \operatorname{Cov}\left(#1,#2\right)%
}}
\CustomizeMathJax{\newcommand{\LWRskmathtrigtwo}[2][]{%
    \ifblank{#1}{}{^{#1}}%
    \ifblank{#2}{}{\left(#2\right)}%
}}

\CustomizeMathJax{\newcommand{\LWRskmathtrig}[1]{%
    \operatorname{#1}%
    \LWRskmathtrigtwo%
}}
\CustomizeMathJax{\renewcommand{\sin}{\LWRskmathtrig{sin}}}
\CustomizeMathJax{\renewcommand{\arcsin}{\LWRskmathtrig{arcsin}}}

\CustomizeMathJax{\renewcommand{\cos}{\LWRskmathtrig{cos}}}
\CustomizeMathJax{\renewcommand{\arccos}{\LWRskmathtrig{arccos}}}

\CustomizeMathJax{\renewcommand{\tan}{\LWRskmathtrig{tan}}}
\CustomizeMathJax{\renewcommand{\arctan}{\LWRskmathtrig{arctan}}}

\CustomizeMathJax{\renewcommand{\cot}{\LWRskmathtrig{cot}}}

\CustomizeMathJax{\renewcommand{\sinh}{\LWRskmathtrig{sinh}}}
\CustomizeMathJax{\renewcommand{\cosh}{\LWRskmathtrig{cosh}}}
\CustomizeMathJax{\renewcommand{\tanh}{\LWRskmathtrig{tanh}}}
\CustomizeMathJax{\newcommand{\LWRskmathlogtwo}[2][]{%
    \ifblank{#1}{}{_{#1}}%
    \ifblank{#2}{}{\left(#2\right)}%
}}

\CustomizeMathJax{\newcommand{\LWRskmathlog}[1]{%
    \operatorname{#1}%
    \LWRskmathlogtwo%
}}
\CustomizeMathJax{\renewcommand{\ln}{\LWRskmathlog{ln}}}
\CustomizeMathJax{\renewcommand{\log}{\LWRskmathlog{log}}}
\CustomizeMathJax{\newcommand{\LWRskmathexpparens}[1]{%
    \operatorname{exp}%
    \ifblank{#1}{}{\left(#1\right)}%
}}
\CustomizeMathJax{\newcommand{\LWRskmathexpnostar}[1]{%
    \mathchoice
        {\ee^{#1}}
        {\LWRskmathexpparens{#1}}
        {\LWRskmathexpparens{#1}}
        {\LWRskmathexpparens{#1}}
}}

\CustomizeMathJax{\renewcommand{\exp}{\ifstar\LWRskmathexpparens\LWRskmathexpnostar}}
\CustomizeMathJax{\newcommand{\LWRskmathminstar}[2][]{%
    \operatorname{\LWRskmathminname}%
    \ifblank{#1}{}{%
        _{\mathchoice{\mathclap{#1}}{#1}{#1}{#1}}
    }%
    \ifblank{#2}{}{#2}%
}}
\CustomizeMathJax{\newcommand{\LWRskmathminnostar}[2][]{%
    \ifblank{#1}%
        {\operatorname{\LWRskmathminname}}%
        {%
            \underset%
                {\mathchoice{\mathclap{#1}}{#1}{#1}{#1}}%
                {\operatorname{\LWRskmathminname}}%
        }%
    \ifblank{#2}{}{\left\{#2\right\}}%
}}
\CustomizeMathJax{\newcommand{\LWRskmathmin}[1]{%
    \def\LWRskmathminname{#1}%
    \ifstar\LWRskmathminstar\LWRskmathminnostar%
}}
\CustomizeMathJax{\renewcommand{\min}{\LWRskmathmin{min}}}
\CustomizeMathJax{\renewcommand{\argmin}{\arg\LWRskmathmin{min}}}

\CustomizeMathJax{\renewcommand{\max}{\LWRskmathmin{max}}}
\CustomizeMathJax{\renewcommand{\argmax}{\arg\LWRskmathmin{max}}}
\CustomizeMathJax{\renewcommand{\sup}{\LWRskmathmin{sup}}}
\CustomizeMathJax{\renewcommand{\inf}{\LWRskmathmin{inf}}}
\CustomizeMathJax{\let\bar\overline}

\CustomizeMathJax{\let\vec\boldsymbol}
\CustomizeMathJax{\let\LWRskmathRe\Re}
\CustomizeMathJax{\let\LWRskmathIm\Im}
\bool_if:NTF\g__skmath_iso_complex_parts_bool{
    \CustomizeMathJax{\renewcommand{\Re}[1]{%
        \LWRskmathRe%
        \ifblank{#1}{}{\left(#1\right)}%
    }}
    \CustomizeMathJax{\renewcommand{\Im}[1]{%
        \LWRskmathIm%
        \ifblank{#1}{}{\left(#1\right)}%
    }}
}{
    \CustomizeMathJax{\renewcommand{\Re}[1]{%
        \operatorname{Re}%
        \ifblank{#1}{}{#1}%
    }}
    \CustomizeMathJax{\renewcommand{\Im}[1]{%
        \operatorname{Im}%
        \ifblank{#1}{}{#1}%
    }}
}

\ExplSyntaxOff
\end{warpMathJax}
\endinput
%%
%% End of file `lwarp-skmath.sty'.
