texlive[51001] Master/texmf-dist: backnaur (15apr19)

commits+karl at tug.org commits+karl at tug.org
Sun May 5 19:39:35 CEST 2019


Revision: 51001
          http://tug.org/svn/texlive?view=revision&revision=51001
Author:   karl
Date:     2019-05-05 19:39:35 +0200 (Sun, 05 May 2019)
Log Message:
-----------
backnaur (15apr19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/backnaur/README
    trunk/Master/texmf-dist/doc/latex/backnaur/backnaur.pdf
    trunk/Master/texmf-dist/source/latex/backnaur/backnaur.dtx
    trunk/Master/texmf-dist/source/latex/backnaur/backnaur.ins
    trunk/Master/texmf-dist/tex/latex/backnaur/backnaur.sty

Modified: trunk/Master/texmf-dist/doc/latex/backnaur/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/backnaur/README	2019-05-05 17:39:20 UTC (rev 51000)
+++ trunk/Master/texmf-dist/doc/latex/backnaur/README	2019-05-05 17:39:35 UTC (rev 51001)
@@ -11,7 +11,7 @@
 Comment out this files 'OnlyDescription' line to include the
 implementation documentation.
 
-Copyright (C) 2012 by Adrian P Robson
+Copyright (C) 2019 by Adrian P Robson
     adrian.robson at nepsweb.co.uk
 
 This work may be distributed and/or modified under the

Modified: trunk/Master/texmf-dist/doc/latex/backnaur/backnaur.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/backnaur/backnaur.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/backnaur/backnaur.dtx	2019-05-05 17:39:20 UTC (rev 51000)
+++ trunk/Master/texmf-dist/source/latex/backnaur/backnaur.dtx	2019-05-05 17:39:35 UTC (rev 51001)
@@ -1,17 +1,17 @@
 % \iffalse meta-comment
 %
 % backnaur.dtx
-% 4 December 2012
+% 14 April 2019
 %
 %    Documented LaTeX file for the backnaur package.
 %
-%    Run LaTeX on backnaur.ini to make the package's
+%    Run LaTeX on backnaur.ins to make the package's
 %    backnaur.sty file.
 %
 %    Run LaTeX on this file to produce the package 
 %    documentation.
 %
-% Copyright (C) 2012 by Adrian P Robson
+% Copyright (C) 2019 by Adrian P Robson
 %     adrian.robson at nepsweb.co.uk
 %
 % This work may be distributed and/or modified under the
@@ -34,7 +34,7 @@
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[2011/06/27]
 %<package>\ProvidesPackage{backnaur}
-%<package>[2012/12/12 1.1 Typesetting for Backus-Naur Form (BNF) definitions]
+%<package>[2019/04/14 2.0 Typesetting for Backus-Naur Form (BNF) definitions]
 %<*driver>
 \documentclass[10pt,a4paper]{ltxdoc}
 \usepackage{backnaur}
@@ -64,13 +64,15 @@
 %            {Initial version of the package.}
 %^^A
 %^^A 3 December 2012
-%^^A Add tstt option and generally rewrite documentation
+%^^A Add tstt option and generally rewrite documentation.
 %    \changes{v1.1}{2012/12/12}
-%            {Added {\tt tstt} option, and improved documentation.}
+%            {Improved documentation.}
+%
 %^^A-------------------------------------------------------------------
 % 
 %^^A \CheckSum{0} %^^A no checksum for development
-% \CheckSum{59}
+% \CheckSum{62}
+%
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
 %   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -89,13 +91,9 @@
 %
 % \GetFileInfo{backnaur.sty}
 %
-% \title{The \textsf{backnaur} package\thanks{
-%   This work replaces \emph{Writing BNF Notation in LaTeX}, 
-%   which described a non-package method of BNF typesetting.
-%   This document corresponds to \textsf{backnaur}~\fileversion, dated~\filedate.}}
-%
+% \title{The \texttt{backnaur} package}
 % \author{Adrian P. Robson\thanks{\texttt{adrian.robson at nepsweb.co.uk}}}
-% \date{12 December 2012}
+% \date{Version 2.0\\[0.5ex]14 April 2019}
 %
 % \maketitle
 %
@@ -105,7 +103,7 @@
 %
 % \section{Introduction}
 %
-% The \textsf{backnaur} package typesets Backus-Naur Form (BNF) definitions. 
+% The \texttt{backnaur} package typesets Backus-Naur Form (BNF) definitions. 
 % It creates aligned lists of productions, with numbers if required.
 % It can also print  in line BNF expressions using math mode. 
 %
@@ -156,7 +154,7 @@
 % Each BNF production is defined by a |\bnfprod| command, which has two arguments 
 % giving its left and right sides.
 % The right hand side of each production is specified with the commands described in
-% \S\ref{commandDesc}.
+% \S\ref{prodef} below.
 % Terminal (|\bnfts{;}|) and nonterminal (|\bnfpn{item}|), elements are separated 
 % by spaces (|\bnfsp|) and OR symbols (|\bnfor|).
 % The |\bnfes| command gives the symbol for the empty string.
@@ -181,13 +179,14 @@
 % xxxxxxxxx \=\kill
 % |perp|   \>The empty string symbol is $\perp$\\
 % |epsilon| \>  The empty string symbol is $\epsilon$\\
-% |tstt| \>  Terminal string typeface is typewriter
+% |tsrm| \>  Terminal string typeface is roman\\
+% |tstt| \>  Terminal string typeface is typewriter (default)
 % \end{tabbing}
 % \vspace{-1ex}
 %
 % \noindent
 % The defaults are: the empty string symbol is $\lambda$, 
-% and the terminal string typeface is normal (roman).
+% and the terminal string typeface is typewriter.
 % 
 % \subsection{Environments}
 %
@@ -216,8 +215,14 @@
 %   |\bnfprod{|<production name>|}{|<production definition>|}|
 % \end{quote}	
 %
-% \subsection{Production definitions}
+% \DescribeMacro{\bnfmore}
+% A production can be continued on addition lines by |\bnfmore|, which takes one argument: 
+% \begin{quote}
+%   |\bnfmore{|<production definition>|}|
+% \end{quote}	
 %
+% \subsection{Production definitions}\label{prodef}
+%
 % The following commands are used to compose the right hand side of a production.
 % They are deployed in the second argument of the |\bnfprod| command.
 %
@@ -234,12 +239,13 @@
 % \end{minipage}
 % \end{quote}
 %
+% There are three types of terminal item: a literal string, a descriptive phrase and an empty string.
 % \DescribeMacro{\bnftm}
-% There are three types of terminal item: a literal string, a descriptive phrase and an empty string.
+% A literal terminal string is specified by the |\bnftm| command, which takes a single argument.
+% By default literal terminal strings are printed in typewriter font, but this can be changed as a package option  (see \S\ref{packopts}).
 % \DescribeMacro{\bnftd}
-% A literal terminal string is specified by the |\bnftm| command, which takes a single argument.
+% The |\bnftd| command generates a descriptive phrase, as an alternative to a literal string.  
 % \DescribeMacro{\bnfes}
-% The |\bnftd| command generates a descriptive phrase, as an alternative to a literal string.  
 % The |\bnfes| command generates a token that represents the empty string. 
 % This is normally $\bnfes$, but it can be changed as a package option (see \S\ref{packopts}).
 % \begin{quote}
@@ -287,6 +293,7 @@
 %
 % \subsection{Inline expressions}
 %
+% \DescribeMacro{\bnfpn}
 % The package's definition commands can be typeset inline using maths mode, 
 % so the expression |$\bnfpn{name}$| will give $\bnfpn{name}$.
 %
@@ -295,16 +302,6 @@
 % can be printed independently from the |bnf| environment if required.
 % The |\bnfprod| command cannot be used inline.
 %
-% \DescribeMacro{\bnfpo}
-% The |\bnfpo| command is provided so that the production operator $\bnfpo$ 
-% can be printed independently from the |bnf| environment if required.
-% The |\bnfprod| command cannot be used inline.
-%
-% \DescribeMacro{\bnfpo}
-% The |\bnfprod| command cannot be used inline.
-% So the |\bnfpo| command is provided so that the production operator $\bnfpo$ 
-% can be printed independently from the |bnf| environment if required.
-%
 % \subsection{Command summary}
 %
 % The commands that can be used to define a BNF production in a |bnf| or |bnf*| environment 
@@ -351,16 +348,17 @@
 %   \bnfprod{wchar}
 %      {\bnfpn{cchar}  \bnfor \bnfpn{ichar} }\\
 %   \bnfprod{cchar}
-%      {\bnfts{A} \bnfsk \bnfts{Z} \bnfor \bnfts{a} \bnfsk \bnfts{z} 
-%       \bnfor \bnfts{0} \bnfsk \bnfts{9} \bnfor 
+%      {\bnfts{A} \bnfsk \bnfts{Z} \bnfor \bnfts{a} \bnfsk 
+%       \bnfts{z} \bnfor \bnfts{0} \bnfsk \bnfts{9} \bnfor 
 %       \bnfts{\textquotesingle}}\\
 %   \bnfprod{ichar}  
 %      {-}\\
 %   \bnfprod{schar}
 %      {\bnfts{`\hspace{1em}'} \bnfor \bnfts{!} \bnfor \bnfts{"} 
-%       \bnfor \bnfts{(} \bnfor \bnfts{)} \bnfor \bnfts{\{} \bnfor
-%       \bnfts{\}} \bnfor \bnfts{:} \bnfor \bnfts{;} \bnfor \bnfts{?}
-%       \bnfor \bnfts{,}}\\
+%       \bnfor \bnfts{(}  \bnfor \bnfts{)} \bnfor \bnfts{\{} 
+%       \bnfor \bnfts{\}} \bnfor }\\
+%   \bnfmore{\bnfts{:} \bnfor \bnfts{;} \bnfor \bnfts{?} \bnfor
+%            \bnfts{,} }
 %\end{bnf*}
 %\end{verbatim}
 % \end{samepage}
@@ -367,40 +365,40 @@
 %
 % \noindent
 % This creates the following BNF definition:
-% \begin{bnf*}
-% \bnfprod{sentence}
-%    {\bnfpn{start} \bnfsp \bnfpn{rest} \bnfsp \bnfts{.}}\\
-% \bnfprod{start}  
-%    {\bnfpn{space} \bnfor \bnfes}\\
-% \bnfprod{rest}   
-%    {\bnfpn{word} \bnfsp \bnfpn{space} \bnfsp \bnfpn{rest} 
-%     \bnfor \bnfpn{word} \bnfor \bnfes }\\
-% \bnfprod{word}  
-%    {\bnfpn{wchar} \bnfsp \bnfpn{word} \bnfor \bnfpn{wchar}}\\
-% \bnfprod{space}  
-%    {\bnfpn{schar} \bnfsp \bnfpn{space} \bnfor \bnfpn{schar}}\\
-% \bnfprod{wchar}
-%    {\bnfpn{cchar}  \bnfor \bnfpn{ichar} }\\
-% \bnfprod{cchar}
-%    {\bnfts{A} \bnfsk \bnfts{Z} \bnfor \bnfts{a} \bnfsk 
-%     \bnfts{z} \bnfor \bnfts{0} \bnfsk \bnfts{9} \bnfor 
-%     \bnfts{\textquotesingle} }\\
-% \bnfprod{ichar}  
-%    {-}\\
-% \bnfprod{schar}
-%    {\bnfts{`\hspace{1em}'} \bnfor \bnfts{!} \bnfor \bnfts{"} 
-%     \bnfor \bnfts{(}  \bnfor \bnfts{)} \bnfor \bnfts{\{} 
-%     \bnfor \bnfts{\}} \bnfor \bnfts{:} \bnfor \bnfts{;}  
-%     \bnfor \bnfts{?}  \bnfor \bnfts{,} }
-% \end{bnf*}
+%\begin{bnf*}
+%   \bnfprod{sentence}
+%      {\bnfpn{start} \bnfsp \bnfpn{rest} \bnfsp \bnfts{.}}\\
+%   \bnfprod{start}  
+%      {\bnfpn{space} \bnfor \bnfes}\\
+%   \bnfprod{rest}   
+%      {\bnfpn{word} \bnfsp \bnfpn{space} \bnfsp \bnfpn{rest} 
+%       \bnfor \bnfpn{word} \bnfor \bnfes }\\
+%   \bnfprod{word}  
+%      {\bnfpn{wchar} \bnfsp \bnfpn{word} \bnfor \bnfpn{wchar}}\\
+%   \bnfprod{space}  
+%      {\bnfpn{schar} \bnfsp \bnfpn{space} \bnfor \bnfpn{schar}}\\
+%   \bnfprod{wchar}
+%      {\bnfpn{cchar}  \bnfor \bnfpn{ichar} }\\
+%   \bnfprod{cchar}
+%      {\bnfts{A} \bnfsk \bnfts{Z} \bnfor \bnfts{a} \bnfsk 
+%       \bnfts{z} \bnfor \bnfts{0} \bnfsk \bnfts{9} \bnfor 
+%       \bnfts{\textquotesingle} }\\
+%   \bnfprod{ichar}  
+%      {-}\\
+%   \bnfprod{schar}
+%      {\bnfts{`\hspace{1em}'} \bnfor \bnfts{!} \bnfor \bnfts{"} 
+%       \bnfor \bnfts{(}  \bnfor \bnfts{)} \bnfor \bnfts{\{} 
+%       \bnfor \bnfts{\}} \bnfor }\\
+%   \bnfmore{\bnfts{:} \bnfor \bnfts{;} \bnfor \bnfts{?} \bnfor
+%            \bnfts{,} }
+%\end{bnf*}
 %
-%
 %^^A-------------------------------------------------------------------
 %^^A Start code implementation
 %^^A-------------------------------------------------------------------
 %
-% \StopEventually{}
-%^^A \StopEventually{\PrintChanges}
+%^^A \StopEventually{}
+% \StopEventually{\PrintChanges}
 %^^A    -> Run pdfLaTeX backnaur.dtx
 %^^A           makeindex -s gglo.ist -o backnaur.gls backnaur.glo
 %^^A           pdfLaTeX backnaur.dtx
@@ -409,6 +407,7 @@
 %^^A           makeindex -s gind.ist -o backnaur.ind backnaur.idx
 %^^A           pdfLaTeX backnaur.dtx
 %
+% \newpage
 % \section{Implementation}
 %
 % The implementation of |backnaur.sty| uses only \LaTeX{} commands. 
@@ -474,9 +473,10 @@
 %    \changes{v1.1}{2012/12/12}{Support for {\tt tstt} option added}
 % \begin{macro}{\bnf at tsfont}
 %    Terminal string. The font is controlled by the |\bnf at tsfont| macro,
-%    and this macro can be redefined by the |tstt| option (see \S\ref{codeoptions}).
+%    and this macro can be redefined by the |tsrm| option (see \S\ref{codeoptions}).
+%    The default is typewriter font.
 %    \begin{macrocode}
-\newcommand\bnf at tsfont[1]{\textrm{#1}}
+\newcommand\bnf at tsfont[1]{\texttt{#1}}
 \newcommand{\bnfts}[1]{\textnormal{\bnf at tsfont{#1}}}
 %    \end{macrocode}
 % \end{macro}
@@ -515,15 +515,37 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\bnfmore}
+%    \changes{v2.0}{2019/04/07}
+%            {Added macro.}
+%    A continuation of a Backus-Naur Form production. 
+%    This command is designed to exploit the behaviour the |equarray| used in 
+%    the |bnf| and |bnf*| environments to correctly align with preceding 
+%    |\bnfprod| and |\bnfmore| macros. 
+%    \begin{macrocode}
+\newcommand{\bnfmore}[1]{ &  & #1}
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Options}\label{codeoptions}
 %
 % \begin{macro}{tstt}
-%    \changes{v1.1}{2012/12/12}{New option declared}
+%    \changes{v1.1}{2012/12/12}{New option}
+%    \changes{v2.0}{2019/04/14}{Changed to be default}
+%    The |tstt| option is the default, so it does nothing. 
+%    This option is provided for compatibility with previous versions. 
+%    \begin{macrocode}
+\DeclareOption{tstt}{}    
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{tsrm}
+%    \changes{v2.0}{2019/04/14}{New option}
 % \begin{macro}{\bnf at tsfont}
-%    The |tstt| option redefines |\bnf at tsfont| to change the 
-%    terminal string font used in the |\bnfts| command (see \S\ref{codebnfts}):
+%    The |tsrm| option redefines |\bnf at tsfont| to change the 
+%    terminal string font used in the |\bnfts| command (see \S\ref{codebnfts}) to roman font.
 %    \begin{macrocode}
-\DeclareOption{tstt}{\renewcommand\bnf at tsfont[1]{\texttt{#1}}}
+\DeclareOption{tsrm}{\renewcommand\bnf at tsfont[1]{\textrm{#1}}}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/backnaur/backnaur.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/backnaur/backnaur.ins	2019-05-05 17:39:20 UTC (rev 51000)
+++ trunk/Master/texmf-dist/source/latex/backnaur/backnaur.ins	2019-05-05 17:39:35 UTC (rev 51001)
@@ -1,5 +1,5 @@
 % backnaur.ins
-% 15 November 2012
+% 7 April 2019
 %
 %    Installation file for the backnaur package.
 %
@@ -9,7 +9,7 @@
 %    Run LaTeX on backnaur.dtx to produce the package 
 %    documentation.
 %
-% Copyright (C) 2012 by Adrian P Robson
+% Copyright (C) 2019 by Adrian P Robson
 %     adrian.robson at nepsweb.co.uk
 %
 % This work may be distributed and/or modified under the
@@ -34,7 +34,7 @@
 
 \preamble
 
-Copyright (C) 2012 by Adrian P Robson
+Copyright (C) 2019 by Adrian P Robson
    adrian.robson at nepsweb.co.uk
 
 This work may be distributed and/or modified under the

Modified: trunk/Master/texmf-dist/tex/latex/backnaur/backnaur.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/backnaur/backnaur.sty	2019-05-05 17:39:20 UTC (rev 51000)
+++ trunk/Master/texmf-dist/tex/latex/backnaur/backnaur.sty	2019-05-05 17:39:35 UTC (rev 51001)
@@ -6,7 +6,7 @@
 %%
 %% backnaur.dtx  (with options: `package')
 %% 
-%% Copyright (C) 2012 by Adrian P Robson
+%% Copyright (C) 2019 by Adrian P Robson
 %%    adrian.robson at nepsweb.co.uk
 %% 
 %% This work may be distributed and/or modified under the
@@ -25,7 +25,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2011/06/27]
 \ProvidesPackage{backnaur}
-[2012/12/12 1.1 Typesetting for Backus-Naur Form (BNF) definitions]
+[2019/04/14 2.0 Typesetting for Backus-Naur Form (BNF) definitions]
 \newenvironment{bnf}%
 {\begin{eqnarray}}%
 {\end{eqnarray}\ignorespacesafterend}
@@ -36,13 +36,15 @@
 \newcommand{\bnfor}{\; \mid \;}
 \newcommand{\bnfsp}{\;}
 \newcommand{\bnfes}{\lambda}
-\newcommand\bnf at tsfont[1]{\textrm{#1}}
+\newcommand\bnf at tsfont[1]{\texttt{#1}}
 \newcommand{\bnfts}[1]{\textnormal{\bnf at tsfont{#1}}}
 \newcommand{\bnftd}[1]{\textnormal{\it #1}}
 \newcommand{\bnfsk}{\dots}
 \newcommand{\bnfpo}{\models}
 \newcommand{\bnfprod}[2]{\bnfpn{#1} & \bnfpo & #2}
-\DeclareOption{tstt}{\renewcommand\bnf at tsfont[1]{\texttt{#1}}}
+\newcommand{\bnfmore}[1]{ &  & #1}
+\DeclareOption{tstt}{}
+\DeclareOption{tsrm}{\renewcommand\bnf at tsfont[1]{\textrm{#1}}}
 \DeclareOption{perp}{\renewcommand{\bnfes}{\perp}}
 \DeclareOption{epsilon}{\renewcommand{\bnfes}{\epsilon}}
 \ProcessOptions\relax



More information about the tex-live-commits mailing list