summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/backnaur
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-29 21:06:31 +0000
committerKarl Berry <karl@freefriends.org>2019-06-29 21:06:31 +0000
commitc81d0736dc576f983c5c03bd531caf782b2328f4 (patch)
treee530b4b5e829d526ffaa0589f526a87a5ba11be5 /Master/texmf-dist/tex/latex/backnaur
parent19ed7af30e1bd9150f038b5c421a73259952ef2d (diff)
backnaur (29jun19)
git-svn-id: svn://tug.org/texlive/trunk@51505 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/backnaur')
-rw-r--r--Master/texmf-dist/tex/latex/backnaur/backnaur.sty22
1 files changed, 13 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/backnaur/backnaur.sty b/Master/texmf-dist/tex/latex/backnaur/backnaur.sty
index 5f863c0dbd8..aba486f18bc 100644
--- a/Master/texmf-dist/tex/latex/backnaur/backnaur.sty
+++ b/Master/texmf-dist/tex/latex/backnaur/backnaur.sty
@@ -25,28 +25,32 @@
%%
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
\ProvidesPackage{backnaur}
-[2019/04/14 2.0 Typesetting for Backus-Naur Form (BNF) definitions]
+[2019/06/18 3.1 Typesetting for Backus-Naur Form (BNF) definitions]
\newenvironment{bnf}%
{\begin{eqnarray}}%
{\end{eqnarray}\ignorespacesafterend}
\newenvironment{bnf*}%
{\begin{eqnarray*}}%
{\end{eqnarray*}\ignorespacesafterend}
-\newcommand{\bnfpn}[1]{\langle \textnormal{#1} \rangle}
+\newcommand{\bnfpn}[1]{\langle \textrm{#1} \rangle}
\newcommand{\bnfor}{\; \mid \;}
\newcommand{\bnfsp}{\;}
\newcommand{\bnfes}{\lambda}
-\newcommand\bnf@tsfont[1]{\texttt{#1}}
-\newcommand{\bnfts}[1]{\textnormal{\bnf@tsfont{#1}}}
-\newcommand{\bnftd}[1]{\textnormal{\it #1}}
+\newcommand{\bnf@tsfont}[1]{\texttt{#1}}
+\newcommand{\bnfts}[1]{\bnf@tsfont{#1}}
+\newcommand{\bnftd}[1]{\textit{#1}}
\newcommand{\bnfsk}{\dots}
\newcommand{\bnfpo}{\models}
-\newcommand{\bnfprod}[2]{\bnfpn{#1} & \bnfpo & #2}
-\newcommand{\bnfmore}[1]{ & & #1}
-\DeclareOption{tstt}{}
-\DeclareOption{tsrm}{\renewcommand\bnf@tsfont[1]{\textrm{#1}}}
+\newcommand{\bnfprod}{\@ifstar{\bnf@prodnn}{\bnf@prodyn}}
+\newcommand{\bnf@prodyn}[2]{\bnfpn{#1} & \bnfpo & #2}
+\newcommand{\bnf@prodnn}[2]{\nonumber \bnfpn{#1} & \bnfpo & #2}
+\newcommand{\bnfmore}{\@ifstar{\bnf@morenn}{\bnf@moreyn}}
+\newcommand{\bnf@moreyn}[1]{ & & #1}
+\newcommand{\bnf@morenn}[1]{\nonumber & & #1}
+\DeclareOption{tsrm}{\renewcommand{\bnf@tsfont}[1]{\textrm{#1}}}
\DeclareOption{perp}{\renewcommand{\bnfes}{\perp}}
\DeclareOption{epsilon}{\renewcommand{\bnfes}{\epsilon}}
+\DeclareOption{altpo}{\renewcommand{\bnfpo}{::=}}
\ProcessOptions\relax
\endinput
%%