summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty14
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty b/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty
index efad1407d22..f5266d4888e 100644
--- a/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty
+++ b/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty
@@ -31,7 +31,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{naive-ebnf}
-[2023-01-29 0.0.2 EBNF in Plain Text]
+[2023-01-30 0.0.3 EBNF in Plain Text]
@@ -60,14 +60,18 @@
\makeatother
\makeatletter
-\newcommand\terminal[1]{%
+\newcommand\terminal[1]{{%
\relax\ifmmode\else\ttfamily\fi%
- \ebnf@color{gray}{"}#1\ebnf@color{gray}{"}}
+ \ebnf@color{gray}{\relax\ifmmode\textsf{``}\else{\sffamily``}\fi}%
+ #1%
+ \ebnf@color{gray}{\relax\ifmmode\textsf{''}\else{\sffamily''}\fi}}}
\makeatother
\makeatletter
-\newcommand\nonterminal[1]
- {\(\ebnf@color{gray}{\langle}\textsf{#1}\ebnf@color{gray}{\rangle}\)}
+\newcommand\nonterminal[1]{%
+ \ebnf@color{gray}{\relax\ifmmode\langle\else\(\langle\)\fi}%
+ \relax\ifmmode\textsf{#1}\else{\sffamily#1}\fi%
+ \ebnf@color{gray}{\relax\ifmmode\rangle\else\(\rangle\)\fi}}
\makeatother
\makeatletter