summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty32
1 files changed, 32 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty
index 8f0ce9482ac..a9e0e08eb9d 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty
@@ -18,6 +18,38 @@
\LWR@ProvidesPackagePass{backnaur}[2019/06/18]
\renewenvironment{bnf}{\eqnarray}{\endeqnarray}
\renewenvironment{bnf*}{\csuse{eqnarray*}}{\csuse{endeqnarray*}}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\bnfpn}[1]{\langle \text{\textrm{#1}} \rangle}}
+\CustomizeMathJax{\newcommand{\bnfor}{\; \mid \;}}
+\CustomizeMathJax{\newcommand{\bnfsp}{\;}}
+\@ifpackagewith{backnaur}{perp}{
+ \CustomizeMathJax{\newcommand{\bnfes}{\perp}}
+}{
+ \@ifpackagewith{backnaur}{epsilon}{
+ \CustomizeMathJax{\newcommand{\bnfes}{\epsilon}}
+ }{
+ \CustomizeMathJax{\newcommand{\bnfes}{\lambda}}
+ }
+}
+\@ifpackagewith{backnaur}{tsrm}{
+ \CustomizeMathJax{\newcommand{\bnfts}[1]{\text{#1}}}
+}{
+ \CustomizeMathJax{\newcommand{\bnfts}[1]{\text{\texttt{#1}}}}
+}
+\CustomizeMathJax{\newcommand{\bnftd}[1]{\text{\textit{#1}}}}
+\CustomizeMathJax{\newcommand{\bnfsk}{\dots}}
+\@ifpackagewith{backnaur}{altpo}{
+ \CustomizeMathJax{\newcommand{\bnfpo}{::=}}
+}{
+ \CustomizeMathJax{\newcommand{\bnfpo}{\models}}
+}
+\CustomizeMathJax{\newcommand{\bnfprod}{\ifstar{\LWRbnfprodnn}{\LWRbnfprodyn}}}
+\CustomizeMathJax{\newcommand{\LWRbnfprodyn}[2]{\bnfpn{#1} & \bnfpo & #2}}
+\CustomizeMathJax{\newcommand{\LWRbnfprodnn}[2]{\nonumber \bnfpn{#1} & \bnfpo & #2}}
+\CustomizeMathJax{\newcommand{\bnfmore}{\ifstar{\LWRbnfmorenn}{\LWRbnfmoreyn}}}
+\CustomizeMathJax{\newcommand{\LWRbnfmoreyn}[1]{ & & #1}}
+\CustomizeMathJax{\newcommand{\LWRbnfmorenn}[1]{\nonumber & & #1}}
+\end{warpMathJax}
\endinput
%%
%% End of file `lwarp-backnaur.sty'.