texlive[68021] Master/texmf-dist: numerica (23aug23)

commits+karl at tug.org commits+karl at tug.org
Wed Aug 23 00:46:17 CEST 2023


Revision: 68021
          http://tug.org/svn/texlive?view=revision&revision=68021
Author:   karl
Date:     2023-08-23 00:46:17 +0200 (Wed, 23 Aug 2023)
Log Message:
-----------
numerica (23aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/numerica/README.txt
    trunk/Master/texmf-dist/doc/latex/numerica/numerica.pdf
    trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex
    trunk/Master/texmf-dist/tex/latex/numerica/numerica.sty

Modified: trunk/Master/texmf-dist/doc/latex/numerica/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/numerica/README.txt	2023-08-22 22:46:08 UTC (rev 68020)
+++ trunk/Master/texmf-dist/doc/latex/numerica/README.txt	2023-08-22 22:46:17 UTC (rev 68021)
@@ -9,11 +9,18 @@
 http://www.latex-project.org/lppl.txt
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The underlying aim of the numerica package is to numerically
+evaluate mathematical expressions in the LaTeX form in which 
+they are typeset. Version 3.0.0 of numerica requires a LaTeX
+distribution from October 2020 or later (when xparse became 
+available in LaTeX2e systems), as well as the packages 
+amsmath and mathtools. 
 
-This is version 2.1.0 of the numerica package. It fixes a 
-bug in version 2.0.0 arising from the introduction of the 
-\int_if_zero:nTF conditionals into the LaTeX kernel.See 
-numerica.pdf for details on how to use the package.
+V.3.0.0 allows use of the decimal comma, evaluates multiple 
+expressions within the one \eval command, and can output 
+results in the form of fractions. See the documentation, 
+numerica.pdf, on these (and many other) enhancements, and 
+for how to use the package.
 
 Manifest
 %%%%%%%%

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

Modified: trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex	2023-08-22 22:46:08 UTC (rev 68020)
+++ trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex	2023-08-22 22:46:17 UTC (rev 68021)
@@ -8,7 +8,6 @@
 \usepackage{textcomp}
 \usepackage[utf8]{inputenc}
 \setcounter{secnumdepth}{3}
-\setcounter{tocdepth}{3}
 \usepackage{color}
 \definecolor{shadecolor}{rgb}{0.667969, 1, 1}
 \usepackage{babel}
@@ -18,6 +17,8 @@
 \usepackage{booktabs}
 \usepackage{framed}
 \usepackage{url}
+\usepackage{multirow}
+\usepackage{varwidth}
 \usepackage{amsmath}
 \usepackage{amssymb}
 \usepackage[pdfusetitle,
@@ -30,6 +31,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
 \providecommand{\LyX}{\texorpdfstring{\ensureascii{%
   L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}}{LyX}}
+\newcommand{\noun}[1]{\textsc{#1}}
 \DeclareRobustCommand*{\lyxarrow}{%
 \@ifstar
 {\leavevmode\,$\triangleleft$\,\allowbreak}
@@ -36,106 +38,138 @@
 {\leavevmode\,$\triangleright$\,\allowbreak}}
 %% Because html converters don't know tabularnewline
 \providecommand{\tabularnewline}{\\}
+%% Variable width box for table cells
+\newenvironment{cellvarwidth}[1][t]
+    {\begin{varwidth}[#1]{\linewidth}}
+    {\@finalstrut\@arstrutbox\end{varwidth}}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
 \newenvironment{centred}%
   {\begin{center}}{\end{center}}
-\newenvironment{lyxcode}
-	{\par\begin{list}{}{
-		\setlength{\rightmargin}{\leftmargin}
-		\setlength{\listparindent}{0pt}% needed for AMS classes
-		\raggedright
-		\setlength{\itemsep}{0pt}
-		\setlength{\parsep}{0pt}
-		\normalfont\ttfamily}%
-	 \item[]}
-	{\end{list}}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
-\usepackage{babel}
 \usepackage{numerica}
+\usepackage{mleftright}
+\usepackage{upquote}
+\usepackage{xfrac}
+\usepackage{xurl}
 
-
-
-\usepackage{upquote}
-\newcommand{\rel}{\,\varrho\;}
+\newcommand\rel{\,\varrho\;}
 \DeclareMathOperator{\erf}{erf}
 \DeclareMathOperator{\gd}{gd}
 
 \reuse{}
+\newcommand\vsp{\vphantom{I^{I^I}}}
+\newcommand\dsp{\vphantom{I_{I_I}}}
 
 \makeatother
 
 \begin{document}
 \title{\texttt{numerica}~\\
- {\large version 2.1.0}}
+{\large version 3.0.0}}
 \author{Andrew Parsloe\\
- (\url{ajparsloe at gmail.com})\\
- }
+(\url{ajparsloe at gmail.com})}
 \maketitle
 \begin{abstract}
-The \texttt{numerica} package defines a command to numerically evaluate
-mathematical expressions in the LaTeX form in which they are typeset.
-For programs like LyX with a preview facility, or compile-as-you-go
+The \texttt{numerica} package defines a command \verb`\nmcEvaluate`
+(short-name form \verb`\eval`) to wrap around mathematical expressions
+in the LaTeX form in which they are typeset and numerically evaluate
+them. For programs (like \LyX ) with a preview facility, or for compile-as-you-go
 systems, interactive back-of-envelope calculations and numerical exploration
-are possible within the document being worked on. The package requires
-the bundles \texttt{l3kernel} and \texttt{l3packages}, and the \texttt{amsmath}
-and \texttt{mathtools} packages. 
+are possible within the document being worked on. 
 \end{abstract}
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+\begin{itemize}
+\item This document applies to version 3.0.0 of \texttt{numerica}.
+\item \texttt{numerica} requires a \LaTeXe{} system from October 2020 or
+later (when \texttt{xparse} became available in \LaTeXe{} systems).
+\item The package requires \texttt{amsmath} and \texttt{mathtools}, is compatible
+with the \texttt{mleftright} and \texttt{xfrac} packages, and `knows
+about' some symbols from \texttt{amssymb}.
+\item I refer many times in this document to \emph{Handbook of Mathematical
+Functions}, edited by Milton Abramowitz and Irene A. Stegun, Dover,
+1965, abbreviated to \emph{HMF}, and often followed by a number like
+1.2.3 to locate the actual expression referenced.
+\item Version 3.0.0 of \texttt{numerica}
+\begin{itemize}
+\item dispenses with a configuration file (\verb`numerica.cfg`) but adds
+three package options:
+\begin{itemize}
+\item \verb`comma` sets the comma as the decimal point; items in the variable=value
+list must then be separated by semicolons;
+\item \verb`rounding`=$n$ sets the default rounding value to the integer
+$n$;
+\item \verb`approx` replaces the default \verb`=` between formula and
+result in displays with \verb`\approx` ($\approx$);
+\end{itemize}
+\item enables outputting results as (approximate) fractions with integer
+numerators and denominators in both slash and \verb`\frac` forms;
+\item allows use of \LaTeX{} braces for delimiting arguments to functions
+like \verb`\sin` and \verb`\cos` to handle complicated arguments
+in (e.g.) Fourier series; the previous \texttt{()=0}, \texttt{1},
+\texttt{2} setting for this is removed;
+\item enables multiple formulas to be evaluated within the one \verb`\eval`
+command; and
+\item provides enhanced treatment of mathematical environments for the presentation
+of results, especially for such multiple evaluations, with the \verb`env`
+key in the settings option (which makes the \verb`*` key obsolete);
+\item defines a \verb`\degree` command and uses it as an alternative to
+the \verb`o` setting for specifying angles in degrees;
+\item allows nested commands to be evaluated to a specified rounding value
+(rather than insisting that they be evaluated to maximum precision);
+\item accepts the use of spaces to group blocks of digits in numbers in
+the variable=value list and formula (with the setting \verb`1s2=1`);
+\item resolves the `leading space' issue with the \verb`\macros` command
+when a user-defined macro begins with an expandable token;
+\item \emph{continues \ldots}
+\end{itemize}
+\end{itemize}
+\end{shaded}%
+\end{minipage}
+
 \noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
-
-\paragraph*{Note:}
 \begin{itemize}
-\item This document applies to version 2.1.0 of \texttt{numerica.sty}. 
-\item Reasonably recent versions of the \LaTeX 3 bundles \texttt{l3kernel}
-and \texttt{l3packages} are required (although much of \texttt{l3kernel}
-has been incorporated into \LaTeXe{} since February 2020). 
-\item The package requires \texttt{amsmath} and \texttt{mathtools}. 
-\item I refer many times in this document (especially §\ref{sec:Argument-parsing})
-to \emph{Handbook of Mathematical Functions}, edited by Milton Abramowitz
-and Irene A. Segun, Dover, 1965. This is abbreviated to \emph{HMF},
-often followed by a number like 1.2.3 to locate the actual expression
-referenced. 
-\item Version 2.1.0 of \texttt{numerica} fixes a conflict arising from the
-recent (May 2023) introduction of the \texttt{\textbackslash int\_if\_zero:nTF}
-conditionals into the \LaTeX{} kernel. 
-\item Version 2.0.0 of \texttt{numerica} 
+\item Version 3.0.0 of \texttt{numerica}~\emph{(continued)}
 \begin{itemize}
-\item splits into distinct packages the additional functionality previously
-available with the \texttt{plus} and \texttt{tables} package options
-of version 1; 
-\item allows for user-defined macros and constants (with the \texttt{\textbackslash nmcMacros
-}and \texttt{\textbackslash nmcConstants} commands) to be used in
-expressions to be evaluated; 
-\item rewrites the code and changes the behaviour of \texttt{\textbackslash nmcReuse}
-to maintain uniformity across all commands (\texttt{\textbackslash nmcEvaluate},
-\texttt{\textbackslash nmcInfo}, \texttt{\textbackslash nmcMacros},
-\texttt{\textbackslash nmcConstants}, \texttt{\textbackslash nmcReuse});
-this command is no longer compatible with its use in v.1; 
-\item changes the behaviour of \texttt{\textbackslash text} and \texttt{\textbackslash mbox}
-in the \texttt{\textbackslash eval} command; adds \texttt{\textbackslash textrm},
-\texttt{\textbackslash textsf}, and \texttt{\textbackslash texttt}
-to compensate; 
-\item includes many adjustments to the code, including around nesting of
-commands; 
-\item adds to and amends documentation.
+\item reworks (again!) the \verb`\reuse` command to simplify its use, and
+\item removes the \verb`reuse` \emph{setting} of \verb`\eval` (not the
+command); now \emph{only} the numerical result is saved, either as
+a decimal or in scientific notation or in fraction form (but without
+math delimiters or variable=value list);
+\item adds the \LaTeX{} form of a result to the debug display (\verb`dbg=11`);
+\item adds warnings with line numbers to the \LaTeX{} log file for \texttt{numerica}
+errors (which continue to be displayed in the pdf);
+\item accepts the use of \verb`a-`, \verb`ar-` or \verb`arc-` prefixes
+for the inverses of all six hyperbolic functions so that, for instance,
+\verb`\asinh`, \verb`\arsinh`, and \verb`\arcsinh`, displaying
+as $\asinh$, $\arsinh$ and $\arcsinh$, can be used (rather than
+only \verb`\asinh` as before);
+\item accepts the \verb`\sfrac` command from the \texttt{xfrac} package,
+producing elegant slash fractions like $\sfrac{355}{113}$;
+\item accepts commands of the \texttt{mleftright} package;
+\item accepts \verb`\mkern` and \verb`\mskip` commands in formulas;
+\item defines the commands \verb`\comma` and \verb`\equals` (expanding
+to \verb`,` and \verb`=`) for use in the settings option, as distinct
+from the `bare' marks used in formulas;
+\item fixes bugs that could occur: (i) when raising an $n$-th root to a
+power; (ii) when using a dot with \verb`\left`, \verb`\right`; and
+(iii) when using a non-integer in the first argument of \verb`\binom`;
+\item amends and adds to documentation.
 \end{itemize}
 \end{itemize}
 \end{shaded}%
 \end{minipage}
-\begin{center}
-\tableofcontents{} 
-\par\end{center}
 
+\tableofcontents{}
+
 \chapter{Introduction}
 
-\texttt{numerica} is a \LaTeX{} package offering the ability to numerically
-evaluate mathematical expressions in the \LaTeX{} form in which they
-are typeset.\footnote{\texttt{numerica} evolved from the author's \texttt{calculyx} package
-that was designed for use with the document processor \LyX{} (and available
-for download from a link on the \LyX{} wiki website but not CTAN). }
+\label{chap:Introduction}\texttt{numerica} is a \LaTeX{} package offering
+the ability to numerically evaluate mathematical expressions in the
+\LaTeX{} form in which they are typeset.
 
 There are a number of packages which can do calculations in \LaTeX ,\footnote{A simple search finds the venerable \texttt{calc} in the \LaTeX{} base,
 \texttt{calculator }(including an associated \texttt{calculus} package),
@@ -147,10 +181,10 @@
 kernel, and \texttt{xfp}, the \LaTeX 3 interface to \texttt{l3fp}.
 Other packages include a calculational element but are restricted
 in their scope. (\texttt{longdivision} for instance is elegant, but
-limited only to long division.) } but those I am aware of all require the mathematical expressions
+limited only to long division.)} but those I am aware of all require the mathematical expressions
 they operate on to be changed to an appropriate syntax. Of these packages
 \texttt{xfp} comes closest to my objective with \texttt{numerica}.
-For instance, given a formula 
+For instance, given a formula
 \begin{centred}
 \verb`\frac{\sin (3.5)}{2} + 2\cdot 10^{-3}`
 \end{centred}
@@ -157,21 +191,24 @@
 (in a math environment), this can be evaluated using \texttt{xfp}
 by transforming the expression to \verb`sin(3.5)/2 + 2e-3` and wrapping
 this in the command \verb`\fpeval`. In \texttt{numerica} you don't
-need to transform the formula, just wrap it in an \verb`\eval` command: 
+need to transform the formula, just wrap it in an \verb`\eval` command:
 \begin{centred}
 \verb`\eval{ \frac{\sin (3.5)}{2} + 2\cdot 10^{-3} }`.
 \end{centred}
-\noindent (for the acutal calculation see §\ref{subsec:introSimple-examples}).\texttt{ }
+(For the actual calculation see §\ref{subsec:introBasicProcedure}.)\texttt{ }
 
 \texttt{numerica}, like \texttt{xfp} and a number of other packages,
-uses \texttt{l3fp} (the \LaTeX 3 floating point module in \texttt{l3kernel})
-as its calculational engine. To some extent the main command, \verb`\nmcEvaluate`,
-short-name form \verb`\eval`, is a pre-processor to \texttt{l3fp},
-converting mathematical expressions written in the \LaTeX\texttt{
-}form in which they will be typeset into an `fp-ified' form that is
-digestible by \texttt{l3fp}. The aim is to make the command act as
-a wrapper around such formulas. Ideally, one should not have to make
-\emph{any} adjustment to them, although any text on Fourier series
+uses \texttt{l3fp} (the \LaTeX 3 floating point module in \texttt{l3kernel}
+and since February 2020 available in \LaTeXe{} distributions) as its
+calculational engine. The main command of the package, \verb`\nmcEvaluate`,
+short-name form \verb`\eval`, in many ways acts as a pre-processor
+to \texttt{l3fp}, converting mathematical expressions written in the
+\LaTeX\texttt{ }form in which they will be typeset into an `fp-ified'
+form that is digestible by \texttt{l3fp}. The aim is for the command
+to act as a wrapper around \LaTeX{} formulas, processing them into
+a form that is digestible by \texttt{l3fp} and allows compilation
+to \texttt{pdf} to take place. Ideally, one should not have to make
+\emph{any} adjustment to a formula, although any text on Fourier series
 suggests that hope in full generality is delusional. Surprisingly
 often however it \emph{is} possible. We shall see shortly that even
 complicated formulas like
@@ -179,7 +216,7 @@
 \[
 \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)\frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi},
 \]
-and 
+and
 \[
 \left(\frac{1-4\sin^{2}\tfrac{m}{3n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi}\right)\sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi,
 \]
@@ -186,253 +223,647 @@
 
 \noindent can be evaluated `as is' (see below, §\ref{subsec:introReassurance}).
 There is no need to shift the position of the superscript $2$ on
-the sines, no need to parenthesize the arguments of $\sin$ and $\cos$,
-no need to insert asterisks to indicate multiplication, no need to
-change the \noindent\verb`\frac` and \noindent\verb`\tfrac`-s to
-slashes, \texttt{/}, no need to delete the \noindent\verb`\left`
-and \noindent\verb`\right` that qualify the big parentheses (in the
-underlying \LaTeX ) in the second expression. Of course, if there
-are variables in an expression, as in these examples, they will need
-to be assigned values. And how the result of the evaluation is presented
-also requires specifying, but the aim is always: to evaluate mathematical
-expressions in \LaTeX{} with as little adjustment as possible to the
-form in which they are typeset.
+the sines, no need to parenthesize the arguments of \verb`\sin` and
+\verb`\cos`, no need to insert asterisks to indicate multiplication,
+no need to change the \verb`\frac` and \verb`\tfrac`-s to slashes,
+\texttt{/}, and in the second expression no need to delete the \verb`\left`
+and \verb`\right` that qualify the big parentheses (in the underlying
+\LaTeX ). Of course, if there are variables in an expression, as in
+these examples, they will need to be assigned values; that is unavoidable.
+And how the result of the evaluation is displayed also requires specifying,
+but the aim is always: to evaluate mathematical expressions in \LaTeX{}
+with as little adjustment as possible to the form in which they are
+typeset.
 
 \texttt{numerica} is written in \texttt{expl3}, the programming language
-of the \LaTeX 3 project. It uses the \LaTeX 3 module \texttt{l3fp}
-(part of \texttt{l3kernel}) as its calculational engine. This enables
-floating point operations to 16 significant figures, with exponents
-ranging between $-10000$ and $+10000$. Many functions and operations
-are built into \texttt{l3fp} -- arithmetic operations, trigonometric,
-exponential and logarithm functions, factorials, absolute value, max
-and min. Others have been constructed for \texttt{numerica }from \texttt{l3fp}
-ingredients -- binomial coefficients, hyperbolic functions, sums
-and products -- but to the user there should be no discernible difference.
+of the \LaTeX 3 project, now incorporated into the \LaTeX{} kernel.
+It uses the \LaTeX 3 module \texttt{l3fp} (since early 2020 part of
+a standard \LaTeXe{} distribution) as its calculational engine. This
+enables floating point operations to 16 significant figures, with
+exponents ranging between $-10000$ and $+10000$. Many functions
+and operations are built into \texttt{l3fp} – arithmetic operations,
+trigonometric, exponential and logarithm functions, factorials, absolute
+value, max and min. Others have been constructed for \texttt{numerica
+}from \texttt{l3fp} ingredients – binomial coefficients, hyperbolic
+functions, sums and products – but to the user there should be no
+discernible difference. 
 
 Associated packages provide for additional operations: iteration of
 functions, finding zeros of functions, recurrence relations, mathematical
-table building; others are planned (e.g. calculus).
+table building.
 
 \section{How to use \texttt{numerica}}
 
-The package is invoked in the usual way: put 
-\begin{lyxcode}
-\textbackslash usepackage\{numerica\}
-\end{lyxcode}
+The package is invoked in the usual way: put
+\begin{verbatim}
+    \usepackage[<options>]{numerica}
+\end{verbatim}
 \noindent in the \LaTeX{} preamble. \texttt{numerica} requires the
 \texttt{amsmath} and \texttt{mathtools} packages and loads these automatically.
-\texttt{numerica} will also accept use of some relational symbols
-from the \texttt{amssymb} package provided that package is loaded
-by the user; see §\ref{subsec:evalBoolean-output}.
+\texttt{numerica} will also accept use of some relation symbols from
+the \texttt{amssymb} package (see §\ref{subsec:evalBoolean-output}),
+all commands from the \texttt{mleftright} package, and the \verb`\sfrac`
+command from \texttt{xfrac} (part of the \texttt{l3packages} bundle),
+provided these last three packages have been loaded by the user. 
 
 \subsection{Package options}
 
-\label{subsec:introPackagesOptions}Currently there are none. With
-version 2.0.0 of \verb`numerica` a change has been made to how additional
-functionality for the package is invoked; see §\ref{subsec:Related-packages}
-below. This means that the options available in version 1 have been
-discontinued.
+\label{subsec:introPackagesOptions}Version 2 of \texttt{numerica}
+had no package options. The options available in version 1 that gave
+access to commands for iteration, finding zeros, math-table making,
+etc., were discontinued. That functionality became available in associated
+but separate \LaTeX{} packages (see below §\ref{subsec:introAssociated-packages}).
+With version 3.0.0 some  package options have been added and the possible
+use of a configuration file dispensed with. The current options available
+with version 3.0.0 are:
+\begin{itemize}
+\item \verb`comma` If present, a decimal point is denoted by a comma (more
+exactly, an unspaced comma). If absent, a decimal point is denoted
+by a dot (period, full stop, also unspaced). The choice – \verb`comma`
+present, \verb`comma` absent – has consequences for the item separator
+in the variable=value list and $n$-ary functions (see §\ref{subsec:introDecPtItemSeps}),
+and the item separator in the main argument of the \verb`\eval`,
+\verb`\macros` and \verb`\constants` commands; see below §\ref{subsec:introDecPtItemSeps}. 
+\begin{itemize}
+\item `Out of the box' the \verb`comma` option is not used and the decimal
+point is a dot.
+\end{itemize}
+\item \verb`rounding=<integer>` The rounding value. The value of \verb`<integer>`
+determines how many digits after the decimal point are displayed in
+numerical results (see §\ref{subsec:evalRounding-value}). `Out of
+the box' the value is set to $6$. 
+\item \verb`approx` sets the default relation linking \emph{formula} and
+\emph{result} in displays from \verb`=` to \verb`\approx` (displaying
+as $\approx$). (The \verb`eq` setting (§\ref{subsec:settingsRelationSymbol})
+is available to change the relation for individual calculations.)
+\end{itemize}
+Thus a possible invocation of \texttt{numerica} might be
+\begin{verbatim}
+    \usepackage[comma,rounding=4,approx]{numerica}
+\end{verbatim}
+meaning that the decimal point is an unspaced comma, the default rounding
+value is $4$, and \verb`\approx` is inserted between formula and
+numerical result in (some) displays. Alternatively,
+\begin{verbatim}
+    \usepackage{numerica}
+\end{verbatim}
+means the decimal point is an unspaced dot, the rounding value is
+$6$, and the display of (some) results is in the form \emph{formula=result}.
+\textbf{This is how} \texttt{\textbf{numerica}} \textbf{is invoked
+for the present document.}
 
-\subsection{Associated packages}
+\subsubsection{\texttt{numerica.cfg}}
 
-\label{subsec:Related-packages}In version 1 of \verb`numerica` some
-additional functionality for the package could be gained by specifying
-package options -- for instance the ability to create tables of function
-values or to iterate or find fixed points of functions. However this
-manner of invoking the addtional functionality makes the maintaining
-of semantic version numbering across the whole \verb`numerica` package
-difficult. With version 2.0.0 of the package, the addtional functionality
-has been separated into separate \LaTeX{} packages. Currently there
-are two of these, \verb`numerica-plus` and \verb`numerica-tables`.
-They are loaded with the familiar \verb`\usepackage` command in the
-document preamble and require the availability of the \verb`numerica`
-package in your \TeX{} distribution. Neither package requires a \verb`\usepackage{numerica}`
-statement; they take care of that themselves. So, if you enter 
-\begin{lyxcode}
-\textbackslash usepackage\{numerica-plus\}
-\end{lyxcode}
-in the preamble of your document you gain access not only to the commands
-in the \verb`numerica` package but also to the commands \verb`\nmcIterate`,
-\verb`\nmcSolve`, and \verb`\nmcRecur`. \verb`\nmcIterate` enables
-the iteration of functions of a single variable, including finding
-fixed points. \verb`\nmcSolve` enables the solving of equations of
-the form $f(x)=0$ (i.e. finding the zeros of $f$), or the finding
-of local maxima or minima of a function of one variable. \verb`\nmcRecur`
+Previous versions of \texttt{numerica} supported use of a configuration
+file for setting various default values. With version 3.0.0, this
+has been dispensed with. Now, \texttt{numerica} supports (currently)
+the three package options mentioned. On review, most of the \texttt{.cfg}
+settings did not feel like ones that realistically qualified as package-level
+settings. For calculation-level default values, see Chapter~\ref{chap:settingsSettings}.
+
+\subsubsection{Associated packages}
+
+\label{subsec:introAssociated-packages}Currently there are two of
+these, \texttt{numerica-plus} and \texttt{numerica-tables}. They are
+loaded with the familiar \verb`\usepackage` command in the document
+preamble and require \texttt{numerica} to be loaded. This is different
+from version 2 where calling \texttt{numerica-plus} or \texttt{numerica-tables}
+automatically loaded \texttt{numerica}.\texttt{ }I think it is clearer
+to do this in two explicit steps. Neither package will function without
+\texttt{numerica} loaded. Thus putting
+\begin{verbatim}
+    \usepackage[<options>]{numerica}
+    \usepackage{numerica-plus}
+\end{verbatim}
+in the preamble of your document gives access to the commands \verb`\nmcIterate`,
+\verb`\nmcSolve`, and \verb`\nmcRecur` of \texttt{numerica-plus}
+and of course also to the commands in \texttt{numerica}. \verb`\nmcIterate`
+enables the iteration of functions of a single variable, including
+finding fixed points and, by means of Newton-Raphson iteration, finding
+zeros. \verb`\nmcSolve` enables the solving of equations of the form
+$f(x)=0$ (i.e.\ finding zeros) by bisection, or the finding of local
+maxima or minima of a function of one variable. \verb`\nmcRecur`
 enables the calculation of terms in recurrence relations, like the
 terms of the Fibonacci series, or othogonal polynomials defined recurrently.
-See the associated document \verb`numerica-plus.pdf` for details.
+In all three cases, see the associated document \verb`numerica-plus.pdf`
+for details.
 
-If you enter 
-\begin{lyxcode}
-\textbackslash usepackage\{numerica-tables\}
-\end{lyxcode}
-in the preamble of your document you gain access not only to the commands
-in the \verb`numerica` package but also to the command \verb`\nmcTabulate`
+If you enter
+\begin{verbatim}
+    \usepackage[<options>]{numerica}
+    \usepackage{numerica-tables}
+\end{verbatim}
+in the preamble of your document you gain access to the command \verb`\nmcTabulate`,
 which enables the creation of (possibly multi-column) tables of function
-values and makes available most of the table formats evident in \emph{HMF}.
-See the associated document \verb`numerica-tables.pdf` for details.
+values and makes available most of the table formats used in \emph{HMF}
+(and also to the commands in \texttt{numerica}). See the associated
+document \verb`numerica-tables.pdf` for details. 
 
-\subsection{Simple examples of use}
+\subsection{Decimal point and item separators}
 
-\label{subsec:introSimple-examples}A simple example of use is provided
-by the document 
+\label{subsec:introDecPtItemSeps}From version 3.0.0 of \texttt{numerica}
+the trio of marks {\ttfamily\verb`.,;`} have different
+functions depending as the package is called without or with the \verb`comma`
+option. Without the comma option, the decimal point is a dot (period,
+full stop) and the variable=value list (§\ref{sec:evalVv-list}) is
+punctuated with commas. There is no ambiguity in a list like \verb`[g=9.81,u=1,t=0.5]`
+nor in the arguments of $n$-ary functions (§\ref{sec:calc-n-ary-functions})
+like \verb`\max`, \verb`\min`, \verb`\gcd`, e.g.\ \verb`\gcd(63,231)`,
+although the presence of such functions in the vv-list needs protective
+braces, e.g.\ \verb`[x={\min(\pi,e,\phi,\gamma)},y=2]`.
+
+But if the decimal point is a comma, then its use as a separator in
+these lists is problematic. For that reason, with the \verb`comma`
+package option, \texttt{numerica} uses a \emph{semicolon} to punctuate
+the variable=value list and the argument lists of $n$-ary functions:
+\verb`[g=9,81;u=1;t=0,5]`, \verb`\max(6,1;2e;\gamma\pi^2)`. This
+is in line with ISO 80000 Part 2, section 3 which reads: `A comma,
+semicolon or other appropriate symbol can be used as a separator between
+numbers or expressions. The comma is generally preferred, except when
+numbers with a decimal comma are used.' However, rather than the
+gently permissive language of the standard, \texttt{numerica} \emph{insists}
+on semicolons for separating items when the \verb`comma` package
+option is used.
+
+In summary, the trio of punctuation marks \verb`.,;` are used in
+\texttt{numerica} like this: when the \verb`comma` package option
+is \emph{not} used, the marks function as
+\begin{itemize}
+\item \verb`.` = decimal point
+\begin{itemize}
+\item also \LaTeX{} dot signifying `no delimiter' when used with \verb`\left`,
+\verb`\right` etc.
+\end{itemize}
+\item \verb`,` = item separator in the variable=value list
+\begin{itemize}
+\item also argument separator in $n$-ary functions (\verb`\max`, \verb`\min`,
+\verb`\gcd`)
+\item also formula separator in the main argument of \verb`\nmcEvaluate`
+for multi-formula calculations
+\end{itemize}
+\end{itemize}
+or, when the \verb`comma` package option \emph{is} used, as
+\begin{itemize}
+\item \verb`.` = \LaTeX{} dot signifying `no delimiter' when used with
+\verb`\left`, \verb`\right` etc.
+\item \verb`,` = decimal point
+\item \verb`;` = item separator in the variable=value list
+\begin{itemize}
+\item also argument separator in $n$-ary functions (\verb`\max`, \verb`\min`,
+\verb`\gcd`),
+\item also formula separator in the main argument of \verb`\nmcEvaluate`
+for multi-formula calculations
+\end{itemize}
+\end{itemize}
+Note, in both cases, that if a formula involves an $n$-ary function
+(at present only \verb`\max`, \verb`\min`, or \verb`\gcd`) then
+it's argument will need to be hidden in braces to avoid being interpreted
+as containing multi-formula separators. Alternatively (and better)
+there is a setting that allows a different character to be used as
+the multi-formula separator for a calculation, e.g. \verb`ff=|` ;
+see §\ref{subsec:introMult-formula-calculations} and §\ref{subsec:settingsMulti-formula-separator}.
+
+\subsection{Basic procedure}
+
+\label{subsec:introBasicProcedure}A simple example of how \texttt{numerica}
+is used is provided by the document
 \begin{verbatim}
     \documentclass{article} 
     \usepackage{numerica}
     \begin{document}
-        \eval{$ mc^2 $}[m=70,c=299 792 458][8x]
+      \eval{$ mc^2 $}[m=70,c=299792458][8x]
     \end{document}
 \end{verbatim}
-\noindent We have a formula between math delimiters: \noindent\verb`$ mc^2 $`.
-We have wrapped a command \noindent\verb`\eval` around the lot, added
-an optional argument in parentheses specifying numericaal values for
-the quantities \texttt{m} and \texttt{c}, and concluded it all with
-a trailing optional argument specifying that the result should be
-presented to $8$ places of decimals and in scientific notation (the
-\noindent\verb`x`). Running \texttt{pdflatex} on this document generates
-a pdf displaying 
+\noindent There is a formula, \verb`mc^2`, between math delimiters:
+\verb`$  $`. A command \verb`\eval{ }` is wrapped around these,
+and two square-bracketed optional arguments have been appended. In
+the first option numerical values are assigned to the quantities \verb`m`
+and \verb`c` occurring in the formula. The assignments are separated
+by a comma since the dot is being used as the decimal point in this
+document. The second option contains a cryptic specification of the
+format of the numerical result – to $8$ places of decimals, and in
+(proper) scientific notation – the \verb`x`. Running \texttt{pdflatex}
+on this document generates a pdf displaying
 \begin{centred}
-\noindent\noindent\eval{$ mc^2 $}[m=70,c=299 792 458][8x]
+\eval{$ mc^2$}[m=70,c=299792458][8x] 
 \end{centred}
 \noindent where the formula ($mc^{2})$ is equated to the numerical
 value resulting from substituting the given values of $m$ and $c$.
-Those values are displayed in a list following the result. The calculation
-is presented to $8$ decimal places in scientific notation. (According
-to Einstein's famous equation $E=mc^{2}$ this is the enormous energy
-content, in joules, of what was once considered an average adult Caucasian
-male. Only a minute fraction is ever available.)
+Those values are displayed in a list following the result. As specified,
+the result of the calculation is presented to $8$ decimal places
+in scientific notation. (According to Einstein's famous equation $E=mc^{2}$
+this is the enormous energy content, in joules, of what was once considered
+an average adult Caucasian male.)\footnote{\noindent In earlier versions of \texttt{numerica} this calculation
+evaluated incorrectly because spaces were used to make \texttt{c=299792458}
+more `eye friendly'. Although numbers with spaces can now be read
+by \texttt{numerica}, this ability needs to be turned on by the user.
+`Out of the box' it is off; see §\ref{subsec:evalNumbers}.}
 
-A second example is provided by the formula in earlier remarks: 
+A second example is provided by the formula in earlier remarks:
 \begin{verbatim}
     \documentclass{article} 
     \usepackage{numerica}
     \begin{document}
-      \eval{\[ \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \]}
+    \begin{quote}
+    First, evaluate the expression when it sits between
+    textstyle delimiters, 
+    \eval{\( \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \)}, 
+    and then, second, when it sits between 
+    displaystyle delimiters:
+    \eval{\[ \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \]}
+    \end{quote}
     \end{document}
+
 \end{verbatim}
-Running \texttt{pdflatex} on this document produces the result
+Running \texttt{pdflatex} on this document produces the result:
+\begin{quote}
+    First, evaluate the expression when it sits between
+    textstyle delimiters, 
+    \eval{\( \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \)}, 
+    and then, second, when it sits between 
+    displaystyle delimiters:
+    \eval{\[ \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \]}
+\end{quote}
+(For a quick mental check of the result, note that $\sin(3.5)\approx-0.35$.)
+The \verb`\eval` command used in these examples is the main command
+of the \texttt{numerica} package and is discussed fully in the next
+two chapters, but I first discuss different ways to display the results
+of calculations.
 
-\eval{\[ \frac{\sin(3.5)}{2}+2\cdot10^{-3}\] }
-
-The\verb`\eval` command used in these examples is the main command
-of the \texttt{numerica} package. It is discussed in full in the next
-chapter, but first some preliminaries.
-
 \subsection{Display of the result}
 
 \label{subsec:introResultDisplay}In what follows I shall write things
 like (but generally more complicated than)
 \begin{centred}
-\verb`$ \eval{ 1+1 } $` $\Longrightarrow\eval{1+1}$
+\verb`$ \eval{ 1+1 } $` $\Longrightarrow \eval{ 1 + 1 } $
 \end{centred}
-to mean: run \texttt{pdflatex} on a document containing \verb`\eval{1+1}`
+to mean: run \texttt{pdflatex} on a document containing \verb`$ \eval{ 1+1 } $`
 in the document body to generate a pdf containing the calculated result
-($2$ in this instance). The reader will note that I have used dollar
-signs to delimit the math environment. I could (and perhaps should)
-have used the more \LaTeX -pure \verb`\( \)`, which will do equally
-well, but habit has won out. In the example the \verb`\eval` command
-is used \emph{within} a math environment (delimited by the dollar
-signs). It is not limited to this behaviour. The command can also
-wrap \emph{around} the math delimiters (as we saw in the previous
-examples): 
-\begin{centred}
-\verb`\eval{$ 1+1 $}` $\Longrightarrow$ \eval{$ 1+1 $}.
-\end{centred}
-As you can see, the display that results is different. 
+– $2$ in this instance, as indicated by the arrow. The reader will
+note that I have used dollar signs to delimit the math environment.
+I could (and perhaps should) have used the more \LaTeX -pure \verb`\( \)`,
+but habit has won out. 
+
+In the example the \verb`\eval` command is used \emph{within} a math
+environment (delimited by the dollar signs). 
 \begin{itemize}
 \item When the \verb`\eval` command is used\emph{ within} a math environment,
-only the \emph{result,} followed possibly by the \emph{variable~=~value
-list} (see §\ref{subsec:evalVv-list}) is displayed. 
+only the \emph{numerical result,} followed possibly by the \emph{variable=value
+list}, is displayed (within the given math environment).
 \end{itemize}
-Environments may include the various AMS environments as well as the
-standard \LaTeX{} inline ( \verb`$ $` or \verb`\( \)` ), \texttt{equation}
-( \verb`\[ \]` ) and \texttt{eqnarray} environments. For an example
-of \verb`\eval` within an \verb`align*` environment see §\ref{subsec:introExploring}
-below. 
+For the \emph{variable=value list} see the $mc^{2}$ example earlier
+where values were assigned to $m$ and $c$ in a trailing optional
+argument; this is discussed more fully in §\ref{sec:evalVv-list}.
+As a simple example, I repeat the previous addition with variables
+$x$ and $y$:
+\begin{centred}
+\verb`$ \eval{ x+y }[x=1,y=1] $` $\Longrightarrow$ $ \eval{ x+y }[x=1,y=1]$
+\end{centred}
+(If the package option \verb`comma` were being used, setting the
+comma as the decimal point, then the example would look like \verb`$ \eval{ x+y }[x=1;y=1] $`
+with a semicolon separating the variable assignments.) 
+
+To my eye, display of the variable=value list in this example looks
+ silly. It needs context, some prior commentary or statement of the
+formula like
+\begin{centred}
+\verb`$ x+y=\eval{ x+y }[x=1,y=1] $` $\Longrightarrow$ $ x+y=\eval{ x+y }[x=1,y=1] $
+\end{centred}
+Otherwise display of the variable=value list can be suppressed, most
+simply by appending a star (asterisk) to the \verb`\eval` command;
+see §\ref{subsec:evalVvSuppresList} or later in this section. Environments
+may include the standard \LaTeX{} inline (\verb`$ $` or \verb`\( \)`
+or \verb`math`) environments, the \verb`displaymath`, \verb`\[ \]`
+and \verb`equation` environments, the \verb`eqnarray` environment,
+as well as the AMS environments which come into their own when multi-formula
+calculations are performed, or when long formulas with many variables
+are involved (\verb`multline`). Examples will recur throughout this
+document. 
+
+\verb`\eval` is not limited to use within a math environment. As
+we have already seen with the $mc^{2}$ example, it can also wrap
+\emph{around} math delimiters:
+\begin{centred}
+\verb`\eval{$ x+y $}[x=1,y=1]` $\Longrightarrow$ \eval{$ x+y $}[x=1,y=1]
+\end{centred}
+When it does, the display that results is different, as you can see.
+The formula is \emph{automatically} included in the display; it does
+not need to be written in `by hand' as I did in the previous example. 
 \begin{itemize}
 \item When the \verb`\eval` command is wrapped\emph{ around} a math environment,
-the result is displayed in the form, \emph{formula = result} (followed
-possibly by the \emph{variable~=~value list}) within that environment, 
+the result is displayed within that environment in the form, \emph{formula=numerical
+result}, followed possibly by the \emph{variable=value list}. 
 \begin{itemize}
 \item If the formula is long or contains many variables then it may be desirable
-to split the display over two lines; see §\ref{subsec:evalChanging-display-format}
-and §\ref{subsec:settings New-line-display}, 
+to split the display over two lines; see the \verb`multline*` example
+below, and §\ref{subsec:evalChanging-display-format}.
 \end{itemize}
+\item An alternative to explicitly wrapping \verb`\eval` around math delimiters
+is to use the \emph{settings} option, an optional argument before
+the main (mandatory) argument, and enter \verb`env=<environment>`
+there, for example like this:
 \end{itemize}
-the whole presented as an inline expression if \verb`$` delimiters
-are used, or as a display-style expression otherwise. (See the $mc^{2}$
-example for an illustration.)
-
-It is not clear to me that wrapping \verb`\eval` \emph{around} the
-AMS environments, except for \texttt{multline}, makes much sense,
-although it can be done. Here is an example of \verb`\eval` wrapped
-around a \texttt{multline{*}} environment (the phantom is there so
-that the hanging $+$ sign spaces correctly),\medskip{}
-
-\begin{minipage}[t]{0.8\columnwidth}%
+\begin{centred}
+\verb`\eval[env=$]{x+y}[x=1,y=1]` $\Longrightarrow$ \eval[env=$]{x+y}[x=1,y=1]
+\end{centred}
+which reproduces the previous display. Doing this is more convenient
+when more `verbose' environment names than the brief \verb`$ $`,
+\verb`\( \)` or \verb`\[ \]` are used (although you can write, say,
+\verb`\eval{\begin{multline*}...\end{multline*}}` if so inclined).
+Here is an example of a \verb`multline*` environment being used to
+`tame' the display of a long unwieldy formula (the phantom is there
+so that the hanging $+$ sign spaces correctly):
 \begin{verbatim}
-    \eval{ \begin{multline*}
-          1+2+3+4+5+6+7+8+9+10+\phantom{0}\\
-            11+12+13+14+15+16+17+18+19 
-       \end{multline*} }
+    \eval[env=multline*]
+       { 1+2+3+4+5+6+7+8+9+10+\phantom{0}\\
+            11+12+13+14+15+16+17+18+19 }
 \end{verbatim}
-%
-\end{minipage}
+$\Longrightarrow$     \eval[env=multline*]
+       { 1+2+3+4+5+6+7+8+9+10+\phantom{0} \\
+            11+12+13+14+15+16+17+18+19 } 
 
-\medskip{}
- $\Longrightarrow$ %
-\begin{minipage}[t]{0.8\columnwidth}%
-\vspace{-2ex}
-\eval{ \begin{multline*}
-          1+2+3+4+5+6+7+8+9+10+\phantom{0}\\
-            11+12+13+14+15+16+17+18+19 
-       \end{multline*} }%
-\end{minipage}
+\noindent Note how the phantom and the new line command \verb`\\`
+are swallowed by \verb`\eval` without complaint.
 \begin{itemize}
 \item It is also possible to dispense with math delimiters entirely, neither
-wrapped within nor wrapped around the \verb`\eval` command, but in
-that case \texttt{numerica} acts as if \verb`\eval` had been used
-within \verb`\[` and \verb`\]` and displays the result accordingly. 
+wrapped within the \verb`\eval` command nor wrapped around it nor
+invoked with the \verb`env` setting, in which case \texttt{numerica}
+displays the \emph{numerical result} between \verb`$` delimiters. 
 \end{itemize}
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+This is different from the behaviour in earlier versions of \texttt{numerica}
+when no math delimiters were involved. Then, \verb`\[ \]` delimiters
+were wrapped around the \emph{numerical result}, possibly followed
+by the \emph{variable=value} list. Now only the \emph{numerical result}
+is displayed and, since the absence of the variable=value list means
+no mathematical constructs like \verb`\frac`-tions are present, inline
+delimiters seem more appropriate than the previously used \verb`\[ \]`.\end{shaded}%
+\end{minipage}
+\begin{verbatim}
+    \begin{quote}
+    The result of subtracting $e^\pi$ from $\pi^e$ is
+    \eval{ \pi^e-e^\pi }
+    which is negative; hence $e^\pi>\pi^e$.
+    \end{quote}
+\end{verbatim}
+is an example of \verb`\eval` used in the absence of delimiters and
+produces the result:
+\begin{quote}
+    The result of subtracting $e^\pi$ from $\pi^e$ is 
+    \eval{ \pi^e-e^\pi} 
+    which is negative; hence $e^\pi>\pi^e$.
+\end{quote}
+Note that the minus sign displays correctly because of the \verb`$`
+delimiters automatically inserted by \texttt{numerica}.
+\begin{itemize}
+\item What is displayed can be pared to the minimum by appending an asterisk
+to the \verb`\eval` command. Then, only the \emph{numerical result}
+is displayed, with no math delimters added; if \verb`\eval*` is used
+within a math environment, the numerical result will be displayed
+accordingly, but otherwise the result will be displayed as text, a
+negative sign displaying as a hyphen.
+\end{itemize}
+Compare \verb`\eval*{ \pi^e-e^\pi }` $\Longrightarrow$ \eval*{ \pi^e-e^\pi }
+with the previous example. In the present example only the numerical
+result is displayed – as text, with a hyphen depicting the minus sign.
+It is up to you, the user, to provide the surrounding math environment
+if you want a proper minus.
 
-\subsection{Checking}
+\subsubsection{Punctuation: the \texttt{p} setting}
 
-A question I found on the internet that caught my attention was to
-simplify $\sqrt{220-30\sqrt{35}}$. I found myself intrigued. After
-some bumbling and fumbling, I let 
+\label{subsec:introPunctuation}To complete a display you may wish
+to add a punctuation mark – usually a comma or full stop – after the
+displayed expression. For inline use punctuation is easy: add the
+punctuation mark after the \verb`\eval` command and its arguments:
+\verb`\eval{$ 2\pi $},` $\Longrightarrow$ \eval{$ 2\pi $}, and
+\verb`$\eval{ 1+x+y }[x=2,y=3]$.` $\Longrightarrow$ $\eval{ 1+x+y }[x=2,y=3]$.
+The mark appears in the right place.
+
+For displaystyle environments punctuation is not so straightforward.
+When \verb`\eval` is used \emph{within} a displaystyle environment,
+say between \verb`\[` \verb`\]` delimiters, it is easy to add a
+comma or full stop after the \verb`\eval` command and its arguments
+but before the closing delimiter, \verb`\[ x+1=\eval{ x+1 }[x=1],\]`
+and the punctuation mark will appear in the right place. But when
+the \verb`\eval` command wraps \emph{around} \verb`\[ \]` delimiters
+or the \verb`env=\[` option is used, a problem arises: a fullstop
+or comma after the \verb`\eval` command and its arguments – \verb`\eval{\[ 1+1 \]}.`
+– lies \emph{beyond} the closing delimiter and will slide off to the
+start of the next line, \emph{after} the displayed result. We want
+it to display as if it were the last element \emph{before} the closing
+delimiter. 
+
+Explicitly putting it there, like \verb`\eval{\[ 1+1.\]}`, means
+the punctuation mark becomes part of the formula. Potentially \texttt{numerica}
+then needs to check not just for a fullstop but also other punctuation
+marks like comma, semicolon, perhaps even exclamation and question
+marks. All these marks have roles in mathematics or \texttt{l3fp}
+or \texttt{numerica}, and the program\texttt{ }responds to them accordingly.
+For instance a full stop is also the decimal point mark and is treated
+as such (giving the rather cryptic result \verb`\eval{$ . $}` $\Longrightarrow$
+\eval{$ .$} since the solitary dot is interpreted as the number $0.0$).
+An exclamation mark is the factorial sign; \texttt{numerica} recognizes
+it as such: \verb`\eval{$ 4! $}` $\Longrightarrow$ \eval{$ 4!$}.
+A comma is used to separate the arguments of $n$-ary functions like
+\verb`\max` and \verb`\min`: \verb`$\eval{\min(\pi,e,\phi,\gamma)}$`
+$\Longrightarrow$ $\eval{\min(\pi,e,\phi,\gamma)}$. And as we will
+see below, a semicolon is used by \texttt{numerica} to separate expressions
+in a multi-formula calculation. Distinguishing the punctuation role
+from the mathematical role of these marks would only complicate the
+code and slow evaluation.
+
+Instead, \texttt{numerica} uses a key in the settings option to add
+punctuation. As already noted, the settings option is an optional
+argument preceding the main argument, already met in relation to the
+\verb`env`-ironment key. A second setting is the punctuation key
+\verb`p`. Indeed, simply entering \verb`p`, as here,
+\begin{verbatim}
+    \eval[p]{\[ 1+x+y+z+xy+yz+zx+xyz \]}[x=2,y=3,z=4]
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[ 1+x+y+z+xy+yz+zx+xyz \]}[x=2,y=3,z=4]puts
+a comma in the correct place, after the closing parenthesis of the
+variable=value list. If a full stop is wanted use \verb`p=.`:
+\begin{verbatim}
+\eval[env=\[,p=.]{ (1+x)(1+y)(1+z) }[x=2,y=3,z=4]
+\end{verbatim}
+$\Longrightarrow$ \eval[p=.,env=\[ ]{ (1+x)(1+y)(1+z) }[x=2,y=3,z=4]Again
+the mark appears in the right place. As you can see, the settings
+option is a comma-separated list of \emph{key=value} pairs.\emph{
+}This remains true of the settings option even when the \verb`comma`
+package option is used, since the only numbers appearing in the settings
+are integers – ambiguity does not arise. That entering \verb`p` alone
+sufficed is because the punctuation key \verb`p` defaults to a comma.
+If you want some other mark – a semicolon or exclamation mark perhaps
+– equate \verb`p` to that mark in the optional argument. The default
+value for \verb`p` does not change if the \verb`comma` package option
+is used.
+
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+The comma is chosen as the default not only because it is a commonly
+used mark at the end of equations but because the settings option
+is a comma-separated list. By making the default the comma, it suffices
+to write \verb`p` when you want a comma – rather than the more awkward
+\verb`p={,}` which would otherwise be required.\end{shaded}%
+\end{minipage}
+
+\subsection{Multi-formula calculations}
+
+\label{subsec:introMult-formula-calculations}It is possible to evaluate
+more than one expression at a time in the one \verb`\eval` command
+by means of a further setting \verb`ff`, or \verb`ff=<char>`. The
+default separator of one formula from the next is the same as that
+used in the variable=value list. If the decimal point is a dot, then
+the default separator is a comma; if the decimal point is a comma
+(with the \verb`comma` package option) then the default separator
+is a semicolon. In both cases this will generally be fine except when
+$n$-ary functions are involved since their arguments are delimited
+in the same way. Either one can wrap the arguments of these functions
+in braces or, better, choose a different separator by means of the
+setting \verb`ff=<char>`. I give an example shortly below; also see
+§\ref{subsec:settingsMulti-formula-separator}. For this document
+the decimal point is a dot and the comma generally suffices.
+
+Suppose we want the values of the main trigonometric functions at,
+say, $\pi/6$. In the example, I have entered the functions separated
+by commas, assigned the value $\pi/6$ to the variable $x$ in the
+trailing optional argument and concluded the display with a full stop
+by means of the \verb`p=.` setting. The point to note is the \verb`ff`
+in the settings option, signalling a multi-formula calculation: 
+\begin{verbatim}
+    \eval[ff,p=.]{\[ \sin x, \cos x, \tan x \]}[x=\pi/6] 
+\end{verbatim}
+$\Longrightarrow$ \eval[ff,p=.]{ \[ \sin x, \cos x, \tan x \] }[x=\pi/6]To
+understand these values we might add 
+\begin{centred}
+\verb`\eval[ff,p=.]{\[ \surd3/2, 1/\surd3 \]}` $\Longrightarrow$
+\eval[ff,p=.]{ \[\surd3/2, 1/\surd3 \]}
+\end{centred}
+The displays in both instances follow the default format for a multi-formula
+calculation in the \verb`equation*` (\verb`\[`) environment. 
+
+There are irritants: the failure of the equals signs to line up, the
+repetition of the variable=value list, the different numbers of digits
+displayed in the answers and, if you are a `punctuator', you might
+like commas to terminate the intermediate rows. For back-of-envelope
+calculations, who cares? But for inclusion in more formal documents
+such things matter. All can be remedied: see §\ref{subsec:evalPadding-with-zeros}
+(and below) about padding numbers with zeros to a given number of
+decimal places; see §\ref{subsec:settingsEnvironmentSettings} about
+use of AMS environments to guarantee alignment; see §\ref{subsec:settingsEnvironments-=00005C=00007D}
+about suppressing repetition of the variable=value list. Punctuating
+the intermediate rows I discuss next.
+
+\subsubsection{Punctuation: the \texttt{pp} }
+
+\label{subsec:intoMultiFormulaPunctuation}Like the \verb`p` setting,
+there is a \verb`pp` setting also entered in the settings argument
+of the \verb`\eval` command that enables the insertion of punctuation
+at the end of intermediate results in a multi-formula calculation;
+the \verb`p` setting still determines the terminating punctuation
+mark. Like \verb`p`, \verb`pp` defaults to a comma, which means
+that you need enter only \verb`pp` to insert commas. This remains
+true if the \verb`comma` package option is used. For any other mark
+you need to equate \verb`pp` to that mark – e.g. \verb`pp=;`. Thus,
+repeating the first of the examples above, I've added \verb`pp` to
+the settings option, and also added a star (asterisk) in a second
+trailing argument on the right. This triggers padding the numerical
+result with zeros, should it not display the default six decimal places
+– as happens with both $\sin x$ and $\tan x$ (because they round
+to five or fewer figures). 
+\begin{verbatim}
+    \eval[ff,pp,p=.]{\[ \sin x, \cos x, \tan x \]}[x=\pi/6][*]
+\end{verbatim}
+$\Longrightarrow$ \eval[ff,pp,p=.]{\[ \sin x, \cos x, \tan x \]}[x=\pi/6][*]
+
+\noindent The display is improved: commas terminate intermediate rows,
+a full stop is at the end, and by padding with zeros, all three results
+display six decimal places and now align vertically. 
+
+\subsubsection{Multi-formula separator: the \texttt{ff} setting}
+
+\noindent\label{subsec:introMultiFormulaSeparator}That the last
+example displays as desired depends on all three results being positive.
+If $x=5\pi/6$, $\cos x$ and $\tan x$ will be negative and minus
+signs will destroy the alignment. The secret then is to use an \verb`alignat*`
+environment. Also, just to show how it's done, I've changed the multi-formula
+separator with the setting \verb`ff=|`. (Even if a formula contained
+an absolute value it should not contain the \verb`|` character but
+rather \verb`\abs` or \verb`\lvert`, \verb`\rvert`; see §\ref{sec:calcAbsValueEtc}.) 
+\begin{verbatim}
+    \eval[pp,p=.,env=alignat*,ff=|]
+      {\[ \sin x | \cos x | \tan x \]}[x=5\pi/6][*]         
+\end{verbatim}
+$\Longrightarrow$ \eval[pp,p=.,env=alignat*,ff=|]
+      {\[ \sin x | \cos x | \tan x \]}[x=5\pi/6][*]
+
+\noindent Padding wit zeros and the \verb`alignat*` environment have
+ensured alignment of the numerical results. 
+
+Multi-formula calculations can also be performed in an inline context.
+In the following example, the \verb`p` setting has been dispensed
+with since a full stop can be inserted at the end `by hand' without
+problem. Again, just to show how, I have used the \verb`ff=<char>`
+setting (although \verb`&` is a confusing character to use for anyone
+familiar with \LaTeX ):
+\begin{centred}
+\verb`$\eval[pp,ff=&]{ \pi & \pi/2 & 1/\pi & \surd\pi }$` $\Longrightarrow$
+$\vsp\eval[pp,ff=&]{ \pi & \pi/2 & 1/\pi & \surd\pi }$.
+\end{centred}
+By default, a quad of space is inserted between results of a multi-formula
+calculation in an inline (\verb`$ $`, \verb`\( \)` or \verb`math`)
+context, as evident here. This can be changed by means of the \verb`sep`
+(for separator) setting (§\ref{subsec:settingsEnvironments-sep}).
+For more on environments and their tweaks, see §\ref{subsec:settingsEnvironmentSettings}.
+
+\subsection{Examples of use}
+
+To give a sense of how \texttt{numerica} can be used, I include some
+examples of actual use of the program. (The \texttt{numerica-plus}
+and \texttt{numerica-tables} packages contain others.) 
+
+\subsubsection{Checking}
+
+Occasionally, just to reassure myself that age hasn't completely rotted
+my brain I like to tackle short mathematical problems I come across
+on the internet. One that caught my attention was to simplify $\sqrt{220-30\sqrt{35}}$.
+ After some bumbling and fumbling, I let 
 \[
 x=\sqrt{220-30\sqrt{35}},\qquad y=\sqrt{220+30\sqrt{35}},
 \]
-(which seems an obvious thiing to do). Then 
+(which seems an obvious thing to do) so that
 \[
-xy=10\sqrt{484-315}=10\sqrt{13^{2}}=130.
+xy=10\sqrt{484-315}=10\sqrt{169}=10\sqrt{13^{2}}=130.
 \]
-Since $x^{2}+y^{2}=440$ it was then easy to form both $(x+y)^{2}$
-and $(x-y)^{2}$ and by separating the resulting numbers into their
-prime factors, to work out that $x=5\sqrt{7}-3\sqrt{5}$. Was I right? 
-\begin{centred}
-\verb`\eval{$ \sqrt{220-30\sqrt{35}} $}` $\Longrightarrow$ \eval{$ \sqrt{220-30\sqrt{35}} $},
+Since $x^{2}+y^{2}=440$ it was easy to form both $(x+y)^{2}$ and
+$(x-y)^{2}$, and by separating the resulting numbers into their prime
+factors, to find $y+x$ and $y-x$ and work out that $x=5\sqrt{7}-3\sqrt{5}$.
+Was I right, or had I made a mistake? Since
+\begin{verbatim}
+   \eval[p,pp,ff]{\[\sqrt{220-30\sqrt{35}},
+                 5\sqrt{7}-3\sqrt{5}\]}
+\end{verbatim}
+$\Longrightarrow$ \eval[p=.,pp,ff]{\[ \sqrt{220-30\sqrt{35}}, 5\sqrt{7}-3\sqrt{5} \]}
 
-\verb`\eval{$ 5\sqrt{7}-3\sqrt{5} $}` $\Longrightarrow$ \eval{$ 5\sqrt{7}-3\sqrt{5} $}.
-\end{centred}
-Yes, the simplification was correct. And indeed $y=5\sqrt{7}+3\sqrt{5}$: 
-\begin{centred}
-\verb`\eval{$ \sqrt{220+30\sqrt{35}} $}` $\Longrightarrow$ \eval{$ \sqrt{220+30\sqrt{35}} $}
-,
+\noindent the simplification was correct. Indeed $y=5\sqrt{7}+3\sqrt{5}$:
+\begin{verbatim}
+  \eval[p=.,pp,ff]{\[\sqrt{220+30\sqrt{35}},
+                  5\sqrt{7}+3\sqrt{5}\]}
+\end{verbatim}
+$\Longrightarrow$ \eval[p=.,pp,ff]{\[ \sqrt{220+30\sqrt{35}}, 5\sqrt{7}+3\sqrt{5} \]}
 
-\verb`\eval{$ 5\sqrt{7}+3\sqrt{5} $}` $\Longrightarrow$ \eval{$ 5\sqrt{7}+3\sqrt{5} $}.
-\end{centred}
-As a final flourish, 
+\noindent As a final flourish, 
 \begin{verbatim}
-    \eval{$ xy $}
-       [ x=5\sqrt{7}-3\sqrt{5}, 
-         y=5\sqrt{7}+3\sqrt{5} ]
+    \eval{$xy$}[x=5\sqrt{7}-3\sqrt{5},
+                y=5\sqrt{7}+3\sqrt{5}]
 \end{verbatim}
-$\Longrightarrow$ \eval{$ xy $}
-       [ x=5\sqrt{7}-3\sqrt{5}, 
-         y=5\sqrt{7}+3\sqrt{5} ].
+$\Longrightarrow$     \eval{$ xy $}
+       [x=5\sqrt{7}-3\sqrt{5}, 
+        y=5\sqrt{7}+3\sqrt{5}].
 
-\subsection{Exploring}
+\subsubsection{Exploring }
 
 \label{subsec:introExploring}When working on \texttt{numerica}'s
 predecessor package, I constantly tested it against known results
@@ -442,23 +873,27 @@
 \]
 did indeed converge to the number $e$ as $n$ increased.\texttt{ }Let's
 do that here. Try first $n=10$:
-\begin{centred}
+\begin{center}
 \verb`\eval{$ e-(1+1/n)^n $}[n=10][x]` $\Longrightarrow$ \eval{$ e-(1+1/n)^n $}[n=10][x].
-\end{centred}
+\par\end{center}
+
 \noindent (The default number of decimal places displayed is $6$.)
 The difference between $e$ and $(1+1/n)^{n}$ is about an eighth
 ($0.125$) when $n=10$, which is encouraging but hardly decisive.
 The obvious thing to do is increase the value of $n$. I'll use an
-\verb`align*` environment to `prettify' the presentation of the results: 
+\verb`align*` environment to `prettify' the presentation of the
+results. Although looking like a solid block of typing, most of the
+following was done by copy-and-paste; I only had to change the exponent
+on the \verb`10`:
 \begin{verbatim}
   \begin{align*}
-    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^5][*x],\\
-    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^6][*x],\\
-    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^7][*x],\\
-    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^8][*x].
+    e-(1+1/n)^{n} &= \eval{e-(1+1/n)^n}[n=1\times10^5][*x],\\
+    e-(1+1/n)^{n} &= \eval{e-(1+1/n)^n}[n=1\times10^6][*x],\\
+    e-(1+1/n)^{n} &= \eval{e-(1+1/n)^n}[n=1\times10^7][*x],\\
+    e-(1+1/n)^{n} &= \eval{e-(1+1/n)^n}[n=1\times10^8][*x].
   \end{align*}
 \end{verbatim}
-(most of which was written using copy and paste) which produces 
+This gave the result
 \begin{align*}
 e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{5}][x],\\
 e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{6}][*x],\\
@@ -467,52 +902,62 @@
 \end{align*}
 Clearly $(1+1/n)^{n}$ converges to $e$, the difference between them
 being of order $1/n$, but that is not what catches the eye. There
-is an unanticipated regularity here. 1.35914? Double the number: \verb`$\eval{2\times 1.35914}[5]$`\texttt{
-}$\Longrightarrow\eval{2\times1.35914}[5]$ which is close enough
-to $e$ to suggest a relationship, namely, 
+is an unanticipated regularity here. 1.35914? Double the number: \verb`\eval{2\times 1.35914}[5]`
+$\Longrightarrow$ \eval{2\times 1.35914}[5] which looked like $e$
+to me and suggested a relationship, namely,
 \[
 \lim_{n\to\infty}n\left(e-\left(1+\frac{1}{n}\right)^{n}\right)=\tfrac{1}{2}e.
 \]
 
-This was new to me. Is it true? From the familiar expansion of the
-logarithm
-
+\noindent I hadn't seen this before. Is it true? Since 
+\[
+\ln\left(1+\frac{1}{n}\right)^{n}=n\ln\left(1+\frac{1}{n}\right),
+\]
+it followed from the familiar expansion of the logarithm that
 \begin{align*}
-\ln\left(1+\frac{1}{n}\right)^{n} & =n\ln\left(1+\frac{1}{n}\right)\\
- & =n\left(\frac{1}{n}-\frac{1}{2}\frac{1}{n^{2}}+\frac{1}{3}\frac{1}{n^{3}}-\ldots\right)\\
- & =1-\frac{1}{2n}\left(1-\frac{2}{3}\frac{1}{n}+\frac{2}{4}\frac{1}{n^{2}}-\right)\\
- & \equiv1-\frac{1}{2n}E_{n},
+\ln\left(1+\frac{1}{n}\right)^{n} & =n\left(\frac{1}{n}-\frac{1}{2}\frac{1}{n^{2}}+\frac{1}{3}\frac{1}{n^{3}}-\ldots\right)\\
+ & =1-\frac{1}{2n}\left(1-\frac{2}{3}\frac{1}{n}+\frac{2}{4}\frac{1}{n^{2}}-\right).
 \end{align*}
-say. Since $E_{n}$ is an alternating series and the magnitudes of
-the terms of the series tend to $0$ monotonically, $1>E_{n}>1-2/3n$.
-From this and the inequalities $1/(1-x)>e^{x}>1+x$ when $x<1$ it
-proved a straightforward matter to verify the proposed limit.
+Write $E_{n}$ for the bracketed series on the right. $E_{n}$ is
+an alternating series and the magnitudes of the terms of the series
+tend to $0$ monotonically. Hence $1>E_{n}>1-2/3n$ and $E_{n}\to1$
+as $n\to\infty$. Now exponentiate:
+\[
+\left(1+\frac{1}{n}\right)^{n}=e\times e^{-E_{n}/2n},
+\]
+so that
+\[
+n\left(e-\left(1+\frac{1}{n}\right)^{n}\right)=ne\Big(1-e^{-E_{n}/2n}\Bigr).
+\]
+The proposed limit, new to me, now followed from the standard inequality
+(see \emph{HMF }2.3.32), $x/(1+x)<1-e^{-x}<x$ when $x>-1$.
 
-\subsection{Reassuring}
+\subsubsection{Reassuring}
 
 \label{subsec:introReassurance}In the course of some hobbyist investigations
-in plane hyperbolic geometry I derived the formula 
+in plane hyperbolic geometry I derived the formula
 \[
 \Phi_{1}(m,n)=\cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)\frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi},
 \]
 for $m=2,3,\ldots$ and integral $n\ge2m+1$. A key concern was: when
-is $\Phi_{1}$ positive? After an embarrassingly laborious struggle,
-I managed to work this expression into the form 
+is $\Phi_{1}$ positive? $\Phi_{1}$ itself was opaque; could I work
+it into an equivalent but more enlightening form? After an embarrassingly
+laborious struggle, I derived the expression 
 \[
 \Phi_{2}(m,n)=\left(\frac{1-4\sin^{2}\tfrac{m}{3n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi}\right)\sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi,
 \]
-in which the conditions for positivity are clear: with $n\ge2m+1$,
-so that $m\pi/3n<\pi/6$, the first factor is always positive, the
-second is positive for $m\ge2$, and the third is positive for $m\ge4$.
-All well and good, but given the struggle to derive $\Phi_{2}$, was
-I confident that $\Phi_{1}$ and $\Phi_{2}$ really\emph{ }are equal?
-It felt all too likely that I had made a mistake.
+in which the conditions for positivity were now clear: with $n\ge2m+1$,
+so that $m\pi/3n<\pi/6$, the first parenthesized factor is always
+positive; the second is positive for $m\ge2$, and the third is positive
+for $m\ge4$. All well and good, but given the struggle to derive
+$\Phi_{2}$, was I confident that $\Phi_{1}$ and $\Phi_{2}$ really\emph{
+}are equal? It felt all too likely that I had made a mistake. 
 
 The simplest way to check was to see if the two expressions gave the
-same numerical answers for a number of $m,\thinspace n$ values. I
-wrote \verb`\eval{\[ \]}[m=2,n=5]` twice and between the delimiters
-pasted the already composed expressions for $\Phi_{1}$ and $\Phi_{2}$,
-namely: 
+same numerical answers for a number of $m,\thinspace n$ values. First
+I checked for $m=2,n=5$: I wrote \verb`\eval{\[ \]}[m=2,n=5]` twice
+and between the delimiters pasted the already composed expressions
+for $\Phi_{1}$ and $\Phi_{2}$, namely: 
 \begin{verbatim}
     \eval{\[ 
             \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
@@ -519,176 +964,412 @@
             \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
             {2\sin^{2}\tfrac{m}{3n}\pi} 
           \]}[m=2,n=5]
-    \eval{\[ 
-            \left(
-              \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
-              {2\sin^{2}\tfrac{m}{3n}\pi}
-            \right)
-            \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
+    \eval{\[ \left(
+               \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
+               {2\sin^{2}\tfrac{m}{3n}\pi}
+             \right)
+             \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
           \]}[m=2,n=5]
 \end{verbatim}
-I have added some formatting -- indenting, line breaks -- to make
-the formulas more readable for the present document but otherwise
-left them unaltered. The \verb`\eval` command can be used for even
-quite complicated expressions without needing to tinker with their
-\LaTeX{} form, but you may wish -- as here -- to adjust white space
-to clarify the component parts of the formula. Running \texttt{pdflatex}
-on these expressions, the results were
+I have added some formatting – indenting, line breaks – to make the
+formulas more readable but otherwise left them unaltered. The \verb`\eval`
+command can be used for even quite complicated expressions without
+needing to tinker with their \LaTeX{} form, but you may wish – as here
+– to adjust white space to clarify their component parts. Running
+\texttt{pdflatex} on these expressions, the results were
 
-    \eval{\[ 
-            \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
-            \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
-            {2\sin^{2}\tfrac{m}{3n}\pi} 
-          \]}[m=2,n=5]
-    \eval{\[ 
-            \left(
-              \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
-              {2\sin^{2}\tfrac{m}{3n}\pi}
-            \right)
-            \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
-          \]}[m=2,n=5]
+\eval{\[ 
+        \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
+        \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
+        {2\sin^{2}\tfrac{m}{3n}\pi} 
+      \]}[m=2,n=5]
 
-\noindent which was reassuring. Doing it again but with different
-values of $m$ and $n$, again the results coincided:
+\eval{\[ 
+        \left(
+          \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
+          {2\sin^{2}\tfrac{m}{3n}\pi}
+        \right)
+       \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
+      \]}[m=2,n=5]
 
-    \eval{\[ 
-            \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
-            \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
-            {2\sin^{2}\tfrac{m}{3n}\pi} 
-          \]}[m=5,n=13]
-    \eval{\[ 
-            \left(
-              \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
-              {2\sin^{2}\tfrac{m}{3n}\pi}
-            \right)
-            \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
-          \]}[m=5,n=13]
+\noindent which was reassuring. (The result is negative since $m-3<0$.) 
 
+I could have avoided the double writing of \verb`\eval` and \verb`[m=2,n=5]`
+by putting a comma between the expressions and performing a multi-formula
+calculation. This time I've checked equality for \verb`m=5` and \verb`n=13`,
+which should give a positive result, and I've taken the opportunity
+to \verb`align*` the results with the \verb`env` setting:
+\begin{verbatim}
+    \eval[p=.,pp,env=align*,ff]
+      { \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
+        \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
+        {2\sin^{2}\tfrac{m}{3n}\pi} 
+      , \left(
+          \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
+          {2\sin^{2}\tfrac{m}{3n}\pi}
+        \right)
+        \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
+      }[m=5,n=13]
+\end{verbatim}
+which evaluates to
+
+    \eval[p=.,pp,env=align*,ff]{ 
+        \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
+        \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
+        {2\sin^{2}\tfrac{m}{3n}\pi} 
+      ,
+        \left(
+          \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
+          {2\sin^{2}\tfrac{m}{3n}\pi}
+        \right)
+       \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
+      }[m=5,n=13]
+
 \noindent Thus reassured that there was \emph{not }an error in my
 laborious derivation of $\Phi_{2}$ from $\Phi_{1}$, it was not difficult
 to work back from $\Phi_{2}$ to $\Phi_{1}$ then reverse the argument
-to find a straightforward derivation.
+to find a straightforward derivation. 
 
 \chapter{\texttt{\textbackslash nmcEvaluate} (\texttt{\textbackslash eval)}}
 
-The main calculational command in \texttt{numerica} is \verb`\nmcEvaluate`.
-Unlike some other commands which are loaded optionally, \verb`\nmcEvaluate`
-is \emph{always} loaded, and therefore always available. Because \verb`\nmcEvaluate`
-would be tiresome to write too frequently,\texttt{ }particularly for
-back-of-envelope calculations, there is an equivalent short-name form,
-\verb`\eval`, used almost exclusively in the following. But note:
-wherever you see the command \verb`\eval`, you can substitute \verb`\nmcEvaluate`
-and obtain the same result.
+\label{chap:evalEvaluate}The main calculational command in \texttt{numerica}
+is \verb`\nmcEvaluate`. Because this would be tiresome to write too
+frequently,\texttt{ }particularly for back-of-envelope calculations,
+there is an equivalent short-name form, \verb`\eval`, used almost
+exclusively in this document. But wherever you see \verb`\eval` you
+can substitute \verb`\nmcEvaluate` and obtain the same result. \verb`\eval`
+is defined using \verb`\ProvideDocumentCommand` from the \texttt{xparse}
+package. Hence if already defined in some other package already loaded,
+it will not be redefined by \texttt{numerica}. It will retain its
+meaning in the other package. Its consequent absence from \texttt{numerica}
+may be an irritant, but only that. \verb`\nmcEvaluate` is unlikely
+to be defined elsewhere and should still be available.
 
-\verb`\eval` (like other short-name forms of other commands in the
-\texttt{numerica} suite) is defined using \verb`\ProvideDocumentCommand`
-from the \texttt{xparse} package. Hence if \verb`\eval` has already
-been defined in some other package already loaded, it will not be
-redefined by \texttt{numerica}. It will retain its meaning in the
-other package. Its consequent absence from \texttt{numerica} may be
-an irritant, but only that; \verb`\nmcEvaluate` is defined using
-\texttt{xparse}'s \verb`\DeclareDocumentCommand` which would override
-any (freakishly unlikely) previous definition of \verb`\nmcEvaluate`
-in another package and would therefore still be available.
-
 \section{Syntax of \texttt{\textbackslash nmcEvaluate (\textbackslash eval)}}
 
-There are five arguments to the \verb`\nmcEvaluate` (or \verb`\eval`)
-command, of which only one, the third, is mandatory. All others are
-optional. If all are deployed the command looks like 
+\verb`\nmcEvaluate` (or \verb`\eval`) takes five arguments of which
+only the third is mandatory. All others are optional. If all are deployed
+the command looks like
 \begin{centred}
-\verb`\nmcEvaluate*[settings]{expr.}[vv-list][num. format]` 
+\noindent\verb`\nmcEvaluate*[settings]{expr.}[vv-list][num. format]`
 \end{centred}
-I discuss the various arguments in the referenced sections. 
+I discuss the various arguments in the referenced sections.
 \begin{enumerate}
-\item \verb`*` optional switch; if present ensures display of only the
-numerical result (suppresses display of the formula and vv-list);
-see §\ref{subsec:evalVvSuppresList} 
-\item \verb`[settings]` optional comma-separated list of \emph{key=value
-}settings for this particular calculation; see §\ref{sec:settingsOption} 
-\item \verb`{expr.}` the only mandatory argument; the mathematical expression/formula
-in \LaTeX{} form that is to be evaluated 
-\item \verb`[vv-list]` optional comma-separated list of \emph{variable=value
-}items; see §\ref{subsec:evalVv-list} 
-\item \verb`[num. format]` optional format specification for presentation
-of the numerical result (rounding, padding with zeros, scientific
-notation, boolean output); see~§\ref{subsec:evalRoundingEtc} 
+\item \verb`*` optional \emph{number-only} switch; if present ensures display
+of only the numerical result, as text with no formatting; see §\ref{subsec:evalVvSuppresList};
+\item \verb`[settings]` optional comma-list of \emph{key=value settings}
+of the calculational environment for this particular calculation;
+see §\ref{chap:settingsSettings};
+\item \verb`{expr.}` mandatory main argument, the mathematical \emph{expression}
+in \LaTeX{} form that is to be evaluated, or a list of such expressions;
+see §\ref{subsec:evalExpressions};
+\item \verb`[vv-list]` optional list of \emph{variable=value }entries;
+see §\ref{sec:evalVv-list};
+\item \verb`[num. format]` optional \emph{number-format} specification
+for the numerical result (rounding, padding with zeros, scientific
+notation, boolean or fraction-form output); see~§\ref{sec:evalRoundingEtc}.
 \end{enumerate}
 Note that arguments 4 and 5 are both square-bracket delimited optional
 arguments. Should only one such argument be used, \texttt{numerica}
 determines which is intended by looking for an equals sign within
 the argument. Its presence indicates the argument is the vv-list;
-its absence indicates the argument is the number format specification.
+its absence indicates the argument is the number-format specification. 
 
-The vv-list and number-format specification are \emph{trailing} optional
-arguments. They do not need to be hard against their preceding arguments;
+The vv-list and number-format specification are trailing optional
+arguments but do not need to be hard against their preceding arguments;
 intervening spaces are allowed. This means there is a possibility
 that should the \verb`\eval` command be followed by a square-bracketed
-mathematical expression \texttt{numerica} might confuse it with one
-of its trailing arguments. Experience using \texttt{numerica} suggests
-that this will be a (very) rare occurrence and is easily prevented
-by inserting an empty brace pair (\verb`{}`) before the offending
-square-bracketed expression. Allowing spaces between the arguments
-enables complicated expressions and large vv-lists to be formatted
-with new lines and white space to aid clarity -- without requiring
-the insertion of comment characters (\verb`%`).
+mathematical expression that expression might be interpreted as a
+trailing argument. Experience using \texttt{numerica} suggests that
+this will be a (very) rare occurrence and is easily prevented by inserting
+an intervening empty brace pair (\verb`{}`). By allowing spaces between
+the arguments complicated expressions and large vv-lists can be formatted,
+in the interests of clarity, with new lines and white space without
+requiring the insertion of line-ending comment characters (\verb`%`).
 
 Recommended practice is to minimise the number of optional arguments
-used in \LaTeX{} commands by consolidating such arguments into a single
-\emph{key=value} list. Although \texttt{numerica} uses such an argument,
-the vv-list does not fit naturally into that scheme. And practice
-suggests that separating out the elements of the number format specification
-(rounding value, padding with zeros, scientific notation, boolean
-output) and placing them in a trailing argument is both convenient
-and intuitive for the kind of back-of-envelope calculations envisaged
-for \texttt{numerica}.
+used in \LaTeX{} commands by consolidating them into a single \emph{key=value}
+list. Although \texttt{numerica} uses such an argument (the settings
+optional argument), the vv-list does not fit naturally into that scheme.
+And practice suggests that separating out the elements of the number-format
+specification of the result and placing them in a trailing argument
+is both convenient and intuitive for the kind of back-of-envelope
+calculations envisaged for \texttt{numerica}. 
 
-\section{The variable=value list}
+\subsection{Expressions}
 
-\label{subsec:evalVv-list}To evaluate algebraic, trigonometric and
-other formulas that involve \emph{variables} we need to give those
-variables values. This is done in the \emph{variable=value list} --
-or \emph{vv-list} for short. This is the fourth argument of the \texttt{\textbackslash nmcEvaluate}
-command and is a square-bracket delimited optional argument (optional
-because an expression may depend only on constants and numbers).
+\label{subsec:evalExpressions}What kind of formula or expression
+can be `digested' by \verb`\nmcEvaluate`? As seen above (§\ref{subsec:introBasicProcedure}),
+a formula can be complicated, including components like $2\sin^{2}\tfrac{m}{3n}\pi$
+or
+\[
+\left(\frac{1-4\sin^{2}\tfrac{m}{3n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi}\right),
+\]
+but the underlying aim is always: if the meaning of a formula in the
+\texttt{pdf} is clear to a human reader, it ought to be clear to \texttt{numerica}.
+In a perhaps surprising number of cases this aim can be met. Mathematicians
+understand an expression like $\sin2\pi x$ to mean the sine of the
+triple product $2\pi x$; so does \texttt{numerica}. Mathematicians
+casually use and understand logically wrong but customary notations
+like $\sin^{2}x$, the square of the sine of $x$; \texttt{numerica}
+digests this without fuss. Mathematicians use a wide variety of formatting
+commands to clarify their intent: \verb`\left` and \verb`\right`,
+\verb`\phantom`-s, spaces and new lines (\verb`\quad`, \verb`\\`),
+structural commands like \verb`\mathstrut`, or environments like
+\verb`align` or \verb`multline`; all are grist to \texttt{numerica}'s
+mill.
 
+\subsubsection{Multi-formula expressions}
+
+\label{subsec:evalMulti-formula-expressions}From version 3.0.0 of
+\texttt{numerica} the main (and only mandatory) argument of the \verb`\eval`
+command may contain more than one formula to be evaluated. `Expression'
+can now mean a (generally short) list of formulas. The default punctuation
+mark separating one formula from the next in the list is the same
+as that used in the vv-list – a comma if the decimal point is a dot,
+a semicolon if the decimal point is a comma. The only potential conflict
+is if a formula contains an $n$-ary function (\verb`\max` or \verb`\min`
+or \verb`\gcd`), since their arguments are separated by the same
+separators in the two cases. There are two responses. One is to wrap
+the $n$-ary function in braces. The other is to specify a different
+multi-formula delimiter in the settings option. This is done by entering
+\verb`ff=<char>` there (see §\ref{subsec:settingsMulti-formula-separator}),
+where \verb`<char>` is some suitably `neutral' character not otherwise
+present in any of the formulas to be evaluated – perhaps \verb`@`,
+or \verb`|`.
+
+Examples of multi-formula expressions being evaluated within the one
+\verb`\eval` command were seen earlier in the Introduction, especially
+at §\ref{subsec:introMult-formula-calculations}, and §\ref{subsec:introReassurance}.
+A multi-formula calculation is a natural way to check identities –
+see for example the test of $\sinh3x=3\sinh x+4\sinh^{3}x$ in §\ref{subsec:calcSquaring-etc-unary}.
+Numerous other examples occur throughout this document.
+
+\subsubsection{\protect\LaTeX{} braces and mathematical arguments}
+
+\label{subsec:evalBraced-groups}There are mathematical braces, \verb`\{ \}`,
+which display in the \texttt{pdf} and are used to delimit (generally
+larger) parts of mathematical expressions, and there are \LaTeX{} braces,
+\verb`{ }`, which do not display in the \texttt{pdf} and are used
+to delimit \LaTeX{} arguments or groupings. This discussion is about
+\LaTeX{} braces.
+
+Generally, the \LaTeX{} braces \verb`\eval` encounters should be `announced'
+by a preceding \LaTeX{} command. Thus the braced argument in \verb`\sqrt{x^2+1}`,
+displaying in a math environment as $\sqrt{x^{2}+1}$, is `announced'
+by the square root command. Similarly, \verb`\frac` and \verb`\binom`
+each announce two braced arguments. The superscripting \verb`^` or
+subscripting \verb`_` also announce a braced argument (in general).
+In these cases \verb`\eval` knows what to do with the braced argument
+because it is prepared by the preceding command.
+
+Although there is no \LaTeX{} requirement for them, braced arguments
+can also be used after unary functions like \verb`\sin` or \verb`\ln`
+or \verb`\tanh`. Given the presence of the unary function, \verb`\eval`
+knows what to do with an immediately following braced argument and
+will happily digest it – it has been announced by the unary function.
+Indeed, from version 3.0.0 of \texttt{numerica} this is the recommended
+way of handling (for instance) the more complicated arguments that
+frequently occur following \verb`\sin` and \verb`\cos` in the study
+of Fourier series; see §\ref{subsec:calcComplicated-arguments}. 
+
+Even \emph{without} braces, \verb`\eval` will happily digest an argument
+to a unary function that is the product of a number, a variable, a
+constant, a \verb`\tfrac` (or an \verb`\sfrac` if \texttt{xfrac}
+is loaded) or some subset thereof:
+\begin{centred}
+\verb`\eval{$ \cos \tfrac1{12}2n\pi $}[n=2]` $\Longrightarrow$ \eval{$ \cos \tfrac1{12}2n\pi $}[n=2].
+\end{centred}
+\LaTeX{} braces are for those situations where the reader sees the
+function's argument extending \emph{beyond} the point where a programming
+rule would end the argument. For example, a reader knows that the
+argument of the sine in $\sin\tfrac{1}{2}(A+B)$ does not end with
+the $\tfrac{1}{2}$, nor with the right parenthesis in $\sin(n+\tfrac{1}{2})\pi$
+nor with the first factor in $\sin(n+\tfrac{1}{2})(x-t)$. It is for
+situations like this that em-bracing the  argument is recommended.
+It makes no difference to the visual appearance, hence does not interfere
+with the reader's comprehension, but informs \texttt{numerica} of
+exactly where the argument ends.
+
+Because they are invisible in the \texttt{pdf}, \LaTeX{} braces should
+never be used to shorten what the reader sees as the argument of a
+function. \verb`\eval` assumes that the braced part is the \emph{whole}
+argument but the reader doesn't read that. For example, presented
+with \verb`\sin{2n}\pi`, \verb`\eval` assumes the sine's argument
+is $2n$ and does not extend to \verb`\pi`. This is not what a human
+reads in the \texttt{pdf}. The compiled expression, $\sin2n\pi$,
+is read as `the sine of $2n\pi$'. If the intention really is  to
+multiply $\pi$ by $\sin2n$ then the reader needs to \emph{see }that
+this is so: $(\sin2n)\pi$ perhaps or $\sin2n\times\pi$ or, best,
+$\pi\sin2n$, but \emph{not} by means of \LaTeX{} braces which leave
+no visual trace in the \texttt{pdf}. 
+
+\subsubsection{Unannounced braces}
+
+\emph{Unannounced} braced expressions should be used with care. When
+\verb`\eval` meets an unnanounced brace group it is `flying blind'.
+\LaTeX{} braces are `punctuation marks' for \LaTeX{} code, not for
+mathematical formulas. How could they be, since they do not display
+in the \texttt{pdf}? For \texttt{numerica} it is \emph{how things
+look in the }\texttt{\emph{pdf}} that is the guide. 
+
+\verb`\eval` converts an unannounced braced expression into its corresponding
+\texttt{l3fp} form and appends that to the overall expression that
+is to be evaluated. It does not do anything further. Note in particular
+that it does not first evaluate the braced expression and append the
+result to the overall expression, nor does it parenthesize the \texttt{l3fp}
+form of the braced expression, nor does it check to see if a multiplying
+asterisk \verb`*` should be appended or prepended to the \texttt{l3fp}
+form. It simply converts the braced expression into its \texttt{l3fp}
+form and appends.
+
+This works fine if, as suggested above, the braces surround a function
+like \verb`\max(x,y,z)` so it can be included in a multi-formula
+calculation, but it can give unexpected results in other contexts.
+Thus (math braces; \LaTeX{} braces),
+\begin{centred}
+\verb`\eval[ff]{\[ \{ 1+2 \}^2, { 1+2 }^2 \]}` $\Longrightarrow$
+\eval[ff]{\[ \{ 1+2 \}^2, { 1+2 }^2 \]}
+\end{centred}
+In the first of these \verb`eval` reads the math-braced expression,
+converts it into its \texttt{l3fp} form and appends that, which \emph{includes
+the math braces}, to the (empty at this stage) overall expression\emph{.
+}In the second of these, \verb`\eval` reads the braced expression,
+converts that to its \texttt{l3fp} form and appends the result to
+the (empty at this stage) overall expression. In both cases, \verb`\eval`
+proceeds to read and append \verb`^2` to the overall expression so
+that the superscript acts on a bracketed expression in the first case
+and on $2$ alone in the second. 
+
+A second example is
+\begin{centred}
+\verb`\eval[ff]{\[ 3\{ 2+1 \}, 3{ 2+1 } \]}` $\Longrightarrow$ \eval[ff]{\[ 3\{ 2+1 \} , 3{ 2+1 } \]}
+\end{centred}
+Similarly \verb`{ 2+1 }\tfrac13` displays like $2+1\tfrac{1}{3}$
+which one might naively expect to evaluate to $3.333333$ but in fact
+it evaluates to $2.333333$ since \texttt{l3fp} uses juxtaposition
+to mean \emph{multiply}. Because \LaTeX{} braces do not visibly display,
+this kind of result is all too likely. Unless there is some compelling
+reason to do otherwise  avoid \emph{unannounced} brace groups in expressions
+except to `hide' functions containing problematic characters (like
+the argument separator in $n$-ary functions in some contexts).
+
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+There is also a quirk (or feature) of \texttt{l3fp} that could catch
+one out. An expression of the form \verb`(1)1` produces a \LaTeX{}
+error when \texttt{l3fp} tries to evaluate it. In \texttt{l3fp} a
+number can be placed directly \emph{before} a parenthesized expression
+but not after; \verb`1(1)` and \verb`(1)1` are read very differently
+by the program. In normal use, `behind the scenes' \texttt{numerica}
+takes care of this quirk; a user should never have to worry about
+it. But this internal coping mechanism is not activated when the \texttt{l3fp}
+form of a braced group is appended to the overall expression.\end{shaded}%
+\end{minipage}
+
+\subsection{Numbers}
+
+\label{subsec:evalNumbers}In the present document the numerous examples
+presented mainly use ordinary decimal notation for numbers, but scientific
+notation is also available, both for input (see §\ref{subsec:settingsInputtingSciNotation})
+and output (see §\ref{subsec:evalScientificNotation}). 
+
+\subsubsection{Decimal point}
+
+Prior to version 3.0.0 the only decimal marker accepted was the dot
+(period, full stop). Now, by means of the \verb`comma` package option,
+the comma can also be used as the decimal point. This means using
+semicolons in the variable=value list (see below §\ref{sec:evalVv-list})
+and for separating the arguments of $n$-ary functions (§\ref{sec:calc-n-ary-functions})
+in line with ISO 80000 Part 2, section 3 which reads: `A comma, semicolon
+or other appropriate symbol can be used as a separator between numbers
+or expressions. The comma is generally preferred, except when numbers
+with a decimal comma are used.' When the \verb`comma` package option
+is used, \texttt{numerica} \emph{insists} on semicolons for separating
+items in the two contexts mentioned.
+
+\subsubsection{Grouping blocks of digits}
+
+Sometimes, to make numbers more readable, blocks of digits are grouped
+together, separated perhaps by spaces or by an explicit mark like
+a comma. \texttt{numerica} can digest numbers in which the grouping
+is by \emph{spaces}, but not a mark. `Out of the box', however,
+the package does not expect spaces in numbers. This needs to be turned
+on by the user by entering \verb`1s2` (or \verb`1s2=1`; \verb`1s2`
+indicating a space `s' between digits) in the settings option:
+\begin{centred}
+\verb`\eval[1s2]{ 12 345.678 901 }` $\Longrightarrow$ \eval[1s2]{ 12 345.678 901}
+\end{centred}
+\texttt{l3fp} works to $16$ significant figures; so does \texttt{numerica}.
+But experience suggests that in `everyday' use significantly fewer
+digits are generally used, both as input and output. The cases in
+which grouping digits aids readability will be rare. For this reason,
+`out of the box', \verb`1s2=0`. 
+
+Note that \verb`1s2=0` should not cause a \LaTeX{} error nor raise
+a message in \texttt{numerica} if a number containing spaces\emph{
+}is fed to \verb`\eval`, but the result may be disconcerting:
+\begin{centred}
+\verb`\eval[1s2=0]{ 12 34 }` $\Longrightarrow$ \eval[1s2=0]{ 12 34 }
+\end{centred}
+What has happened in the example is that $12$ and $34$ have been
+read separately as distinct numbers, an asterisk inserted between
+them, and multiplied.  Sometimes the product may lead to a result
+sufficiently close to the expected one as to pass unnoticed. For this
+reason it is recommended that spaces in numbers be avoided as a matter
+of habit except in rare special circumstances (e.g.\ when entering
+a number like \verb`0.7777 7777 7777 7777`).
+
+Grouping blocks of digits with spaces is available through the \verb`1s2`
+setting solely for \emph{inputting} numbers in the variable=value
+list or formula. The \verb`\eval` command does not \emph{output}
+numbers in this form. 
+
 \subsection{Variable names}
 
 \label{subsec:evalVariableNames}In mathematical practice, variable
 names are generally single letters of the Roman or Greek alphabets,
-sometimes also from other alphabets, in a variety of fonts, and often
-with subscripts or primes or other decorations. In \texttt{numerica}
-a variable name is \emph{what lies to the left of the equals sign
-in an item} of the vv-list. Thus variables can be multi-token affairs:
-$x',x'',x^{iv},x_{n},x'_{n},x''_{mn}$, $^{k}C_{n},var,\mathrm{var},Fred,\mathbf{Fred},\mathcal{FRED}\ldots$
-(This criterion for what makes a variable name means a name may contain
-spaces -- for instance \verb`x x` should not cause a \verb`numerica`
-error -- but such names are not part of mathematical practice.) Usually,
-for the kind of back-of-envelope calculations envisaged for \verb`numerica`,
-and for ease of typing, most variables will be single letters from
-the Roman or Greek alphabets.
+or occasionally from other alphabets, in a variety of fonts, and often
+with subscripts or primes or other decorations: $x,\,\boldsymbol{x},\,\mu,\,x',\,\alpha'',$
+$\,T^{iv},\,\Theta_{n},\,\boldsymbol{a}'_{n},\,\beta''_{mn},\,\vec{v},\,k^{+},\,k_{-}$
+are examples. \texttt{numerica} does not attempt to characterize variables
+by their `internals'(alphabet, font, decoration, etc.). Rather,
+the program accepts as a variable \emph{whatever lies to the left
+of the equals sign }in an item of the variable=value list (for which
+see  §\ref{sec:evalVv-list} immediately below). 
 
-Because equals signs and commas give structure to the vv-list, it
-should also be clear that a variable name should not contain a \emph{naked}
-equals sign or a \emph{naked} comma. They can be incorporated in a
-variable name but only when decently wrapped in braces, like \verb`R_{=}`
-displaying as $R_{=}$ or \verb`X_{,i}` displaying as $X_{,i}$.
+What lies to the left is a \emph{\LaTeX{} expression}. Different \LaTeX{}
+almost always means different variable. For instance $x$ and x are
+\emph{different} variables since, in the underlying \LaTeX , one is
+\verb`x` and the other \verb`\mathrm{x}`. I write `\emph{almost}
+always' because there are exceptions. Since braces do not display
+in the \texttt{pdf}, names that look identical in the \texttt{pdf}
+may well be distinct in \LaTeX . This is true particularly of superscripts
+and subscripts: \verb`x_0` and \verb`x_{0}` appear identical in
+the \texttt{pdf} but in the underlying \LaTeX{} they are distinct,
+and will be treated as distinct variables by \texttt{numerica}. The
+user needs to be aware of this. Also, because equals signs and commas
+give structure to the variable=value list, a variable name should
+not contain a \emph{naked} equals sign or a \emph{naked} comma. Instead
+they should be decently wrapped in braces, like \verb`R_{=}` displaying
+as $R_{=}$. These provisos aside, variables can be single- or multi-token,
+can be in different fonts, can be decorated with primes and indices
+– and may even contain spaces. (But please don’t; such names are not
+part of mathematical practice.) If a variable is natural to the mathematical
+context, it will almost certainly be accepted as a variable in \texttt{numerica}.
+For the kind of back-of-envelope calculations envisaged for the package,
+most variables will be single letters from the Roman or Greek alphabets.
 
-Note that $x$ and $\mathrm{x}$ will be treated by \verb`numerica`
-as \emph{different} variables since, in the underlying \LaTeX , one
-is \texttt{x} and the other \verb`\mathrm{x}`. Even names that look
-identical in the pdf may well be distinct in \LaTeX . This is true
-particularly of superscripts and subscripts: \verb`x_0` and \verb`x_{0}`
-appear identical in the pdf but in the underlying \LaTeX{} they are
-distinct, and will be treated as distinct variables by \verb`numerica`.
+\subsubsection{Multi-token variable handling}
 
 Although multi-token variables are perfectly acceptable, \emph{internally}
-\verb`numerica` works with single tokens. Variable names can be so
-different in structure, one from another, that to ease the parsing
+\texttt{numerica} works with single tokens. Variable names can be
+so different in structure, one from another, that to ease the parsing
 of formulas, all \emph{internal} variable names are assumed to be
 single tokens. Hence a necessary initial step for the package is to
 map all multi-token variable names in the vv-list and the formula
-to single tokens. \verb`numerica` does this by turning the multi-token
+to single tokens. \texttt{numerica} does this by turning the multi-token
 variable names into control sequences with names in the sequence \verb`\nmc_a`,
 \verb`\nmc_b`, \verb`\nmc_c`, etc., then searches through the vv-list
 and the formula for every occurrence of the multi-token names and
@@ -696,38 +1377,41 @@
 order of decreasing size of name, working from the names that contain
 most tokens down to names containing only two tokens. (Doing the replacing
 in this order prevents \emph{parts} of longer names possibly being
-mistaken for shorter variable names.)
+mistaken for shorter variable names.) 
 
 The conversion process uses computer resources. Even if there are
-no multi-token variables present, \verb`numerica` still needs to
-check that this is so -- unless the user alerts the program to the
-fact. This can be done by making a brief entry \texttt{xx=0 }in the
-settings option (the second optional argument of \verb`\nmcEvaluate`);
-see §\ref{subsec:settingsMultitokSwitch}. If the user never (or hardly
-ever) uses multi-token variables, then a more permanent solution is
-to create a file \verb`numerica.cfg`\texttt{ }with the line \texttt{multitoken-variables
-= false}; see §\ref{sec:settingsDefaults} for this.
+no multi-token variables present, \texttt{numerica} still needs to
+check that this is so – unless the user alerts the program to the
+fact with the setting \verb`xx=0`; see §\ref{subsec:settingsMultitokSwitch}.
 
-\subsection{The vv-list and its use}
+\section{The variable=value list}
 
-A vv-list is a comma-separated list where each item is of the form
-\emph{variable=value}. It might be something simple like 
-\begin{lyxcode}
-{[}g=9.81,t=2{]}
-\end{lyxcode}
-or something more complicated like 
-\begin{lyxcode}
-{[}V\_S=\textbackslash tfrac43\textbackslash pi~r\textasciicircum 3,V\_C=2\textbackslash pi~r\textasciicircum 2h,h=3/2,r=2{]}.
-\end{lyxcode}
-Spaces around the equals signs or the commas are stripped away during
-processing so that 
-\begin{lyxcode}
-{[}g=9.81,t=2{]}~\textrm{and}~{[}~g~=~9.81~,~t~=~2{]}
-\end{lyxcode}
+\label{sec:evalVv-list}To evaluate algebraic, trigonometric and other
+formulas that involve variables we need to give those variables values.
+This is done in the \emph{variable=value list} – or \emph{vv-list}
+for short. This is the fourth argument of the \texttt{\textbackslash nmcEvaluate}
+command and is a square-bracket delimited optional argument (optional
+because an expression may depend only on constants and numbers).
+
+A vv-list is a comma-separated list (or, if the \verb`comma` package
+option is used, semicolon-separated list) where each item is of the
+form \emph{variable=value}. It might be something simple like \verb`[g=9.81,t=2]`
+or something more complicated like
+\begin{verbatim}
+    [V_S=\tfrac43\pi r^3,V_C=2\pi r^2h,h=3/2,r=2].
+\end{verbatim}
+Spaces around the equals signs or the commas (resp., semicolons) are
+stripped away during processing so that \verb`[g=9.81,t=2]` and \verb`[ g = 9.81 , t = 2 ]`
 are the \emph{same} variable=value list.
 
-\subsubsection{Evaluation from right to left}
+\emph{Math delimiters should never be used in the vv-list. }If they
+are present they will cause errors. Math delimiters have a part to
+play only in the main argument, where their presence or absence can
+determine the form of display of the result, as discussed above in
+§\ref{subsec:introResultDisplay}.
 
+\subsection{Evaluation from right to left}
+
 In these examples, with variables depending on other variables, there
 is an implication: that the list is evaluated \emph{from the right}.
 Recall how a function of a function is evaluated, say\emph{ }$y=f(g(h(x)))$.
@@ -734,7 +1418,7 @@
 To evaluate $y$, first $x$ is assigned a value then $h(x)$ is calculated,
 then $g(h(x))$ then $f(g(h(x)))=y$. We work from right to left,
 from the innermost to the outermost element. Or consider an example
-like calculating the area of a triangle by means of the formula 
+like calculating the area of a triangle by means of the formula
 \[
 A=\sqrt{s(s-a)(s-b)(s-c)}.
 \]
@@ -741,157 +1425,212 @@
 First we write the formula; then we state how $s$ depends on $a,b,c$,
 namely $s=\frac{1}{2}(a+b+c)$, then we give values to $a,b,c$. In
 \texttt{numerica} this is mirrored in the layout of the \verb`\eval`
-command: 
+command:
 \begin{verbatim}
     \eval{$ \sqrt{s(s-a)(s-b)(s-c)} $}
                  [s=\tfrac12(a+b+c),a=3,b=4,c=5]
 \end{verbatim}
 The formula in a sense is the leftmost extension of the vv-list. The
-entire evaluation occurs from right to left.
+entire evaluation occurs from right to left. This means that the rightmost
+variable in the vv-list can depend only on constants and numbers –
+although it may be a complicated expression of those elements. Other
+variables in the vv-list can depend on variables \emph{to their right}
+but not to their left.
 
-This means that the rightmost variable in the vv-list can depend only
-on constants and numbers -- although it may be a complicated expression
-of those elements. Other variables in the vv-list can depend on variables
-\emph{to their right} but not to their left.
+\subsection{Constants}
 
-\subsubsection{Expressions in the variable=value list}
+\label{subsec:evalBuilt-in-Constants}\texttt{numerica} has five built-in
+constants and can also accept user-defined constants. For the latter,
+see §\ref{sec:supplConstants}. The five built-in constants known
+to \texttt{numerica} are \verb`\pi`, the ratio of circumference to
+diameter of a circle; \verb`e`, the base of natural logarithms; Euler's
+constant \verb`\gamma`, the limit of $\left(\sum_{1}^{N}1/n\right)-\ln N$
+as $N\to\infty$; the golden ratio \verb`\phi`, equal to $\tfrac{1}{2}(1+\surd5)$;
+and the utilitarian constant \verb`\deg`, the size of a degree in
+radians. Using a comma list for a multi-formula calculation and an
+\verb`align*` environment,
+\begin{centred}
+\verb`\eval[env=align*,pp,p,ff]{ \pi, e, \gamma, \phi, \deg }` $\Longrightarrow$
+\eval[env=align*,pp,p,ff]{ \pi, e, \gamma, \phi, \deg }
+\end{centred}
+\noindent so that \verb`\eval{$ 180\deg $}` $\Longrightarrow$ \eval{$ 180\deg $}
+(as it should).
 
+In some contexts it may feel natural to use any or all of \verb`\pi`,
+\verb`e`, \verb`\gamma` and \verb`\phi` as variables by assigning
+values to them in the vv-list. \texttt{numerica} does not object.
+The values assigned in this way override the built-in constant values. 
+
+For example, if instead of the usual ABC we label a triangle EFG with
+sides (note!) $e=3,f=4$ and $g=5$, its area is\medskip{}
+\begin{verbatim}
+    \eval{$ \sqrt{s(s-e)(s-f)(s-g)} $}
+              [s=\tfrac12(e+f+g),e=3,f=4,g=5]       
+\end{verbatim}
+$\Longrightarrow$ 
+
+\eval{$ \sqrt{s(s-e)(s-f)(s-g)} $}
+              [s=\tfrac12(e+f+g),e=3,f=4,g=5].\medskip{}
+
+\noindent Clearly the value $3$ assigned to \verb`e` in the vv-list
+has been used in the calculation, not the value of the constant. But
+if \verb`e` (or \verb`\pi` or \verb`\gamma` or \verb`\phi`) is
+not assigned a value in the vv-list then it has, by default, the value
+of the constant. In the case of \verb`e`, if you wish to use it as
+a variable, the constant is always available as \verb`\exp(1)`. No
+similar alternative is available for \verb`\pi`, \verb`\gamma` or
+\verb`\phi`. 
+
+\subsection{Expressions in the variable=value list}
+
 Suppose our expression is $\tfrac{4}{3}\pi r^{3}$, the volume $V_{S}$
 of a sphere in terms of its radius $r$, and we want to calculate
 the volume for different values of $r$ to get a sense of how rapidly
-volume increases with radius. 
+volume increases with radius.
 \begin{centred}
-\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=1] $` $\Longrightarrow$ $V_{S}=\eval{\tfrac{4}{3}\pi r^{3}}[r=1]$.
+\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=1] $` $\Longrightarrow$ $ V_S=\eval{ \tfrac43\pi r^3 }[r=1] $.
 \end{centred}
 Having set up this calculation it is now an easy matter to change
-the value of $r$ in the vv-list: 
+the value of $r$ in the vv-list:
 \begin{centred}
 \verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=1.5] $` $\Longrightarrow$
-$V_{S}=\eval{\tfrac{4}{3}\pi r^{3}}[r=1.5]$.
-
-\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=2] $` $\Longrightarrow$ $V_{S}=\eval{\tfrac{4}{3}\pi r^{3}}[r=2]$. 
+$\vsp V_S= \eval{ \tfrac43\pi r^3 }[r=1.5] $.
 \end{centred}
-To compute the volume $V_{C}=\pi r^{2}h$ of a cylinder, we have two
-variables to assign values to: 
+Or we could `rephrase' the calculation like this:
 \begin{centred}
-\verb`$ V_C=\eval{ \pi r^2h }[h=4/3,r=1] $` $\Longrightarrow$ $V_{C}=\eval{\pi r^{2}h}[h=4/3,r=1]$.
+\verb`\eval{$ V_S $}[V_S=\tfrac43\pi r^3,r=2]` $\Longrightarrow$
+$\vsp$\eval{$ V_S $}[V_S=\tfrac43\pi r^3,r=2].
 \end{centred}
-Although values in the vv-list are generally either numbers or simple
-expressions (like \texttt{4/3}), that is not essential. A little more
-complicated is 
+As you can see, values in the vv-list are not limited to numbers.
+They can be expressions depending on constants, numbers or other variables
+to their right in the list. This calculation also shows a multi-token
+variable (\verb`V_S`) being used.
+
+Another example: to compute the volume $V_{C}=\pi r^{2}h$ of a cylinder,
+we have two variables to assign values to:
 \begin{centred}
+\verb`$ V_C=\eval{ \pi r^2h }[h=4/3,r=1] $` $\Longrightarrow$ $\vsp V_C=\eval{ \pi r^2h }[h=4/3,r=1] $.
+\end{centred}
+Or we can divide the calculation up like this,
+\begin{centred}
 \verb`$ V_C=\eval{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
-$V_{C}=\eval{hA_{C}}[A_{C}=\pi r^{2},h=4/3,r=1]$.
+$\vsp V_C=\eval{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $,
 \end{centred}
-where calculation of the volume of the cylinder has been split into
-two: first calculate the area $A_{C}$ of its circular base and then,
-once that has been effected, calculate the volume.
+which emphasizes that the volume is `base $\times$ height' (and
+again uses a multi-token variable).
 
-A second example is provided by Brahmagupta's formula for the area
-of a triangle in terms of its semi-perimeter. In a triangle ABC, the
-sides are $a=3$, $b=4$ and $c=5$. (Of course we know this is a
-right-angled triangle with area $\tfrac{1}{2}ab=6$.) The semi-perimeter
-$s=\tfrac{1}{2}(a+b+c)$ and the area of ABC is \medskip{}
+A third instance is provided by the example above in which we calculated
+the area of a triangle by means of Brahmagupta's formula.
 
+\subsection{Display of the vv-list}
+
+By default, the vv-list is displayed with the numerical result. That
+and the format of the display can both be changed.
+
+\subsubsection{Changing the display format}
+
+\label{subsec:evalChanging-display-format}In the example above where
+the area of a triangle is calculated using Brahmagupta's formula,
+display of the result is crowded. One remedy is to force display of
+the vv-list to a new line. In the default set-up, this happens automatically
+if the \verb`env` setting is equated to \verb`multline` or \verb`multline*`.
+Let's do this when Brahmagupta's formula is used not for a triangle
+but in the more challenging case of a cyclic quadrilateral.
+
+The cyclic quadrilateral in question is formed by a 45-45-90 triangle
+of hypotenuse 2 joined to a 30-60-90 triangle along its hypotenuse
+of the same length. Two triangles, six vertices but the two along
+the hypotenuses are shared, hence four vertices in all, lying on a
+circle. The sides of the cyclic quadrilateral are therefore $\surd2,\surd2,\surd3,1$.
+Adding the areas of the two triangles, the area of the quadrilateral
+is $A=1+\tfrac{1}{2}\surd3$, or in decimal form, \verb`$\eval{1+\tfrac12\surd3}$`
+$\Longrightarrow$ $\eval{1+\tfrac12\surd3}$. Let's check with Brahmagupta's
+formula:
 \begin{verbatim}
-    \eval{$ \sqrt{s(s-a)(s-b)(s-c)} $}
-                 [s=\tfrac12(a+b+c),a=3,b=4,c=5] 
+    \eval[env=multline*]{\sqrt{(s-a)(s-b)(s-c)(s-d)}}
+        [s=\tfrac12(a+b+c+d),
+           a=\surd2,b=\surd2,c=\surd3,d=1] 
 \end{verbatim}
-$\Longrightarrow$ \eval{$ \sqrt{s(s-a)(s-b)(s-c)} $}
-                 [s=\tfrac12(a+b+c),a=3,b=4,c=5] .
+$\Longrightarrow$     \eval[env=multline*]{ 
+      \sqrt{(s-a)(s-b)(s-c)(s-d)}
+         }[s=\tfrac12(a+b+c+d),
+           a=\surd2,b=\surd2,c=\surd3,d=1] 
 
-\subsubsection{Constants}
+\subsubsection{Suppressing display of the vv-list}
 
-\label{subsec:Built-in-Constants}\verb`numerica` has five built-in
-constants and can also accept user-defined constants. For the latter,
-see §\ref{sec:supplConstants}. The five built-in constants known
-to \texttt{numerica} are \verb`\pi`, the ratio of circumference to
-diameter of a circle; \verb`e`, the base of natural logarithms; Euler's
-constant \verb`\gamma`, the limit of $\left(\sum_{1}^{N}1/n\right)-\ln N$
-as $N\to\infty$; the golden ratio \verb`\phi`, equal to $\tfrac{1}{2}(1+\surd5)$;
-and the utilitarian constant \verb`\deg`, the number of radians in
-a degree.
-\begin{centred}
-\verb`\eval{$ \pi $}` $\Longrightarrow$ \eval{$ \pi $},
+\label{subsec:evalVvSuppresList}
 
-\verb`\eval{$ e $}` $\Longrightarrow$ \eval{$ e $},
+\paragraph{Star (\texttt{{*}}) option}
 
-\verb`\eval{$ \gamma $}` $\Longrightarrow$ \eval{$ \gamma $},
-
-\verb`\eval{$ \phi $}` $\Longrightarrow$ \eval{$ \phi $} ,
-
-~\verb`\eval{$ \deg $}` $\Longrightarrow$ \eval{$ \deg $},
+If display of the vv-list is not wanted at all, only the numerical
+result, it suffices to attach an asterisk (star) to the \verb`\eval`
+command, giving a `naked' result:
+\begin{centred}
+\verb`\eval*{ hA_C }[A_C=\pi r^2,h=4/3,r=1]` $\Longrightarrow$ \eval*{ hA_C }[A_C=\pi r^2,h=4/3,r=1].
 \end{centred}
-so that \verb`\eval{$ 180\deg $}` $\Longrightarrow$ \eval{$ 180\deg $}
-(as it should).
+The star option for a multi-formula calculation evaluates each formula
+and presents the numerical result of each calculation with a space
+between; it is minimal and inelegant:
+\begin{centred}
+\verb`\eval*[ff]{ \surd x, x, x^2 }[x=\pi]` $\Longrightarrow$ \eval*[ff]{ \surd x, x, x^2 }[x=\pi]
+\end{centred}
+However, the \verb`pp` setting is available to add a comma (for instance)
+and the \verb`sep` setting can change the space – perhaps \verb`sep=\quad`.
 
-Let's combine two of these in a formula: 
+Note that with the star option a negative result will display with
+a hyphen for the minus sign. 
 \begin{centred}
-\verb`\eval{$ e^\pi-\pi^e $}` $\Longrightarrow$ \eval{$ e^\pi-\pi^e $},
+\verb`\eval*{ y }[y=ax+b,x=2,a=-2,b=2]` $\Longrightarrow$ \eval*{ y }[y=ax+b,x=2,a=-2,b=2],
 \end{centred}
-which is close-ish to $\tfrac{1}{4}e$: \verb`\eval{$ \tfrac14e $}`
-$\Longrightarrow$ \eval{$ \tfrac14e $}.
+In a math environment, the hyphen will display as a minus sign. Wrapping
+\verb`\eval*` around math delimiters or using the \verb`env` option
+has no effect – the \verb`*` dominates.
 
-\noindent{}%
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-In some contexts it may feel natural to use any or all of \verb`\pi`,
-\verb`e`, \verb`\gamma` and \verb`\phi` as variables by assigning
-values to them in the vv-list. \cprotect\texttt{numerica} does not
-object. The values assigned in this way override the constants' values.
-For example, if the triangle we labelled ABC previously was instead
-labelled CDE then it has sides $c=3,d=4$ and (note!) $e=5$. It's
-area therefore is\medskip{}
+\paragraph{No math environment:}
 
-\begin{verbatim}
-    \eval{$ \sqrt{s(s-c)(s-d)(s-e)} $}
-              [s=\tfrac12(c+d+e),c=3,d=4,e=5]       
-\end{verbatim}
-$\Longrightarrow$    \eval{$ \sqrt{s(s-c)(s-d)(s-e)} $}
-              [s=\tfrac12(c+d+e),c=3,d=4,e=5] .\medskip{}
+In the absence of a math environment, recall from §\ref{subsec:introResultDisplay},
+\verb`\eval` (no star!) automatically presents the numerical result
+\emph{without vv-list} between \verb`$` delimiters, (so that negative
+values display with a proper minus sign):
+\begin{centred}
+\verb`\eval{ y }[y=ax+b,x=2,a=-2,b=2]` $\Longrightarrow$ \eval{ y }[y=ax+b,x=2,a=-2,b=2].
+\end{centred}
 
-\noindent Since this is the correct area we see that \cprotect\texttt{e}
-has been treated as a variable with the assigned value $5$, not as
-the constant. But if \cprotect\texttt{e} (or \noindent\verb`\pi`
-or \noindent\verb`\gamma` or \noindent\verb`\phi`) is not assigned
-a value in the vv-list then it has, by default, the value of the constant.
-In the case of \cprotect\texttt{e}, if you wish to use it as a variable,
-the constant is always available as \noindent\verb`\exp(1)`. There
-is no similar alternative available for \noindent\verb`\pi`, \noindent\verb`\gamma`
-or \noindent\verb`\phi`. \end{shaded}%
-\end{minipage}
+\paragraph{Settings option:}
 
-\subsection{Display of the vv-list}
+Display of the vv-list can also be suppressed through the settings
+option, by writing \verb`vv= ` there – i.e.\ by giving the key \verb`vv`
+an empty value. If the example above is too bare, then perhaps
+\begin{centred}
+\verb`\eval[vv=]{$ V_C $}[V_C=h\pi r^2,h=4/3,r=1]` $\Longrightarrow$
+\eval[vv=]{$ V_C $}[V_C=h\pi r^2,h=4/3,r=1]
+\end{centred}
+is more acceptable? See §\ref{subsec:settingsVvDisplayChangeLocal}
+for a fuller discussion of the \verb`vv` setting.
 
-\noindent By default, the vv-list is displayed with (in fact following)
-the numerical result. That and the format of the display can both
-be changed.
+\paragraph{Scriptstyle contexts: }
 
-\subsubsection{Star option: suppressing display of the vv-list}
-
-\label{subsec:evalVvSuppresList}If display of the vv-list is not
-wanted at all, only the numerical result, it suffices to attach an
-asterisk (star) to the \texttt{\textbackslash eval} command: 
+In versions of \texttt{numerica} before version 3, display of the
+vv-list was automatically suppressed in scriptstyle (and scriptscriptstyle)
+contexts. This occurred by means of \TeX 's \verb`\mathchoice` command.
+Version 3.0.0 of \texttt{numerica} has dispensed with\texttt{ }\verb`\mathchoice`
+and requires the user to suppress display in these contexts (if so
+wished), by starring the \verb`\eval` command:
 \begin{centred}
-\verb`$ V_C=\eval*{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
-$V_{C}=\eval*{hA_{C}}[A_{C}=\pi r^{2},h=4/3,r=1]$, 
+\verb`$e^{\eval*{xy}[x=\pi,y=1/e]}$` $\Longrightarrow$ $e^{ \eval*{xy}[x=\pi,y=1/e]}$
 \end{centred}
-or simply the naked result:
+
+\paragraph{Empty vv-list suppressed:}
+
+Should the vv-list be empty, or display of \emph{all} variables be
+suppressed by wrapping each in braces (see next, §\ref{subsec:evalVvSuppressVars}),
+then \emph{nothing} is displayed where the vv-list would normally
+be:
 \begin{centred}
-\verb`\eval*{$ hA_C $}[A_C=\pi r^2,h=4/3,r=1]` $\Longrightarrow$
-\eval*{$ hA_C $}[A_C=\pi r^2,h=4/3,r=1].
+\verb`$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,{h}=4/3,{r}=1] $.` $\Longrightarrow$
+$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,{h}=4/3,{r}=1]. $
 \end{centred}
-In the latter case, note that a negative result will display with
-a hyphen for the minus sign unless you, the user, explicitly write
-math delimiters around the \verb`\eval*` command as a whole. Wrapping
-them around the formula has no effect:
-\begin{centred}
-\verb`\eval*{$ y $}[y=ax+b,x=2,a=-2,b=2]` $\Longrightarrow$ \eval*{$ y $}[y=ax+b,x=2,a=-2,b=2],
 
-\verb`$ \eval*{ y }[y=ax+b,x=2,a=-2,b=2] $` $\Longrightarrow$ $\eval*{y}[y=ax+b,x=2,a=-2,b=2]$.
-\end{centred}
-The star option delivers a number as result, pure and simple.
-
 \subsubsection{Suppressing display of items}
 
 \label{subsec:evalVvSuppressVars}You may wish to retain some variables
@@ -898,154 +1637,141 @@
 in the vv-list display, but not all. For those variables you wish
 omitted from the display, wrap each variable (but not the equals sign
 or value) in braces. When calculating the volume of a cylinder in
-the previous examples, the base area $A_{C}$ has a different status
+a previous example, the base area $A_{C}$ has a different status
 from the `fundamental' variables $r$ and $h$. It is an intermediate
 value, one that we pass through on the way to the final result. To
-suppress it from display enclose the variable in braces: 
+suppress it from display enclose the variable in braces:
 \begin{centred}
 \verb`$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
-$V_{C}=\eval{hA_{C}}[{A_{C}}=\pi r^{2},h=4/3,r=1]$.
+$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,h=4/3,r=1] $.
 \end{centred}
 As you can see, $A_{C}$ no longer appears in the displayed vv-list.
 Of course the name and its value are still recorded `behind the scenes'
-and can still be used in calculations.
+and can still be used in calculations. Note that the braces enclose
+only the variable name, not the equals sign or the value.
 
-\subsubsection{Empty vv-list suppressed}
-
-Should the vv-list be empty, or display of \emph{all} variables is
-suppressed by wrapping each in braces, then \emph{nothing} is displayed
-where the vv-list would normally be, not even any punctuation: 
-\begin{centred}
-\verb`$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,{h}=4/3,{r}=1] $` $\Longrightarrow$
-$V_{C}=\eval{hA_{C}}[{A_{C}}=\pi r^{2},{h}=4/3,{r}=1]$
-\end{centred}
-If you want a full stop after the result then you will need to add
-it by hand or use the \verb`p=.` setting of §\ref{subsec:settingsPunctuation}.
-
-\subsubsection{Changing the display format}
-
-\label{subsec:evalChanging-display-format}In two examples above,
-we have calculated the area of a triangle using Brahmagupta's formula.
-Display of the result is crowded. Two remedies have just been suggested,
-but a third one and preferable in this case would be to force display
-of the vv-list and result to a new line. This can be done through
-the settings option to the \verb`\eval` command, discussed in §\ref{subsec:settings New-line-display}.
-However, if \verb`\eval` is wrapped around an \emph{appropriate}
-environment (like \verb`multline`, but not \verb`equation`) it can
-also be done simply by including \texttt{\textbackslash\textbackslash}
-at the end of the formula.
-
-In the following example I use Brahmagupta's formula for calculating
-the area of a cyclic quadrilateral (of which his formula for a triangle
-is a special case). The cyclic quadrilateral in the example is formed
-by a 45-45-90 triangle of hypotenuse 2 joined along the hypotenuse
-to a 30-60-90 triangle. The sides are therefore $\surd2,\surd2,\surd3,1$.
-Adding the areas of the two triangles, the area of the quadrilateral
-is $A=1+\tfrac{1}{2}\surd3$, or in decimal form, \verb`$\eval{1+\tfrac12\surd3}$`
-$\Longrightarrow$ $\eval{1+\tfrac{1}{2}\surd3}$. Let's check with
-Brahmagupta's formula: 
-\begin{verbatim}
-    \eval{
-      \begin{multline*}
-        \sqrt{(s-a)(s-b)(s-c)(s-d)}\\
-      \end{multline*} 
-         }[s=\tfrac12(a+b+c+d),
-           a=\surd2,b=\surd2,c=\surd3,d=1] 
-\end{verbatim}
-$\Longrightarrow$     \eval{
-      \begin{multline*}
-        \sqrt{(s-a)(s-b)(s-c)(s-d)}\\
-      \end{multline*} 
-         }[s=\tfrac12(a+b+c+d),
-           a=\surd2,b=\surd2,c=\surd3,d=1] %
+\noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
 
-\subsubsection{Abusing multi-token variable names}
+\subsection{Abusing multi-token variable names}
 
 \label{subsec:evalDon't-do-this!}A variable name is what lies to
 the left of the equals sign of an item in the vv-list. Since multi-token
-variables are converted to single tokens (like \verb`\nmc_a`) before
-any calculating is done, it is possible to sin. Thus : 
+variables are converted to single tokens before any calculating is
+done, it is possible to sin. We can, for instance, make $\sin\pi$
+a variable name and produce an absurdity:
 \begin{centred}
 \verb`\eval{$ \sin\pi $}[{\sin\pi}=1]` $\Longrightarrow$ \eval{$ \sin\pi $}[{\sin\pi}=1];
 \end{centred}
-and (more?) egregiously, 
+or similarly treat a number as a variable name and produce another:
 \begin{centred}
-\verb`\eval{$ 10 $}[{10}=20]` $\Longrightarrow$ \eval{$ 10 $}[{10}=20].
+\verb`\eval{$ -1 $}[{-1}=1]` $\Longrightarrow$ \eval{$ -1 $}[{-1}=1].
 \end{centred}
 What is happening here is that the multi-token `variables' \verb`\sin\pi`
-and \verb`10` are being converted, right at the start of proceedings,
-to single tokens like \verb`\nmc_a`, which in \TeX -speak are macros
-containing their respective multiple tokens. For display purposes
-they expand to those multiple tokens, but for calculating within \verb`numerica`
-the single token is used. By this means one can easily create further
-grotesqueries: 
-\begin{centred}
-\verb`\eval{$ {++} + {++} $}[{++}=1]` $\Longrightarrow$ \eval{$ {++} + {++} $}[{++}=1],
+and \verb`-1` are converted, right at the start of proceedings, to
+single tokens like \verb`\nmc_a`, \verb`\nmc_b`. These \TeX{} macros
+expand to their respective multi-token variable names when \emph{displayed},
+but for calculating within \texttt{numerica} the single token is used.
+By this means it is easy to construct whatever grotesqueries you like.
+\medskip{}
 
-\verb`\eval{$ {2(1}+{+1)} $}[{2(1}=3,{+1)}=5]` $\Longrightarrow$
-\eval{$ {2(1}+{+1)} $}[{2(1}=3,{+1)}=5],
-
-\verb`\eval{$ 1!! $}[{!!}=42]` $\Longrightarrow$ \eval{$ 1!! $}[{!!}=42].
-\end{centred}
-Should \verb`numerica` try to check variable names to avoid consequences
-like this? I don't see any reasonable way of doing that. Symbols like
-\verb`(` and \verb`+` can easily be part of valid variable names
--- $k^{+},\,k^{-}$, $C_{n}^{(0)}$ and so on. It is left to the
-user, in any \emph{public} document, to avoid such sins. (And they
-could easily construct the displayed expressions in \LaTeX{} if they
-so wished without recourse to \verb`\eval` at all.) See also §\ref{subsec:supplMacrosDisplay}
+Should \texttt{numerica} try to check variable names to avoid consequences
+like this? I see no reasonable way of doing so. Digits, and symbols
+like \verb`(` and \verb`+`, can easily be part of valid variable
+names – $k^{+}$, $x_{1}$, $C_{n}^{(0)}$ and so on. It is left to
+the user, in any \emph{public} document, to avoid such sins (which
+can easily be constructed in \LaTeX{} without recourse to \verb`\eval`
+at all, should the user so wish). See also §\ref{subsec:supplMacrosDisplay}
 where a similar issue arises with user-defined macros.\end{shaded}%
 \end{minipage}
 
 \section{Formatting the numerical result}
 
-\noindent\label{subsec:evalRoundingEtc}Internally, values are stored
-to $16$ significant figures (if available), calculations are carried
-out to $16$ significant figures, but only rarely do we want to view
-the result to $16$ figures. Generally, we round to some smaller number
-of figures. The default rounding value is $6$, meaning by default
-at most $6$ decimal places are shown. So far, all results have been
-rounded to this figure, although not all digits are always displayed
--- for instance if the sixth one is $0$, or the result is an integer.
+\label{sec:evalRoundingEtc}Internally, values are stored to $16$
+significant figures (if available), calculations are carried out to
+$16$ significant figures, but only rarely are results displayed to
+$16$ figures. Generally, they are rounded to some smaller number
+of figures. The default `out of the box' rounding value is $6$,
+meaning at most $6$ decimal places are shown. (It can of course be
+reset with the \verb`rounding` package option, e.g. \verb`rounding=4`;
+see §§\ref{subsec:introPackagesOptions}, \ref{subsec:evalRounding-value}.)
+So far, nearly all results have been rounded to the default figure,
+although not all digits are always displayed – for instance if the
+sixth one is $0$, or the result is an integer. 
 
-Like other elements of the display, both rounding value and the (dis)appearance
-of trailing zeros can be customized, in this case by means of an optional
-argument following the vv-list (or the formula if there is no vv-list).
-This optional argument may contain up to four juxtaposed items from
-six possibilities: 
+But \texttt{numerica} is not limited to the decimal presentation of
+results. Scientific notation is also available, as is fraction-form
+output with numerator and denominator both integers, and boolean output
+when the formula being evaluated is a comparison, treated by the \verb`\eval`
+command not as a statement like \emph{`A is less than B'} but rather
+as a question: \emph{`Is A less than B?'}.
+
+The appearance of the result in any of these various formats can be
+chosen and customized by means of a square-bracketed optional argument
+following the vv-list – or the formula if there is no vv-list. This
+optional argument may contain a number of juxtaposed items from these
+possibilities:
 \begin{itemize}
-\item a question mark ?, which gives boolean output, or 
+\item a question mark \verb`?` which gives boolean output, $1$ for true,
+$0$ for false; see §\ref{subsec:evalBoolean-output};
+\begin{itemize}
+\item a second question mark, \verb`??`, which gives boolean output $T$
+for true, $F$ for false;
+\item a third question mark, \verb`???`, which gives boolean output \verb`T`
+for true, \verb`F` for false;
+\end{itemize}
+\item a slash \verb`/` which gives output in slash-fraction form with integers
+for both numerator and denominator; see §\ref{subsec:evalFraction-form-output};
+if followed by \verb`s` the fraction will be formed with the \verb`\sfrac`
+command from the \verb`xfrac` package if loaded, or in scriptstyle
+slash fraction form if not; 
+\begin{itemize}
+\item a second slash, \verb`//`, which gives output in fraction form using
+\verb`\frac` with integers for both numerator and denominator; if
+followed by \verb`t` or \verb`d` the fraction will be formed with,
+respectively, the \verb`\tfrac` or \verb`\dfrac` commands from \verb`amsmath`;
+\end{itemize}
 \item an integer, the \emph{rounding value}, positive, negative or zero,
-specifying how many decimal places to display the result to, or 
-\item an asterisk {*}, which pads the result with zeros should it not have
-as many decimal places as the rounding value specifies, or 
-\item the character \texttt{x} (lower case!) which presents the result in
-`proper' scientific notation (a form like $1.2345\times10^{5}$ for
-123450), or 
-\item the character \texttt{t} (lower case!) which presents the result in
-a bastardized scientific notation useful in tables (a form like $(5)1.2345$
-for 123450), or 
-\item a character other than \texttt{?}, \texttt{{*}}, \texttt{x}, \texttt{t}
-or an integer, usually one of the letters\texttt{ e d} \texttt{E D},
-which presents the result in scientific notation with that character
-as the exponent mark (a form like $1.2345\text{e}5$ for $123450$). 
+specifying how many decimal places to display the result to, or to
+how many zeros after the decimal point fraction-form output approximates
+the result; see §\ref{subsec:evalRounding-value} and §\ref{subsec:evalFraction-form-output}; 
+\item an asterisk, {*}, which pads the result with zeros should it not display
+as many decimal places as the rounding value specifies; see §\ref{subsec:evalPadding-with-zeros};
+\item the character \verb`x` (lower case!) which presents the result in
+`proper' scientific notation (a form like $1.2345\times10^{5}$
+for 123450) except for numbers in the interval \verb`[1,10)`; see
+§\ref{subsec:evalSciNotation1to10};
+\begin{itemize}
+\item the character \verb`x` repeated, \verb`xx`, which extends the notation
+to numbers in the interval \verb`[1,10)`;
 \end{itemize}
-If you use \texttt{?} in the same specification as some other character,
-the \texttt{?} prevails; if you use \texttt{x} in the same specification
-as some other character except for \texttt{?}, the \texttt{x} prevails;
-if you use \texttt{t} in the same specification as some other character
-except for \texttt{?} or \texttt{x}, the \texttt{t} prevails.
+\item the character \verb`t` (lower case!) which presents the result in
+a style of scientific notation useful in tables (a form like $(5)1.2345$
+for 123450) except for numbers in the interval \verb`[1,10)`; see
+§\ref{subsec:evalSciNotation1to10};
+\begin{itemize}
+\item the character \verb`t` repeated, \verb`tt`, which extends the notation
+to numbers in the interval \verb`[1,10)`;
+\end{itemize}
+\item a letter other than \verb`x` or \verb`t`, usually  one of the letters\texttt{
+}\verb`e`, \verb`d`, \verb`E`, \verb`D`, which presents the result
+in scientific notation with that letter as the exponent mark (a form
+like $1.2345\text{e}5$ for $123450$); see §\ref{subsec:evalSciNotation1to10};
+\begin{itemize}
+\item the letter repeated – say \verb`dd` – which extends the notation
+to numbers in the interval \verb`[1,10)`.
+\end{itemize}
+\end{itemize}
+If you use \verb`?` in the same specification as some other character,
+the \verb`?` prevails; if you use \verb`/` in the same specification
+as some other character except for \verb`?`, the \verb`/` prevails;
+if you use \verb`x` in the same specification as some other character
+except for \verb`?` or \verb`/`, the \verb`x` prevails; if you
+use \verb`t` in the same specification as some other character except
+for \verb`?`, \verb`/` or \verb`x`, the \verb`t` prevails: \verb`?`$\succ$\verb`/`$\succ$\verb`x`$\succ$\verb`t`$\succ$\ldots{}
+(where $\succ$ means `prevails over').
 
-If you repeat the character serving as the exponent mark in scientific
-notation -- say \verb`xx` or \verb`dd` -- then scientific notation
-extends to numbers in the interval \verb`[1,10)`.
-
-If you repeat a question mark specifying boolean output, then the
-formatting of that output is changed from \verb`1/0` to $T/F$ or
-\verb`T/F` depending as there are two or three question marks used.
-
 \subsection{Rounding value }
 
 \label{subsec:evalRounding-value}If the number is displayed as a
@@ -1053,72 +1779,79 @@
 displayed. If a number is displayed in scientific notation (see below
 §\ref{subsec:evalScientificNotation}) that is still true, but it
 can mean differences in the overall number of digits displayed. For
-the moment, I show the effect of rounding in a purely decimal display: 
+the moment, I show the effect of rounding in a purely decimal display:
 \begin{centred}
-\verb`$ \eval{ 1/3 }[4] $` $\Longrightarrow$ $\eval{1/3}[4]$.
+\verb`\eval{ 1/3 }[4],\qquad \eval{ 1/3 }` $\Longrightarrow$ \eval{ 1/3 }[4],\qquad\eval{ 1/3 }.
 \end{centred}
-In this case \verb`4` was entered in the number-format option and
-the result is displayed to four decimal places. The default rounding
-value is $6$: 
+In the first case \verb`4` was entered in the number-format option
+and the result is displayed to four decimal places; in the second,
+the default rounding value of $6$ takes effect.
+
+Following the default behaviour in \texttt{l3fp}, which is the calculational
+engine used by \texttt{numerica}, `ties' are rounded to the nearest
+\emph{even} digit. Thus a number ending $55$ with a `choice' of
+rounding to $5$ or $6$ rounds up to the even digit $6$, and a number
+ending $65$ with a `choice' of rounding to $6$ or $7$ rounds
+down to the even digit $6$:
 \begin{centred}
-\verb`$ \eval{ 35/3 } $` $\Longrightarrow$ $\eval{35/3}$.
+\verb`\eval[pp,ff]{ 0.1234555, 0.1234565 }`  $\Longrightarrow$ \eval[pp,ff]{0.1234555,0.1234565}. 
 \end{centred}
-Following the default behaviour in \texttt{l3fp}, the calculational
-engine which \texttt{numerica} uses, `ties' are rounded to the nearest
-\emph{even} digit. Thus a number ending $55$ with a `choice' of rounding
-to $5$ or $6$ rounds up to the even digit $6$, and a number ending
-$65$ with a `choice' of rounding to $6$ or $7$ rounds down to the
-even digit $6$: 
+\texttt{l3fp} works to 16 significant figures and never displays more
+than that number (and often fewer). 
+\begin{itemize}
+\item In the following, although I have specified a rounding value of $19$,
+only $16$ decimal places are displayed (with the final digits rounded
+up):
+\end{itemize}
 \begin{centred}
-\verb`$ \eval{ 0.1234555 } $` $\Longrightarrow\eval{0.1234555}$
+\verb`\eval{ 0.12345678912345678912 }[19]` $\Longrightarrow$ \eval{ 0.12345678912345678912 }[19]\medskip{}
 
-\verb`$ \eval{ 0.1234565 } $` $\Longrightarrow\eval{0.1234565}$
+\verb`\eval{ 1.12345678912345678912 }[19]` $\Longrightarrow$ \eval{ 1.12345678912345678912 }[19]
 \end{centred}
-\texttt{l3fp} works to 16 significant figures and never displays more
-than that number (and often fewer). 
 \begin{itemize}
-\item In the first of the following although I have specified a rounding
-value of $19$ only $16$ decimal places are displayed, with the final
-digit rounded up to $7$; 
-\item in the second I have added $10$ zeros after the decimal point, meaning
-that all $19$ decimal places specified by the rounding value can
-be displayed since the 10 initial zeros do not contribute to the significant
-figures; 
-\item in the third I have changed the figure \emph{before} the decimal point
-to $1$ so that the $10$ added zeros are now included among the significant
-figures; 
-\item and in the fourth, I have added $9$ digits before the decimal point: 
+\item Now I add ten zeros after the decimal point, meaning that all $19$
+decimal places specified by the rounding value can be displayed in
+the first since the ten zeros do not contribute to the significant
+figures, but in the second, by changing the figure before the decimal
+point to $1$, the ten zeros added \emph{do} contribute to the significant
+figures: 
 \end{itemize}
 \begin{centred}
-\verb`$ \eval{ 0.1234567890123456789 }[19] $` $\Longrightarrow$
-$\eval{0.1234567890123456789}[19]$
+\verb`\eval{ 0.0000000000123456789 }[19]` $\Longrightarrow$ \eval{ 0.0000000000123456789 }[19]\medskip{}
 
-\verb`$ \eval{ 0.00000000001234567890123456789 }[19] $` $\Longrightarrow$
-$\eval{0.00000000001234567890123456789}[19]$
-
-\verb`$ \eval{ 1.00000000001234567890123456789 }[19] $` $\Longrightarrow$
-$\eval{1.00000000001234567890123456789}[19]$
-
-\verb`$ \eval{ 987654321.1234567890123456789 }[19] $` $\Longrightarrow$
-$\eval{987654321.1234567890123456789}[19]$
+\verb`\eval{ 1.0000000000123456789 }[19]` $\Longrightarrow$ \eval{ 1.0000000000123456789 }[20]
 \end{centred}
+\begin{itemize}
+\item Lastly, I have added $9$ digits before the decimal point:
+\end{itemize}
+\begin{centred}
+\verb`\eval{ 987654321.123456789 }[19]` $\Longrightarrow$ \eval{ 987654321.123456789 }[19]
+\end{centred}
 In all cases, no more than $16$ \emph{significant} figures are displayed,
-although the number of decimal places displayed may exceed $16$ as
-in the second example.
+although the number of decimal places displayed may exceed $16$.
 
 It is possible to use \emph{negative} rounding values. Such a value
-zeroes the specified number of digits \emph{before} the decimal point. 
+replaces the specified number of digits \emph{before} the decimal
+point with zeros.
 \begin{centred}
-\verb`$ \eval{ 987654321.123456789 }[-4] $` $\Longrightarrow$ $ \eval{ 987654321.123456789 }[-4] $
+\verb`\eval{ 987654321.123456789 }[-4]` $\Longrightarrow$ \eval{ 987654321.123456789 }[-4]
 \end{centred}
 A rounding value of $0$ rounds to the nearest integer:
 \begin{centred}
-\verb`$ \eval{ 987654321.123456789 }[0] $` $\Longrightarrow$ $\eval{987654321.123456789}[0]$
+\verb`\eval{ 987654321.123456789 }[0]` $\Longrightarrow$ \eval{ 987654321.123456789 }[0]
 \end{centred}
 If you wish to change the \emph{default} rounding value from $6$
-to some other value, this can be done by creating or editing a file
-\texttt{numerica.cfg} in a text editor; see §\ref{sec:settingsDefaults}.
+to some other value, this can be done by means of the package option
+\verb`rounding`. For example, calling \texttt{numerica} like this,
+\begin{verbatim}
+    \usepackage[rounding=4]{numerica}
+\end{verbatim}
+will make $4$ the new default rounding value.
 
+The rounding value also plays a part in how closely fraction-form
+output approximates the calculated result (§\ref{subsec:evalFraction-form-output}),
+and how many terms are used to evaluate `infinite' sums (§\ref{tab:calcStoppingCriterionSettings}).
+
 \subsection{Padding with zeros }
 
 \label{subsec:evalPadding-with-zeros}A result may contain fewer decimal
@@ -1125,160 +1858,265 @@
 places than the rounding value specifies, the trailing zeros being
 suppressed by default (this is how \texttt{l3fp} does it). Sometimes,
 perhaps for reasons of presentation like aligning columns of figures,
-it may be desirable to pad results with zeros. This is achieved by
-inserting an asterisk, {*}, into the final optional argument of the
-\verb`\eval` command: 
+it may be desirable to pad results with zeros – we have already met
+an example at §\ref{subsec:intoMultiFormulaPunctuation}. Padding
+is achieved by inserting an asterisk into the final optional argument
+of the \verb`\eval` command:
 \begin{centred}
-\verb`$ \eval{ 1/4 }[4] $` $\Longrightarrow$ $\eval{1/4}[4]$,
+\verb`\eval{ 1/4 }[4]` $\Longrightarrow$ \eval{ 1/4 }[4],\medskip{}
 
-\verb`$ \eval{ 1/4 }[4*] $` $\Longrightarrow$ $\eval{1/4}[4*]$. 
+\verb`\eval{ 1/4 }[4*],\quad \eval{ 1/4 }[*4]` $\Longrightarrow$
+\eval{ 1/4 }[4*],\quad\eval{ 1/4 }[*4].
 \end{centred}
+As you can see, it doesn't matter if there is a rounding value also
+present (the example at §\ref{subsec:intoMultiFormulaPunctuation},
+using the default rounding value, had none), nor the order in which
+the asterisk and rounding value are entered.
 
 \subsection{Scientific notation }
 
-\label{subsec:evalScientificNotation} \texttt{l3fp} can output numbers
-in scientific notation. For example, $1234$ is rendered as $\eval{1234}[e]$,
-denoting $1.234\times10^{3}$ , and $0.008$ as $\eval{0.008}[e]$,
-denoting $8\times10^{-3}$. The `e' here, the \emph{exponent mark},
-separates the \emph{significand} ($1.234$) from the \emph{exponent}
-($3$). In scientific notation, the significand always has one \emph{non-zero}
-digit before the decimal point.\footnote{Except for $0$ itself.}
-
-For scientific notation rounding still means the number of decimal
-places displayed, but it can result in very different numbers of digits
-being shown from the number shown in decimal form. To switch on output
-in scientific notation in \verb`numerica` enter \verb`e` in the
-trailing optional argument: 
+\label{subsec:evalScientificNotation} \texttt{numerica} can output
+numbers in various scientific notations. Entering \verb`x` (lower
+case) in the number-format option produces the `pure' form:
 \begin{centred}
-\verb`$ \eval{ 123.456789 }[e] $` $\Longrightarrow$ $\eval{123.456789}[e]$.
+\verb`\eval[pp,ff]{ 2^{256}, 2^{-256} }[x]` $\Longrightarrow$ $\vsp$\eval[pp,ff]{ 2^{256}, 2^{-256} }[x].
 \end{centred}
-The default rounding value $6$ is in play here, with seven digits
-of the significand displayed overall, one preceding the decimal point,
-six following it. Compare this with the same number rounded in decimal
-form: 
+With the default rounding value, as here, one digit is shown before
+the decimal point and $6$ digits after. Alternatively, you can enter
+some other letter in the number-format option, generally \verb`e`,
+to generate a less elegant, more utilitarian output:
 \begin{centred}
-\verb`$ \eval{ 123.456789012345 } $` $\Longrightarrow$ $\eval{123.456789012345}$.
+\verb`\eval[pp,ff]{ 3^{81}, e^{-81} }[e]` $\Longrightarrow$ \eval[pp,ff]{ 3^{81}, 3^{-81} }[e]. 
 \end{centred}
-In this instance, nine digits are displayed, three before the decimal
-point and six after. Similarly compare 
+Other letters sometimes used for this purpose are \verb`E`, \verb`d`
+and \verb`D`, but \texttt{numerica} will accept \emph{any} letter
+(although \verb`x` and \verb`t` produce distinctive output). The
+`e' in the output is the \emph{exponent mark}, separating the \emph{significand}
+($1.234$) from the \emph{exponent} ($3$). In scientific notation,
+the significand always has one \emph{non-zero} digit before the decimal
+point (except for $0$ itself).
+
+For scientific notation the rounding value still means the number
+of decimal places displayed – by default, $6$. This can mean different
+numbers of digits being shown from those displayed in `ordinary'
+decimal form. Compare \verb`\eval{ 123.456789 }` $\Longrightarrow$
+\eval{ 123.456789 }, where nine significant figures are displayed,
+with \verb`\eval{ 123.456789 }[e]` $\Longrightarrow$ \eval{ 123.456789 }[e]
+where only seven are, one before the decimal point and six after.
+In the other direction, only five significant figures are shown in
+the `ordinary' decimal form \verb`\eval{ 0.0123456789 }` $\Longrightarrow$
+\eval{ 0.0123456789 }, whereas in scientific notation \verb`\eval{ 0.0123456789 }[e]`
+$\Longrightarrow$ \eval{ 0.0123456789 }[e] once again seven are
+on display.
+
+Negative rounding values are pointless for scientific notation. 
+
+Sometimes letters other than `e' are used for the exponent mark,
+particularly `E' or `d' or `D'. 
 \begin{centred}
-\verb`$ \eval{ 0.0123456789 }[e] $` $\Longrightarrow$ $\eval{0.0123456789}[e]$
+\verb`\eval{$ 1/123456789 $}[4d]`\texttt{ $\Longrightarrow$} \eval{$ 1/123456789 $}[4d].
 \end{centred}
-with 
+But when \verb`x` is inserted in the trailing optional argument,
+the output is in the form $d_{0}.d_{1}\ldots d_{m}\times10^{n}$ (except
+when $n=0$), where each $d_{i}$ denotes a digit.
 \begin{centred}
-\verb`$ \eval{ 0.0123456789 } $` $\Longrightarrow$ $\eval{0.0123456789}$.
+\verb`\eval{$ 1/123456789 $}[4x*]`\texttt{ $\Longrightarrow$ }\eval{$ 1/123456789 $}[4x*] .
 \end{centred}
-This time scientific notation has gained two extra decimal digits
-to display.
+As you can see, padding with zeros still applies in scientific notation
+and is activated, as before, with an asterisk in the number-format
+option. 
 
-Negative rounding values are pointless for scientific notation. A
-zero might on occasion be relevant: 
+The requirements of tables leads to another form of scientific notation.
+Placing \verb`t` in the trailing argument turns on this table-ready
+form:
 \begin{centred}
-\verb`$ \eval{ 987654321 }[0e] $` $\Longrightarrow$ $\eval{987654321}[0e]$.
+\verb`\eval{$ 1/123456789 $}[4t*]`\texttt{ $\Longrightarrow$ }\eval{$ 1/123456789 $}[4t*].
 \end{centred}
-Sometimes letters other than `e' are used to indicate scientific notation,
-like `E' or `d' or `D'. With a few exceptions, \texttt{numerica} allows
-any letter or text character to be used as the exponent marker: 
+This is discussed more fully in the documentation for the \texttt{numerica-tables}
+package.
+
+The order in which items are entered in the number-format option doesn't
+matter: 
 \begin{centred}
-\verb`\eval{$ 1/23456789 $}[4d]`\texttt{ $\Longrightarrow$} \eval{$ 1/23456789 $}[4d].
+\verb`\eval{$ 1/125 $}[*e4]`  $\Longrightarrow$ \eval{$ 1/125 $}[*e4],\medskip{}
+
+\verb`\eval{$ 1/125 $}[4e*]`  $\Longrightarrow$ \eval{$ 1/125 $}[4e*].
 \end{centred}
-But when \texttt{x} is inserted in the trailing optional argument,
-the output is in the form $d_{0}.d_{1}\ldots d_{m}\times10^{n}$ (except
-when $n=0$), where each $d_{i}$ denotes a digit. 
+
+\subsubsection{Numbers in the interval \texttt{{[}1,10)}}
+
+\label{subsec:evalSciNotation1to10}Usually when scientific notation
+is being used, numbers with magnitude in the interval $[1,10)$ are
+rendered in their normal decimal form, $3.14159$ and the like. Occasionally
+it may be desired to present numbers in this range in scientific notation
+(this can be the case in tables where the alignment of a column of
+figures might be affected). \texttt{numerica} offers a means of extending
+scientific notation to numbers in this range by repeating the letter
+chosen as the exponent mark in the trailing optional argument.
 \begin{centred}
-\verb`\eval{$ 1/23456789 $}[4x]`\texttt{ $\Longrightarrow$ }\eval{$ 1/23456789 $}[4x]. 
+\verb`\eval{$ \pi $}[4xx]` $\Longrightarrow$ \eval{$ \pi $}[4xx] 
 \end{centred}
-The requirements of tables leads to another form of scientific notation.
-Placing \texttt{t} in the trailing argument turns on this table-ready
-form of notation: 
+
+\subsubsection{\textbackslash eval{*} and scientific notation}
+
+Starring the \verb`\eval` command gives a number-only result which
+can be presented in scientific notation:
 \begin{centred}
-\verb`\eval{$ 1/23456789 $}[4t]`\texttt{ $\Longrightarrow$}\eval{$ 1/23456789 $}[4t].
+\verb`\eval*{ \pi^\pi }[e]` $\Longrightarrow$ \eval*{ \pi^\pi }[e] 
 \end{centred}
-This is discussed more fully in the documentation for the \texttt{numerica-tables}
-package.
+There is one catch: if you substitute \verb`x` for \verb`e` here,
+compilation will halt and \LaTeX{} will state \verb`Missing $ inserted.`
+This is because an \verb`x` in the number-format option means a \verb`\times`
+in the output and that requires a math environment to display. It
+is up to you, as the user, to provide the necessary delimiters \emph{outside}
+the \verb`\eval*` command. (Alternatively, use \verb`\eval` without
+the star and without any delimiters whatever. Dollar signs are automatically
+placed around the result.)
 
-In the next example three options are used in the trailing argument.
-The order in which the items are entered does not matter: 
+\subsection{Fraction-form output}
+
+\label{subsec:evalFraction-form-output}The \verb`\eval` command
+can output numbers in fraction form by including in the number-format
+specification either one or two slashes:
 \begin{centred}
-\verb`\eval{$ 1/125 $}[*e4]` $\Longrightarrow$ \eval{$ 1/125 $}[*e4].
+\verb`\eval[pp,ff]{0.333333, 1.875}[4/]` $\Longrightarrow$ \eval[pp,ff]{0.333333,1.875}[4/];\medskip{}
+
+\verb`\eval[pp,ff]{\pi, e}[2//]` $\Longrightarrow$ \eval[pp,ff]{\pi, e}[2//].
 \end{centred}
-Finally, to illustrate that `any' text character\footnote{Be sensible! An equals sign for instance might confuse \texttt{numerica}
-into thinking the number-format option is the vv-list, and will certainly
-confuse the reader.} save for \texttt{x} or \texttt{t} can be used to distinguish the
-exponent, I use an @ character:
+A single slash results in a textstyle slash fraction; two slashes
+produce a \verb`\frac`-tion. Always, numerator and denominator are
+integers. The rounding value determines how close the fraction is
+to the calculated result. Consider
+\begin{verbatim}
+    \eval{\pi}[1//],\quad \eval{\pi}[2//],
+    \eval{\pi}[3//],\quad \eval{\pi}[6//].
+\end{verbatim}
+$\Longrightarrow$ \eval{\pi}[1//],\quad\eval{\pi}[2//],\quad
+   \eval{\pi}[3//],\quad\eval{\pi}[6//], \medskip{}
+
+\noindent and compare these results against $\pi$:
+\begin{verbatim}
+      \eval[env=alignat*,pp,p=.,ff]{ \pi-\tfrac{19}6, 
+          \pi-\tfrac{22}7, \pi-\tfrac{267}{85}, 
+          \pi-\tfrac{355}{113} }[8*]
+\end{verbatim}
+$\Longrightarrow$     \eval[env=alignat*,pp,p=.,ff]{ \pi-\tfrac{19}6, 
+      \pi-\tfrac{22}7, \pi-\tfrac{267}{85}, 
+      \pi-\tfrac{355}{113} }[8*]In each case the fraction approximates the correct result to at least
+as many decimal places as specified in the rounding value – the difference
+between pi and the fraction is zero to that rounding value. Sometimes,
+as evident with the familiar approximations $22/7$ and $355/113$,
+the difference is zero to twice the number of digits in the denominator
+– these are exceptionally good approximations.
+
+The example illustrates the use of an \verb`alignat*` environment
+to ensure the results line up, including taking account of the minus
+signs.
+
+What happens if I seek a still more accurate approximation – say to
+(at least) seven places of decimals? The result is a message:
 \begin{centred}
-\verb`\eval{$ 1/125 $}[@4]` $\Longrightarrow$ \eval{$ 1/125 $}[@4].
+\verb`\eval{\pi}[7//]` $\Longrightarrow$ \eval{ \pi}[7//]
 \end{centred}
+By default \texttt{numerica} searches denominators from 1 to $200$
+before halting the search and producing the message. The program offers
+two settings that may assist here. The first is the \verb`/max` setting
+which allows the user to specify the maximum denominator tried, e.g.\ putting
+\verb`/max = 1000` in the settings option of the \verb`\eval` command
+would allow the search to continue up to a denominator of $1000$.
+But perhaps that means waiting too long? The user can also specify
+an initial value to start searching from with the \verb`/min` setting,
+by entering in the settings option, say, \verb`/min = 500`, which
+would mean searching from an initial denominator of $500$. By default
+\verb`/min = 1` and \verb`/max = 200`. 
 
-\subsubsection{Numbers in the interval \texttt{{[}1,10)}}
-
-Usually when scientific notation is being used, numbers with magnitude
-in the interval $[1,10)$ are rendered in their normal decimal form,
-$3.14159$ and the like. Occasionally it may be desired to present
-numbers in this range in scientific notation (this can be the case
-in tables where the alignment of a column of figures might be affected).
-\texttt{numerica} offers a means of extending scientific notation
-to numbers in this range by repeating the letter chosen as the exponent
-mark in the trailing optional argument. 
+To test the settings equate both to $113$:
 \begin{centred}
-\verb`\eval{$ \pi $}[4tt]` $\Longrightarrow$ \eval{$ \pi $}[4tt]
+\verb`\eval[/min=113,/max=113]{\pi}[6//]` $\Longrightarrow$ \eval[/min=113,/max=113]{\pi}[6//].
 \end{centred}
+Performing a similar exercise with other irrational numbers like $e$,
+$\phi$ and $\surd2$, one realizes just how good this particular
+approximation is.
 
-\subsubsection{\textbackslash eval{*} and scientific notation}
+\subsubsection{Refining the form of fraction}
 
-Scientific notation can be used for the numerical result output by
-\verb`\eval*`: 
+The form of the fraction output can be refined by adding a qualifying
+letter to the single or double slash in the number format option.
+
+By adding an \verb`s` after a single slash, \verb`/s`, it is possible
+to get scriptstyle numbers in a slash fraction. If the \texttt{xfrac}
+package\footnote{\texttt{xfrac} is included in the \texttt{l3packages} bundle.}
+has been loaded (as it has been for the present document), then the
+fraction takes this form:
 \begin{centred}
-\verb`\eval*{ \pi }[ee]` $\Longrightarrow$ \eval*{ \pi }[ee]
+\verb`\eval{$ \pi $}[2/s]` $\Longrightarrow$ \eval{$ \pi $}[2/s].
 \end{centred}
-There is one catch: if you substitute \texttt{x} for \texttt{e} here,
-\LaTeX{} will complain about a missing \verb`$`. An \texttt{x} in
-the number-format option produces a \verb`\times` in the output which
-requires a math environment. It is up to you, as the user, to provide
-the necessary delimiters outside the \verb`\eval*` command. (This
-applies even when \verb`\eval*` wraps around math delimiters.)
+This is the result of the \verb`\sfrac` command from the \texttt{xfrac}
+package. If that package had not been loaded then the fraction would
+have been presented in the form $\scriptstyle 22/7$. 
 
+By adding a \verb`t` or \verb`d` after two slashes, \verb`//t`
+or \verb`//d`, it is possible to force textstyle or displaystyle
+output by means of \texttt{amsmath}'s \verb`\tfrac` or \verb`\dfrac`
+commands (in place of \verb`\frac`). For example, even in a displaystyle
+environment,
+\begin{centred}
+\verb`\eval[p]{\[ \pi \]}[6//t]` $\Longrightarrow$ \eval[p]{\[ \pi \]}[6//t]
+\end{centred}
+with the \verb`//t` specification, and similarly, in a textstyle
+environment you can force a displaystyle fraction with the \verb`//d`
+specification.
+
 \subsection{Boolean output}
 
 \label{subsec:evalBoolean-output}\texttt{l3fp} can evaluate comparisons,
 outputting $0$ if the comparison is false, $1$ if it is true. By
-entering a question mark, \texttt{?}, in the trailing optional argument,
-you can force \verb`numerica` to do the same depending as the result
-of a calculation is zero or not. The expression being evaluated does
-not need to be a comparison, \verb`$ \eval{\pi}[?] $` $\Longrightarrow$
-$\eval{\pi}[?]$, but comparisons are what this is designed for.
+entering a question mark, \verb`?`, in the trailing optional argument,
+you can force \texttt{numerica} to do the same depending as the result
+of a calculation is zero or not. (The expression being evaluated does
+not need to be a comparison, \verb`\eval{\pi}[?]` $\Longrightarrow$
+\eval{\pi}[?], but comparisons are what this is designed for.)
 
 Possible comparison relations are \verb`=`, \verb`<`, \verb`>`,
 \verb`\ne`, \verb`\neq`, \verb`\ge`, \verb`\geq`, \verb`\le`,
 \verb`\leq`. Although programming languages use combinations like
-\verb`<=` or \verb`>=`, \texttt{numerica} does \emph{not} accept
-these (they are not part of standard \emph{mathematical} usage) and
-will generate an error. An example where the relation is equality
-exhibits a numerological curiosity:\footnote{The \texttt{{[}p=.{]}} of this and the next example ensures a full
-stop appears in the correct place; see §\ref{subsec:settingsPunctuation}.} 
+\verb`<=` or \verb`>=` and, from version 3.0.0 \verb`\eval` will
+accept these without raising an error, this is not part of mathematical
+practice. 
+
+An example of boolean output where the relation is equality exhibits
+a numerological curiosity:
 \begin{centred}
 \verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[5?]` $\Longrightarrow$
 \eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[5?]
 \end{centred}
-Notice the $5$ alongside the question mark in the trailing argument.
-That is critical. Change the $5$ to a $6$ (or omit it since the
-default rounding value is $6$) and the outcome is different:
+The expression on the left is to be read as a \emph{question}: `Is
+$1/0.0123456789$ equal to $81$?', not as a statement; the arrow
+points to the answer, in this instance $1$, meaning \emph{true}.
+But notice the $5$ alongside the question mark in the trailing argument.
+That is critical. Change it to $6$ (or omit it since the default
+rounding value is $6$) and the outcome is different:
 \begin{centred}
-\verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?]` $\Longrightarrow$\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?]
+\verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?]` $\Longrightarrow$
+\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?]
 \end{centred}
-Now the relation is false. Evaluating the fraction to more than $6$
-places, say to $9$, we can see what is going on:
+Now the relation is \emph{false}. Evaluating the fraction to more
+than $6$ places, say to $9$, we can see what is going on:
 \begin{centred}
-\verb`\eval{$ 1/0.0123456789 $}[9]` $\Longrightarrow$\eval{$ 1/0.0123456789 $}[9]
+\verb`\eval{$ 1/0.0123456789 $}[9]` $\Longrightarrow$ \eval{$ 1/0.0123456789 $}[9]. 
 \end{centred}
+In other words, the question posed by the \verb`?` specification
+is not `Is $1/0.0123456789$ equal to $81$?' but `Is $1/0.0123456789$
+equal to $81$ \emph{to the specified number of decimal places}?'
+To $5$ decimal places it is; to $6$ decimal places it is not.
 
 \subsubsection{Outputting \texttt{T} or \texttt{F}}
 
-To my eye, outputting $0$ or $1$ in response to a `question' like
+To my eye, outputting $0$ or $1$ in response to a question like
 $1/0.0123456789=81$ is confusing. It is easy to change the boolean
 output from $0,1$ to a more appropriate $F,T$, or \texttt{$\texttt{F,\texttt{T}}$}
-by adding one or two more question marks respectively in the number-format
-option. 
+by duplicating ($F,T$) or triplicating (\texttt{$\texttt{F,\texttt{T}}$})
+the question mark in the number-format option.
 \begin{centred}
 \verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6???]` $\Longrightarrow$
 \eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6???]
@@ -1285,7 +2123,7 @@
 \end{centred}
 The default boolean output format is chosen to be $0,1$ in case an
 \verb`\eval` command is used within another \verb`\eval` command
-(`nesting'-- see Chapter~\ref{chap:Nesting}~). The inner command
+(`nesting'– see Chapter~\ref{sec:miscNesting}~). The inner command
 needs to output a \emph{numerical} answer.
 
 \subsubsection{Rounding error tolerance}
@@ -1300,7 +2138,7 @@
 But for most purposes this will be far too severe a criterion.
 
 Suppose our comparison relation is $\varrho$, denoting one of =,
-<, >, \verb`\le`, etc. If $X\rel Y$ then $X-Y\rel Y-Y$, i.e. $X-Y\rel0$.
+<, >, \verb`\le`, etc. If $X\rel Y$ then $X-Y\rel Y-Y$, i.e.\ $X-Y\rel0$.
 This is what \texttt{numerica} does. It takes the right-hand side
 of the relation from the left-hand side and then compares the \emph{rounded}
 difference under $\varrho$ to $0$. The rounding value used is the
@@ -1312,15 +2150,15 @@
 hence the equality $1/0.0123456789=81$ is true. But when rounded
 to $6$ places it is $0.000001$ which \emph{is} distinguishable from
 zero and so the equality is false. Truth or falsity depends on the
-rounding value.
+rounding value. 
 
 When dealing with numbers generated purely mathematically, rounding
 values of $5$ or $6$ are likely to be too small. More useful would
-be rounding values closer to \texttt{l3fp}'s $16$ -- perhaps $14$?
--- depending on how severe the calculations are that generate the
-numbers. However if the numbers we are dealing with come from outside
-mathematics, from practical experiments perhaps, then even a rounding
-value of $5$ or $6$ may be too large.
+be rounding values closer to \texttt{l3fp}'s $16$ – perhaps $14$?
+– depending on how severe the calculations are that generate the numbers.
+However if the numbers we are dealing with come from outside mathematics,
+from practical experiments perhaps, then even a rounding value of
+$5$ or $6$ may be too large. 
 
 \noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
@@ -1332,28 +2170,26 @@
 \]
 since this rounds \emph{down} to zero at $n$ places of decimals.
 This gives a more accurate test of equality than doing things in the
-opposite order -- rounding each number first and then taking the
-difference. One might, for instance, have numbers like $X=0.12345$,
-$Y=0.12335$. Rounding to $n=4$ places, both round to $0.1234$ and
-yet the difference between them is $0.0001$ -- they are distinguishable
-numbers to $4$ places of decimals. This is why \texttt{numerica}
-forms the difference \emph{before }doing the rounding.\end{shaded}%
+opposite order – rounding each number first and then taking the difference.
+One might, for instance, have numbers like $X=0.12345$, $Y=0.12335$.
+Rounding to $n=4$ places, both round to $0.1234$ and yet the difference
+between them is $0.0001$ – they are distinguishable numbers to $4$
+places of decimals. This is why \texttt{numerica} forms the difference
+\emph{before }doing the rounding.\end{shaded}%
 \end{minipage}
 
 \subsubsection{And, Or, Not}
 
-\noindent For logical And \LaTeX{} provides the symbols \noindent\verb`\wedge`
-and \noindent\verb`\land`, both displaying as $\land$, but \texttt{numerica}
-adds thin spaces ( \noindent\verb`\,` ) around the symbol for \noindent\verb`\land`
-(copying the package \texttt{gn-logic14.sty}). For logical Or \LaTeX{}
-provides the symbols \noindent\verb`\vee` and \noindent\verb`\lor`,
-both displaying as $\lor$, but again \texttt{numerica} adds thin
-spaces around the symbol for \noindent\verb`\lor`. 
+For logical And \LaTeX{} provides the symbols \verb`\wedge` and \verb`\land`,
+both displaying as $\land$, but \texttt{numerica} adds thin spaces
+( \verb`\,` ) around the symbol for \verb`\land` (copying the package
+\texttt{gn-logic14.sty}). For logical Or \LaTeX{} provides the symbols
+\verb`\vee` and \verb`\lor`, both displaying as $\lor$, but again
+\texttt{numerica} adds thin spaces around the symbol for \verb`\lor`. 
 \begin{centred}
-\noindent\noindent\verb`\eval{$ 1<2 \wedge 2<3 $}[??]` $\Longrightarrow$\eval{$ 1<2 \wedge 2<3 $}[??],
+\verb`\eval{$ 1<2 \wedge 2<3 $}[??]` $\Longrightarrow$ \eval{$ 1<2 \wedge 2<3 $}[??],
 
-\verb`\eval{$ 1<2 \land 2<3 $}[???]` $\Longrightarrow$\eval{$ 1<2 \land 2<3 $}[???]
-.
+\verb`\eval{$ 1<2 \land 2<3 $}[???]` $\Longrightarrow$ \eval{$ 1<2 \land 2<3 $}[???].
 \end{centred}
 To my eye the second of these with its increased space around the
 wedge symbol displays the meaning of the overall expression better
@@ -1362,14 +2198,14 @@
 is intended.
 
 \LaTeX{} provides two commands for logical Not, \verb`\neg` and \verb`\lnot`,
-both displaying as $\lnot$ . Not binds tightly to its argument: 
+both displaying as $\lnot$ . Not binds tightly to its argument:
 \begin{centred}
-\verb`\eval{$ \lnot A \land B $}[A=0,B=0]` $\Longrightarrow$ \eval{$ \lnot A \land B $}[A=0,B=0]
+\verb`\eval{$ \lnot A \land B $}[A=0,B=0]` $\Longrightarrow$ \eval{$ \lnot A \land B $}[A=0,B=0].
 \end{centred}
 Here \verb`\lnot` acts only on the $A$; if it had acted on $A\land B$
-as a whole the result would have been different: 
+as a whole the result would have been different:
 \begin{centred}
-\verb`\eval{$ \lnot(A \land B) $}[A=0,B=0]` $\Longrightarrow$ \eval{$ \lnot(A \land B) $}[A=0,B=0]
+\verb`\eval{$ \lnot(A \land B) $}[A=0,B=0]` $\Longrightarrow$ \eval{$ \lnot(A \land B) $}[A=0,B=0].
 \end{centred}
 For a little flourish, I evaluate a more complicated logical statement:\footnote{Quoting from an article in \emph{Quanta Magazine} (August 2020) by
 Kevin Hartnett: `Let’s say you and two friends are planning a party.
@@ -1380,31 +2216,32 @@
 wants to leave off Avery or Brad or both of them. Given these constraints,
 you could ask: Is there a guest list that satisfies all three party
 planners?' I have written $C$ for Kemba, $A$ and $B$ for Avery
-and Brad.} 
+and Brad.}
 \begin{verbatim}
     \eval{$(A\lor\lnot C)\land(C\lor B)\land
            (\lnot A\lor\lnot B)$}[A=1,B=0,C=1][???]
 \end{verbatim}
 $\Longrightarrow$ \eval{$(A\lor\lnot C)\land(C\lor B)\land
-           (\lnot A\lor\lnot B)$}[A=1,B=0,C=1][???].
+                (\lnot A\lor\lnot B)$}[A=1,B=0,C=1][???].
 
 \subsubsection{Chains of comparisons}
 
 \texttt{numerica} can handle chains of comparisons like $1<2<1+2<5-1$.
 `Behind the scenes' it inserts logical And-s into the chain, $1<2\land2<1+2\land1+2<5-1$,
-and evaluates the modified expression: 
+and evaluates the modified expression:
+\begin{centred}
+\verb`\eval{$ 1<2<1+2<5-1 $}[???]` $\Longrightarrow$ \eval{$ 1<2<1+2<5-1 $}[???].
+\end{centred}
 
-\verb`\eval{$ 1<2<1+2<5-1 $}[?'']` $\Longrightarrow$ \eval{$ 1<2<1+2<5-1 $}[?'']. 
-
 \subsubsection{\texttt{amssymb} comparison symbols}
 
 \label{subsec:evalAmssymb-comparisons}\texttt{numerica} accepts some
 alternative symbols for the basic comparison relations from the \texttt{amssymb}
-package provided that package is loaded, i.e. the preamble of your
-document includes the statement 
-\begin{lyxcode}
-\textbackslash usepackage\{amssymb\}
-\end{lyxcode}
+package provided that package is loaded, i.e.\ the preamble of your
+document includes the statement
+\begin{verbatim}
+    \usepackage{amssymb}
+\end{verbatim}
 The variants from this package are: \verb`\leqq` ( $\leqq$ ), \verb`\leqslant`
 ( $\leqslant$ ), \verb`\geqq` (~$\geqq$~), and \verb`\geqslant`
 ( $\geqslant$ ).\footnote{No, that is not \texttt{eggplant}.} There
@@ -1413,19 +2250,19 @@
 \verb`\ngtr` ( $\ngtr$ ), \verb`\ngeq` ( $\ngeq$ ), \verb`\ngeqq`
 ( $\ngeqq$ ), \verb`\ngeqslant` ( $\ngeqslant$ ).
 
-\section{Calculational details}
+\chapter{Calculational details}
 
-\subsection{Arithmetic}
+\section{Arithmetic}
 
-\label{subsec:evalArithmetic}Addition, subtraction, multiplication,
-division, square roots, \emph{$n$}th roots, and exponentiating (raising
-to a power) are all available.
+\label{sec:calcArithmetic}Addition, subtraction, multiplication,
+division, square roots, \emph{$n$}-th roots, and exponentiating (raising
+to a power) are all available. 
 
 Multiplication can be rendered explicitly with an asterisk, 
 \begin{centred}
 \verb`\eval{$ 9*9 $}` $\Longrightarrow$ \eval{$ 9*9 $},
 \end{centred}
-but that's ugly. More elegant is to use \verb`\times`: 
+but that's ugly. More elegant is to use \verb`\times`:
 \begin{centred}
 \verb`\eval{$ 9\times9 $}` $\Longrightarrow$ \eval{$ 9\times9 $}.
 \end{centred}
@@ -1436,101 +2273,113 @@
 
 \verb`\eval{$ ab $}[a=123,b=1/123]` $\Longrightarrow$ \eval{$ ab $}[a=123,b=1/123].
 \end{centred}
-Division can be rendered in multiple ways too: 
+Division can be rendered in multiple ways too. Using a comma list
+for a multi-formula evaluation (and the \verb`ff` setting),
 \begin{centred}
-\verb`\eval{$ 42/6 $}` $\Longrightarrow$ \eval{$ 42/6 $},
-
-\verb`\eval{$ 42\div6 $}` $\Longrightarrow$ \eval{$ 42\div6 $},
+\verb`\eval[p=.,ff]{\[ 42/6, 42\div6, \frac{42}6 \]}` $\Longrightarrow$
+\eval[p=.,ff]{\[ 42/6, 42\div6, \frac{42}6 \]}
 \end{centred}
-or by using \verb`\frac` or \verb`\tfrac` or \verb`\dfrac` as in 
-\begin{centred}
-\verb`\eval{$ \frac{42}6 $}` $\Longrightarrow$ \eval{$ \frac{42}6 $}.
-\end{centred}
-But note that since juxtaposition means multiplication, it is also
-true that $42\tfrac{1}{6}$\texttt{ }evaluates to $7$ inside an \verb`\eval`
-command rather than denoting `forty two and a sixth'. Hence if you
-want to use `two and a half' and similar values in \texttt{numerica},
-they need to be entered as improper fractions like $\tfrac{5}{2}$
-or in decimal form, $2.5$ (as one does automatically in mathematical
-expressions anyway because of the ambiguity in a form like $2\tfrac{1}{2}$).
+In a displaystyle environment, \verb`\frac` displays as shown. In
+a textstyle environment it displays as $\frac{42}{6}$. If you want
+to force a textstyle display, even in a displaystyle environment,
+use \verb`\tfrac` (from \texttt{amsmath}) and, conversely, if you
+want to force a displaystyle display, even in a textstyle environment,
+use \verb`\dfrac`. If the package \texttt{xfrac} is loaded, then
+slash fractions are rendered with scriptstyle numbers, \verb`\eval[p]{\[ \sfrac{42}{6} \]}`
+$\Longrightarrow$ \eval[p]{\[ \sfrac{42}{6} \]} even in a displaystyle
+environment. If \verb`xfrac` is not loaded, then \texttt{numerica}
+defines \verb`\sfrac` to expand to a scriptstyle slash fraction,
+e.g. ${\scriptstyle 42/6}$.
 
-Powers are indicated with the superscript symbol \verb`^`: 
+Note that since juxtaposition means multiplication, a combination
+like $42\tfrac{1}{6}$\texttt{ }also evaluates to $7$ within an \verb`\eval`
+command; it does not mean `forty two and a sixth'. Such fractions
+need to be entered as improper fractions to evaluate correctly – for
+instance, `two and a half' entered as $\tfrac{5}{2}$ (as one does
+anyway in mathematical expressions because of the ambiguity in a form
+like $2\tfrac{1}{2}$).
+
+Powers are indicated with the superscript symbol \verb`^`. It is
+clear from the braced \LaTeX{} grouping that a `tower' of superscripts
+is evaluated from the top down. Thus $3^{2^{3}}$is $3^{8}$ $(=9^{4})$,
+not $9^{3}=\eval{9^{3}}$:
 \begin{centred}
-\verb`\eval{$ 3^{2^2} $}` $\Longrightarrow$ \eval{$ 3^{2^2} $}
-.
+\verb` \eval{$ 3^{2^3} $}` $\Longrightarrow$ \eval{$ 3^{2^3} $} .
 \end{centred}
 
-\subsubsection{Square roots and $n$th roots}
+\section{Square roots and $n$-th roots}
 
-\label{subsec:evalSquareRootsEtc}Let us check that 3, 4, 5 and 5,
-12, 13 really are Pythagorean triples (I use \verb`\sqrt` in the
-first, \verb`\surd` in the second): 
+\label{sec:calcSquareRootsEtc}Let us check that 3, 4, 5 and 5, 12,
+13 really are Pythagorean triples (I use \verb`\sqrt` in the first,
+\verb`\surd` in the second):
 \begin{centred}
-\verb`\eval{$ \sqrt{3^2+4^2} $}` $\Longrightarrow$ \eval{$ \sqrt{3^2+4^2} $},
-
-\verb`\eval{$ \surd(5^2+12^2) $}` $\Longrightarrow$ \eval{$ \surd(5^2+12^2) $}.
+\verb`\eval[ff]{\[ \sqrt{3^2+4^2}, \surd(5^2+12^2) \]}` $\Longrightarrow$
+\eval[ff]{\[\sqrt{3^{2}+4^{2}}, \surd(5^2+12^2)\]}
 \end{centred}
 The \verb`\sqrt` command has an optional argument which can be used
-for extracting $n$th roots of a number. This notation is generally
-used when $n$ is a small positive integer like $3$ or $4$. This
-practice is followed in \texttt{numerica}: $n$ must be a (not necessarily
-small) \emph{positive integer}: 
+for extracting $n$-th roots of a number. In \texttt{numerica}, when
+used with the \verb`\sqrt` command, $n$ is assumed to be a \emph{positive
+integer}, in practice generally a \emph{small} positive integer like
+$3$ or $4$. 
 \begin{centred}
-\verb`\eval{$ \sqrt[4]{81} $}` $\Longrightarrow$ \eval{$ \sqrt[4]{81} $},
+\verb`\eval{$ \sqrt[4]{81} $}` $\Longrightarrow$  \eval{$ \sqrt[4]{81} $},\medskip{}
 
 \verb`\eval{$ \sqrt[n]{125} $}[n=\floor{\pi}]` $\Longrightarrow$
 \eval{$ \sqrt[n]{125} $}[n=\floor{\pi}].
 \end{centred}
-If $n$ should not be a positive integer, an error message is generated;
-see §\ref{sec:evalErrors}.
-
-For display-style expressions, the \verb`\sqrt` command grows to
-accommodate the extra vertical height; the surd doesn't. Here is an
-example which anticipates a number of matters not discussed yet. It
-shows \verb`\eval` wrapping around a square root containing various
-formatting commands (negative spaces, \verb`\left` and \verb`\right`
-nested within \verb`\bigg` commands), all digested without complaint
-(see §\ref{subsec:evalFormatting-commands}; and see §\ref{subsec:settingsPunctuation}
-for the \verb`[p=.]`): \medskip{}
-
+For displaystyle expressions, the \verb`\sqrt` sign grows to accommodate
+the extra vertical height; the \verb`\surd` sign doesn't. Here is
+an example which uses the \verb`\mleft`, \verb`\middle`, \verb`\mright`
+commands from the package \texttt{mleftright} (requiring \verb`\usepackage{mleftright}`
+in the preamble of the present document). In the formula I have enlarged
+the $3$ of the cube root from the default \verb`\scriptscriptstyle`
+visible in the examples above to a more appropriately sized \verb`\scriptstyle`.
 \begin{verbatim}
-    \eval[p=.]{\[ \sqrt[3]{\!
-      \biggl(\!\left.\frac AD\right/\!\frac BC\biggr)
-        }\]}[A=729,B=81,C=9,D=3]
+    \eval[p=.]{\[ \sqrt[\scriptstyle3]{\!
+          \mleft(\frac AD\middle/\frac BC\mright)}
+      \]}[A=729,B=81,C=9,D=3]
 \end{verbatim}
-$\Longrightarrow$     \eval[p=.]{\[ \sqrt[3]{\!
-      \biggl(\!\left.\frac AD\right/\!\frac BC\biggr)
-        }\]}[A=729,B=81,C=9,D=3]
+$\Longrightarrow$    \eval[p=.]{\[ \sqrt[\scriptstyle3]{\!
+          \mleft(\frac AD\middle/\frac BC\mright)}
+      \]}[A=729,B=81,C=9,D=3]
 
-As implemented in \texttt{numerica}, $n$th roots found using \verb`\sqrt[n]`
-require \verb`n` to be an integer. This raises an interesting question:
-if the `$n$' of an $n$th root is the result of a calculation, what
-happens with rounding errors? The calculation may not produce an \emph{exact}
-integer. (This problem also arises with factorials; see §\ref{subsec:evalFactorialsBinom}.)
-The solution employed in \texttt{numerica} is to make what is considered
-an integer depend on a rounding value. Most calculations will produce
-rounding errors in distant decimal places. For `int-ifying' calculations,
-\texttt{numerica} uses a rounding value of $14$: a calculation produces
-an integer if, when rounded to $14$ figures, the result is an integer.
-Since \texttt{l3fp} works to $16$ significant figures, a rounding
-value of $14$ allows ample `elbowroom' for rounding errors to be
-accommodated when judging what is an integer and what is not. As a
-practical matter problems should not arise.
+As implemented in \texttt{numerica}, $n$-th roots found using \verb`\sqrt[n]`
+are restricted to positive integral \verb`n`. This raises an interesting
+question: if the `$n$' of an $n$-th root is the result of a calculation,
+what happens with rounding errors? The calculation may not produce
+an \emph{exact} integer. (This problem also arises with factorials;
+see §\ref{sec:calcFactorialsBinom}.) The solution employed in version
+3.0.0 of \texttt{numerica} is simply to round to the nearest integer.
+This is simpler than in previous versions where an error could be
+raised in some rare situations. But it does mean that, e.g.\ \eval{$\sqrt[\pi]{27}$},
+since $\pi$ rounds to $3$. In such cases, for the sake of the reader,
+a user should make the rounding explicit – as I did in an example
+above, wrapping $\pi$ in the \verb`\floor` command.
 
-\subsubsection{\emph{n}th roots of negative numbers}
+\subsection{$n$-th roots of negative numbers}
 
-Odd (in the sense of `not even') integral roots of \emph{negative}
-numbers are available with \verb`\sqrt`, 
+Odd (in the sense of `not even') positive integral roots of \emph{negative}
+numbers are available with \verb`\sqrt`,
 \begin{centred}
-\verb`\eval{$ \sqrt[3]{-125} $}` $\Longrightarrow$ \eval{$ \sqrt[3]{-125} $},
+\verb`\eval[p=.,ff]{\[ \sqrt[3]{-125}, \sqrt[3]{-3.375} \]}` $\Longrightarrow$\eval[p=.,ff]{\[ \sqrt[3]{-125}, \sqrt[3]{-3.375} \]}
+\end{centred}
 
-\verb`\eval{$ \sqrt[3]{-1.25} $}` $\Longrightarrow$ \eval{$ \sqrt[3]{-1.25} $}.
+\subsection{Powers of $n$-th roots}
+
+In previous versions of \texttt{numerica}, raising an $n$-th root
+to a power when $n\ne2$ gave a false answer unless the $n$-th root
+was parenthesized before raising to the power. From version 3.0.0,
+the parentheses are unnecessary (but notice the thin space inserted
+before the $3$ in the second example to improve the visual appearance):
+\begin{centred}
+\verb`\eval[p=.,ff]{\[ \bigl(\sqrt[3]{-8}\,\bigr)^3, \sqrt[3]{-8}^{\,3} \]}`
+$\Longrightarrow$ \eval[p=.,ff]{\[ \bigl(\sqrt[3]{-8}\,\bigr)^3, \sqrt[3]{-8}^{\,3} \]} 
 \end{centred}
 
-\subsubsection{Inverse integer powers }
+\subsection{Inverse integer powers }
 
-Of course to find an $n$th root we can also raise to the inverse
-power, 
+Of course to find an $n$-th root we can also raise to the inverse
+power,
 \begin{centred}
 \verb`\eval{$ 81^{1/4} $}` $\Longrightarrow$ \eval{$ 81^{1/4} $}.
 \end{centred}
@@ -1539,14 +2388,14 @@
 is a product of floating point representation of numbers, is discussed
 below in §\ref{subsec:errorsInverse-powers}.
 
-\subsection{Precedence, parentheses}
+\section{Precedence and parentheses}
 
 The usual precedence rules apply: multiplication and division bind
 equally strongly and more strongly than addition and subtraction which
 bind equally stongly. Exponentiating binds most strongly. Evaluation
-occurs from the left. 
+occurs from the left.
 \begin{centred}
-\verb`\eval{$ 4+5\times6+3 $}` $\Longrightarrow$ \eval{$ 4+5\times6+3 $},
+\verb`\eval{$ 4+5\times6+3 $}` $\Longrightarrow$ \eval{$ 4+5\times6+3 $},\medskip{}
 
 \verb`\eval{$ 6\times10^3/2\times10^2 $}` $\Longrightarrow$ \eval{$ 6\times10^3/2\times10^2 $},
 \end{centred}
@@ -1553,86 +2402,228 @@
 which may not be what was intended. Parentheses (or brackets or braces)
 retrieve the situation:
 \begin{centred}
-\verb`\eval{$ (4+5)(6+3) $}` $\Longrightarrow$ \eval{$ (4+5)(6+3) $},
+\verb`\eval{$ (4+5)(6+3) $}` $\Longrightarrow$ \eval{$ (4+5)(6+3) $},\medskip{}
 
 \verb`\eval{$ (6\times10^3)/(2\times10^2) $}` $\Longrightarrow$
 \eval{$ (6\times10^3)/(2\times10^2) $}.
 \end{centred}
-Because exponentiating binds most strongly, negative values must be
-parenthesized when raised to a power. If not,
+When one writes $-4^{2}$ it is not clear what is intended: is it
+$-(4^{2})$ or $(-4)^{2}$? In \texttt{numerica} exponentiating binds
+most strongly; negative values must therefore be parenthesized when
+raised to a power. Thus
 \begin{centred}
-\verb`\eval{$ -4^2 $}` $\Longrightarrow$ \eval{$ -4^2 $},
+\verb`\eval[pp,ff]{$ -4^2, (-4)^2 $}` $\Longrightarrow$ \eval[pp,ff]{$ -4^2, (-4)^2 $}.
 \end{centred}
-which is clearly not $(-4)^{2}$. But
-\begin{centred}
-\verb`\eval{$ (-4)^2 $}` $\Longrightarrow$ \eval{$ (-4)^2 $}.
-\end{centred}
 
-\subsubsection{Command-form brackets}
+\subsection{Command-form brackets}
 
-\label{subsec:evalCommandBrackets}Note that brackets of all three
+\label{subsec:calcCommandBrackets}Note that brackets of all three
 kinds are available also in command form: \verb`\lparen \rparen`
-(from \verb`mathtools`) for \verb`( )`, \verb`\lbrack \rbrack`
+(from \texttt{mathtools}) for \verb`( )`, \verb`\lbrack \rbrack`
 for \verb`[ ]`, and \verb`\lbrace \rbrace` for \verb`\{ \}`.
 
-\subsection{Modifiers\texttt{ (\textbackslash left \textbackslash right}, etc.)}
+\subsection{Modifiers\texttt{ (\textbackslash left}, \texttt{\textbackslash right},
+\texttt{\textbackslash big}, etc.)}
 
-The \verb`\left` and \verb`\right` modifiers and also the series
-of \verb`\big...` modifiers\texttt{ }(\verb`\bigl \bigr`, \verb`\Bigl \Bigr`,
-\verb`\biggl \biggr`, \verb`\Biggl \Biggr`) are available for use
-with all brackets (parentheses, square brackets, braces): 
+The  \verb`\left` and \verb`\right` modifiers and also the series
+of \verb`\big...` modifiers\texttt{ }(\texttt{\textbackslash}\verb`bigl \bigr`;
+\verb`\Bigl \Bigr`; \verb`\biggl \biggr`; \verb`\Biggl \Biggr`)
+are available for use with all brackets (parentheses, square brackets,
+braces). If you feel \verb`\left`, \verb`\right` give too much space
+around your formulas, you can use \verb`\mleft`, \verb`\mright`
+from the \texttt{mleftright} package.
 \begin{verbatim}
-    \eval[p=.]{\[ \exp\left(
-        \dfrac{\ln2}{4}+\dfrac{\ln8}{4} 
-      \right) \]}
+    \eval[p=.,ff]{\[ \exp\left(
+          \dfrac{\ln2}{4}+\dfrac{\ln8}{4} 
+        \right),
+        \exp\mleft(
+          \dfrac{\ln2}{4}+\dfrac{\ln8}{4} 
+        \mright)\]}
 \end{verbatim}
-$\Longrightarrow$     \eval[p=.]{\[ \exp\left(
-        \dfrac{\ln2}{4}+\dfrac{\ln8}{4} 
-      \right) \]}
-
-\texttt{numerica} also accepts their use with \texttt{.} (dot) and
-with \texttt{/} (as noted earlier, the \verb`[p]` and \verb`[p=.]`
-are explained at §\ref{subsec:settingsPunctuation}): 
+$\Longrightarrow$ \eval[p=.,ff]{\[ \exp\left(
+          \dfrac{\ln2}{4}+\dfrac{\ln8}{4} 
+        \right),
+        \exp\mleft(
+          \dfrac{\ln2}{4}+\dfrac{\ln8}{4} 
+        \mright)
+      \]}\texttt{numerica} also accepts the use of left-right modifiers with
+\verb`.` (dot) and with \verb`/`, but if parentheses are not wanted
+it can be simpler just to use a \verb`\big` command:
 \begin{centred}
-\verb`\eval[p]{\[ \left.\dfrac{3+4}{2+1}\right/\!\dfrac{1+2}{4+5} \]}`
-$\Longrightarrow$ \eval[p]{\[ \left.\dfrac{3+4}{2+1}\right/\!\dfrac{1+2}{4+5} \]}
+\verb`\eval[p=.]{\[ \dfrac{3+4}{2+1}\bigg/\dfrac{1+2}{4+5} \]}` $\Longrightarrow$
+\eval[p=.]{\[ \dfrac{3+4}{2+1}\bigg/\dfrac{1+2}{4+5} \]}
 \end{centred}
-They can be nested.
+Modifiers with their accompanying brackets etc.\,can be nested.
 
-\subsection{Trigonometric \& hyperbolic functions}
+\section{Unary functions}
 
-\LaTeX{} provides all six trignometric functions, \verb`\sin`, \verb`\cos`,
-\verb`\tan`, \verb`\csc`, \verb`\sec`, \verb`\cot` and the three
-principal inverses \verb`\arcsin`, \verb`\arccos`, \verb`\arctan`.
-It also provides four of the six hyperbolic functions: \verb`\sinh`,
-\verb`\cosh`, \verb`\tanh`, \verb`\coth`, and \emph{no} inverses.
-\texttt{numerica} provides the missing hyperbolic functions, \verb`\csch`
-and \verb`\sech`, and all missing inverses, the three trigonometric
-and all six hyperbolic: \verb`\arccsc`, \verb`\arcsec`, \verb`\arccot`,
-and \verb`\asinh`, \verb`\acosh`, \verb`\atanh`, \verb`\acsch`,
-\verb`\asech`, \verb`\acoth`. (\emph{HMF} writes $\text{arcsinh}$,
-$\text{arccosh}$, etc. and ISO recommends $\text{arsinh}$, $\text{arcosh}$,
-etc. The first seems ill-advised, the second not widely adopted. At
-present neither is catered for in \texttt{numerica}.) 
+The unary functions catered for in \texttt{numerica} (at present)
+are the trigonometric and hyperbolic functions, the various logarithms,
+the exponential function, and the signum function. Mathematicians
+delimit the arguments of these functions not only with parentheses,
+but also with square brackets and (mathematical) braces (\verb`\{ \}`).
+In \LaTeX{} these are available both in explicit character form and
+also in the command form of §\ref{subsec:calcCommandBrackets}. Of
+whatever kind, brackets can be qualified with \verb`\left \right`,
+\verb`\bigl \bigr`, etc., and \verb`\mleft` and \verb`\mright`
+from the \texttt{mleftright} package.
+
+\subsection{Trigonometric functions}
+
+\label{subsec:calcTrigonometricFunctions}\LaTeX{} provides all six
+trignometric functions, \verb`\sin`, \verb`\cos`, \verb`\tan`,
+\verb`\csc`, \verb`\sec`, \verb`\cot`. Their arguments are assumed
+to be in radians unless degrees are explicitly ordered, either by
+entering \verb`o` (lowercase letter `o', reminiscent of a degree
+symbol) in the settings option, or by appending \verb`\degree` to
+a number. The command \verb`\degree` is defined in \texttt{numerica}
+(using \verb`\ProvideDocumentCommand`) and expands to $\degree$
+in both text and math modes.)
 \begin{centred}
-\verb`\eval{$ \arctan1/1\deg $}` $\Longrightarrow$\eval{$ \arctan1/1\deg $}
-,
+\verb`\eval{$ \sin(\pi/3) $}` $\Longrightarrow$ \eval{$ \sin(\pi/3) $},
 
-\verb`\eval{$ \atanh\tanh3 $}` $\Longrightarrow$ \eval{$ \atanh\tanh3 $}.
+\verb`\eval[o]{$ \sin 60 $}` $\Longrightarrow$ \eval[o]{$ \sin 60 $},
+
+\verb`\eval{$ \sin 60\degree $}` $\Longrightarrow$ \eval{$ \sin 60\degree $}.
 \end{centred}
+\noindent\LaTeX{} also provides the three main trigonometric inverses:
+\verb`\arcsin`, \verb`\arccos`, \verb`\arctan`. The three missing
+inverses – \verb`\arccsc`, \verb`\arcsec`, \verb`\arccot` – are
+provided by \texttt{numerica}. In the example, the \verb`p` setting
+has been used to attach a degree symbol to the answer: 
+\begin{centred}
+\verb`\eval[p=\degree]{$ (\arccot 1)/1\deg $}` $\Longrightarrow$
+\eval[p=\degree]{$ (\arccot 1)/1\deg $}.
+\end{centred}
+Alternatively, you can manually append a \verb`\degree` command after
+the \verb`\eval` command. Repeating the last example, everything
+is clearer if the \verb`o` option is used: 
+\begin{centred}
+\verb`\eval[o]{$ \arccot 1 $}\degree` $\Longrightarrow$ \eval[o]{$\arccot1 $}\degree.
+\end{centred}
 Inverses can also be constructed using the `$-1$' superscript notation.
 Thus
 \begin{centred}
-\verb`\eval{$ \sin^{-1}(1/\surd2)/1\deg $}` $\Longrightarrow$ \eval{$ \sin^{-1}(1/\surd2)/1\deg $}
-,
+\verb`\eval[p=\degree,o]{$ \sin^{-1}(1/\surd2) $}` $\Longrightarrow$
+\eval[p=\degree,o]{$ \sin^{-1}(1/\surd2) $}.
+\end{centred}
 
-\verb`\eval{$ \tanh\tanh^{-1}0.5 $}` $\Longrightarrow$ \eval{$ \tanh\tanh^{-1}0.5 $}.
+\subsubsection{Complicated arguments}
+
+\label{subsec:calcComplicated-arguments}A general function $f$ of
+$x$ is usually written $f(x)$: the argument of the function is delimited
+by parentheses. In practice, with familiar functions, mathematicians
+often don't bother with the parentheses, even when the argument includes
+more than one factor: $\sin\tfrac{1}{2}\pi$, $\cos2\pi t$, $\ln xy$
+($=\ln x+\ln y$), and so on. So long as the argument is composed
+of numbers, constants, variables or \verb`\tfrac`-s or \verb`\sfrac`-s,
+\texttt{numerica} parses the argument without difficulty and without
+requiring parentheses to be inserted. As function arguments become
+more complicated, parentheses can become necessary to clarify just
+what expression the function is acting on. But trigonometric identities
+like 
+\[
+\sin A+\sin B=2\sin\tfrac{1}{2}(A+B)\cos\tfrac{1}{2}(A-B)
+\]
+and especially Fourier series where expressions like
+\[
+\cos\frac{2\pi}{T}nt,\quad\cos\frac{2\pi}{T}n(t+\tfrac{1}{2}T),\quad\text{\ensuremath{\sin(N+\tfrac{1}{2})\frac{2\pi\tau}{T}}, }
+\]
+\[
+\sin2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right),\quad\sin(n+\tfrac{1}{2})(x-t),
+\]
+are a common occurrence, show that in practice parentheses that enclose
+the whole argument, even for complicated expressions, are often omitted.
+Context makes clear where the function argument ends and mathematicians
+read the expressions accordingly. 
+
+What should \texttt{numerica} do? Insist that the whole argument be
+parenthesized? But that results in expressions that are generally
+less pleasing to the eye and require more concentration to read, to
+disentangle the enclosing from the enclosed parentheses:
+\[
+\sin\left(\tfrac{1}{2}(A+B)\right),\quad\sin\left(2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right)\right),\quad\sin\left((n+\tfrac{1}{2})(x-t)\right).
+\]
+Admittedly square brackets and mathematical braces can help here,
+but mathematicians don't (generally) do this. The examples above are
+culled from a number of different texts that I had to hand – I didn't
+need to go searching for them. To insist that formulas be written
+in a `forced' or pedantic way, goes against the underlying idea
+behind \texttt{numerica}: to evaluate expressions in the form in which
+they are typeset.\texttt{ }
+
+Rather, from version 3.0.0 the recommended way of handling such expressions
+is to put the \emph{whole} argument of the function between \LaTeX{}
+braces. (This applies not only to the trigonometric functions but
+also to \emph{any} unary function.) Yes, inserting \LaTeX{} braces
+does involve modifying the formula, but it fits naturally within \LaTeX{}
+practice and, crucially, it makes \emph{no change} to the \texttt{pdf}
+display. The formula retains its `natural' appearance at the same
+time as the full argument is delimited so that \texttt{numerica} knows
+what to operate on. Thus
+\begin{centred}
+\verb`\eval{$ \sin{\tfrac16(m+n)\pi} $}[m=1,n=2]`, $\Longrightarrow$
+\eval{$ \sin{\tfrac16(m+n)\pi} $}[m=1,n=2],
 \end{centred}
+which is $\sin\tfrac{1}{2}\pi$, and
+\begin{verbatim}
+    \eval{\[ 
+             \sin{2\pi\mleft(\frac{x}{\lambda}
+                -\frac{t}{T}\mright)} 
+          \]}[x=1,\lambda=2,t=3,T=4]
+\end{verbatim}
+$\Longrightarrow$     \eval{\[ 
+             \sin{2\pi\mleft(\frac{x}{\lambda}
+                -\frac{t}{T}\mright)} 
+          \]}[x=1,\lambda=2,t=3,T=4]
+
+\noindent which is the sine of $-\tfrac{1}{2}\pi=2\pi\times(-\tfrac{1}{4})$. 
+
+\noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
+In earlier versions of \texttt{numerica} there was a setting \texttt{()=0},
+\texttt{1}, \texttt{2} (see Chapter~\ref{chap:settingsSettings}
+for a discussion of settings) which changed the way parentheses were
+parsed and allowed (most of) these usages. But it was difficult to
+document and remember exactly what was and was not allowed at each
+setting value, meaning the result of a calculation might not reflect
+what a user intended. Besides, dealing with the different setting
+values complicated the code. From version 3.0.0, with the use of braces
+to delimit such arguments, this setting has been withdrawn and now
+produces a \texttt{numerica} error message. The use of \LaTeX{} braces
+to delimit the arguments of \emph{mathematical} functions\emph{ }is
+more generally discussed at §\ref{subsec:evalBraced-groups}.\end{shaded}%
+\end{minipage}
 
-\subsubsection*{Hyperbolic functions}
+\subsection{Hyperbolic functions}
 
+Four of the six hyperbolic functions: \verb`\sinh`, \verb`\cosh`,
+\verb`\tanh`, and \verb`\coth` are provided by \LaTeX , and \emph{no}
+inverses. \texttt{numerica} fills the gaps, providing the missing
+hyperbolic functions, \verb`\csch` and \verb`\sech`, and all missing
+inverses. There is no agreed notation in common use for the hyperbolic
+inverses. \emph{HMF} writes arcsinh, arccosh, \ldots , ISO recommends
+arsinh, arcosh, \ldots , \texttt{l3fp} uses asinh, acosh, \ldots{}
+as do the computer algebra system \texttt{maxima} and the spreadsheet
+\texttt{LibreOffice Calc}. \texttt{numerica} makes no attempt to decide
+the issue. From version 3.0.0, it accepts all\emph{ }three forms for
+all six functions. All can be used within an \verb`\eval` command:
+\begin{verbatim}
+    \eval[pp,p=.,ff]{\[ \atanh\tanh 3, \sinh\arsinh 3, 
+                     \arcsech\sech 3 \]}
+\end{verbatim}
+$\Longrightarrow$ \eval[pp,p=.,ff]{\[ \atanh\tanh 3, \sinh\arsinh 3, \arcsech\sech 3 \]}As
+for the trig.\ inverses, hyperbolic inverses can also be constructed
+using the `$-1$' superscript notation. Thus
+\begin{centred}
+\verb`\eval{$ \coth\coth^{-1}1.5 $}` $\Longrightarrow$ \eval{$ \coth\coth^{-1}1.5 $}.
+\end{centred}
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+
+\subsubsection{Absence from \texttt{l3fp}}
+
 Please note that \texttt{l3fp} does not (as yet) provide \emph{any}
 hyperbolic functions natively. The values \texttt{numerica} provides
 for these functions are \emph{calculated} values using familiar formulas
@@ -1640,13 +2631,13 @@
 and square roots for the inverses. Rounding errors mean the values
 calculated may not have $16$-figure accuracy. The worst `offenders'
 are likely to be the least used, \verb`\acsch` and \verb`\asech`.
-For instance, 
+For instance,
 \[
-\acsch x=\ln\left[\frac{1}{x}+\left(\frac{1}{x^{2}}+1\right)^{1/2}\right],
+\acsch x=\ln\left[\frac{1}{x}+\left(\frac{1}{x^{2}}+1\right)^{\mkern-6mu 1/2}\right],
 \]
 
 \begin{centred}
-\verb`\eval{$ \csch \acsch 7 $}[16]` $\Longrightarrow$ \eval{$ \csch \acsch 7 $}[16]
+\verb`\eval{$ \csch \acsch 7 $}[15]` $\Longrightarrow$ \eval{$ \csch \acsch 7 $}[15].
 \end{centred}
 \end{shaded}%
 \end{minipage}
@@ -1653,140 +2644,140 @@
 
 \subsection{Logarithms}
 
-\noindent The natural logarithm \noindent\verb`\ln`, base $10$ logarithm
-\noindent\verb`\lg`, and binary or base $2$ logarithm \noindent\verb`\lb`
-are all recognized, as is \noindent\verb`\log`, preferably with a
-subscripted base: 
+The natural logarithm \verb`\ln`, base $10$ logarithm \verb`\lg`,
+and binary or base $2$ logarithm \verb`\lb` are all recognized,
+as is \verb`\log`, preferably with a subscripted base:
 \begin{centred}
-\noindent\noindent\verb`\eval{$ \log_{12}1728 $}` $\Longrightarrow$
-\eval{$ \log_{12}1728 $}
+\verb`\eval{$ \log_{12}1728 $}` $\Longrightarrow$ \eval{$ \log_{12}1728 $}
 \end{centred}
-\noindent If there is no base indicated, base $10$ is assumed. (The
-notations \noindent\verb`\ln`, \noindent\verb`\lg`, and \noindent\verb`\lb`
-follow ISO 80000-2 recommendation, which frowns upon the use of the
-unsubscripted \noindent\verb`\log` although only \noindent\verb`\ln`
-appears widely used.) The base need not be explicitly entered as a
-number. It could be entered as an expression or be specified in the
-vv-list: 
+If there is no base indicated, base $10$ is assumed. (The notations
+\verb`\ln`, \verb`\lg`, and \verb`\lb` follow ISO 80000-2 recommendation,
+which frowns upon the use of the unsubscripted \verb`\log` although
+only \verb`\ln` appears to be widely used.) The base need not be
+explicitly entered as a number. It could be entered as an expression
+or be specified in the vv-list:
 \begin{centred}
-\noindent\noindent\verb`\eval*{$ \log_b c $}[b=2,c=1024]` $\Longrightarrow$
-\eval*{$ \log_b c $}[b=2,c=1024],
+\verb`\eval*{$ \log_b c $}[b=2,c=1024]` $\Longrightarrow$ \eval*{$ \log_b c $}[b=2,c=1024],
 \end{centred}
-\noindent the log to base $2$ in this case. It is possible to use
-the unadorned \noindent\verb`\log` with a base different from $10$;
-if you wish to do this only for a particular calculation see §\ref{subsec:settingsLogBase},
-or see §\ref{sec:settingsDefaults} if you want to make this default
-behaviour.
+the log to base $2$ in this case. It is possible to use the unadorned
+\verb`\log` with a base different from $10$; see §\ref{subsec:settingsLogBase}.
 
 \subsection{Other unary functions}
 
-Other unary functions supported are the exponential function \verb`\exp`
-and signature function \verb`\sgn` (equal to $-1$, $0$, or $1$
-depending as its argument is $<0$, $=0$, or $>0$).
+Other unary functions supported are the exponential function \verb`\exp`,
+and signum function \verb`\sgn`, equal to $1$, $-1$, or $0$, depending
+as its argument is positive, negative or zero. 
+\begin{verbatim}
+    \eval{$ \sgn(\exp(x)-e^x) $}[x=1],\quad
+    \eval{$ \sgn(e^x-\exp(x)) $}[x=2]. 
+\end{verbatim}
+$\Longrightarrow$    \eval{$ \sgn(\exp(x)-e^x) $}[x=1],\quad 
+    \eval{$ \sgn(e^x-\exp(x)) $}[x=2]. 
 
-\subsection{Squaring, cubing, \ldots unary functions}
+The first of these is expected, the second probably not. $\exp x$
+is provided by \texttt{l3fp}, a built-in function; $e^{x}$ is calculated
+by \texttt{numerica}, a number ($e$) raised to a power. They differ
+by $1$ in the $15$-th decimal place:
+\begin{centred}
+\verb`\eval[ff]{$ \exp 2, e^2 $}[15*]` $\Longrightarrow$ \eval[ff]{$ \exp 2, e^2 $}[15*].
+\end{centred}
 
-\texttt{numerica} has no difficulty reading a familiar but `incorrectly
-formed' expression like 
+\subsection{Squaring, cubing, \ldots{} unary functions}
+
+\label{subsec:calcSquaring-etc-unary}\verb`\eval` happily digests
+a familiar but `incorrectly formed' expression like 
 \[
 \sin^{2}1.234+\cos^{2}1.234.
 \]
-You do not have to render it $(\sin1.234)^{2}+(\cos1.234)^{2}$ or
-(heaven forbid) $(\sin(1.234))^{2}+(\cos(1.234))^{2}$. The everyday
-usage is fine: 
+You do not have to parenthesize like $(\sin1.234)^{2}+(\cos1.234)^{2}$
+or (heaven forbid) $(\sin(1.234))^{2}+(\cos(1.234))^{2}$; the everyday
+usage is fine:
 \begin{centred}
 \verb`\eval{$ \sin^2\theta+\cos^2\theta $}[\theta=1.234]` $\Longrightarrow$
-\eval{$ \sin^2\theta+\cos^2\theta $}[\theta=1.234].
+\eval{$ \sin^2\theta+\cos^2\theta $}[\theta=1.234] .
 \end{centred}
-Equally \texttt{numerica} has no difficulty reading the `correct'
-but pedantic form 
+Equally \verb`\eval` has no difficulty reading the `correct' pedantic
+form
 \begin{centred}
 \verb`\eval{$ (\sin(\theta))^2+(\cos(\theta))^2 $}[\theta=1.234]`
-$\Longrightarrow$ \eval{$ (\sin(\theta))^2+(\cos(\theta))^2 $}[\theta=1.234]
-.
+$\Longrightarrow$ \eval{$ (\sin(\theta))^2+(\cos(\theta))^2 $}[\theta=1.234] .
 \end{centred}
 A hyperbolic identity is corroborated in this example:
 \begin{centred}
-\verb`\eval{$ \sinh 3x $}[x=1]` $\Longrightarrow$ \eval{$ \sinh 3x $}[x=1],\medskip{}
-
-\verb`\eval{$ 3\sinh x+4\sinh^3x $}[x=1]` $\Longrightarrow$ \eval{$ 3\sinh x+4\sinh^3x $}[x=1].
+\verb`\eval[ff]{\[ \sinh 3x, 3\sinh x+4\sinh^3x \]}[x=1]` $\Longrightarrow$
+\eval[ff]{\[ \sinh 3x, 3\sinh x+4\sinh^3x \]}[x=1]
 \end{centred}
 In fact all named unary functions in \texttt{numerica} can be squared,
-cubed, etc., in this `incorrect' but familiar way, although the practice
-outside the trigonometric and hyperbolic context seems (vanishingly?)
-rare.
+cubed, etc., in this `incorrect' but familiar way, although the
+practice outside the trigonometric and hyperbolic contexts seems rare.
 
 When the argument of the function is parenthesized and raised to a
-power -- like $\sin(\pi)^{2}$ -- it is read by \texttt{numerica}
-as the `sine of the square of pi', $\sin(\pi^{2})$, and \emph{not
-}as the `square of the sine of pi', $(\sin\pi)^{2}$: 
+power – like $\sin(\pi)^{2}$ – it is read by \verb`\eval` as the
+`sine of the square of pi', $\sin(\pi^{2})$, and \emph{not }as
+the `square of the sine of pi', $(\sin\pi)^{2}$:
 \begin{centred}
-\verb`\eval{$ \sin(\pi)^2 $}` $\Longrightarrow$ \eval{$ \sin(\pi)^2 $}.
+\verb`\eval{$ \sin(\pi)^2 $}` $\Longrightarrow$ \eval{$ \sin(\pi)^2  $} .
 \end{centred}
 Things are done like this in \texttt{numerica} above all to handle
-the logarithm in a natural way. Surely $\ln x^{n}=n\ln x$, i.e. $\ln x^{n}=\ln(x^{n})$
-rather than $(\ln x)^{n}$? And if we wish to write (as we do) $\ln(1+1/n)^{n}=n\ln(1+1/n)=1-1/2n+1/3n^{2}-\ldots$
-to study the limiting behaviour of $(1+1/n)^{n}$, then we cannot
-avoid $\ln(x)^{n}=n\ln(x)=\ln(x^{n})$ too.
+the logarithm in a natural way. Surely (see \emph{HMF} 4.1.11) $\ln x^{n}=n\ln x$?
+I.e.\ $\ln x^{n}=\ln(x^{n})$ rather than $(\ln x)^{n}$. And if
+we wish to write (as we do) $\ln(1+1/n)^{n}=n\ln(1+1/n)=1-1/2n+1/3n^{2}-\ldots$
+to study the limiting behaviour of $(1+1/n)^{n}$, then we are committed
+to $\ln(x)^{n}=n\ln(x)=\ln(x^{n})$ too.
 
-\subsection{\emph{n}-ary functions}
+\section{\emph{n}-ary functions}
 
-The functions of more than one variable ($n$-ary functions) that
-\texttt{numerica} supports are \verb`\max`, \verb`\min` and \verb`\gcd`,
-greatest common divisor. The comma list of arguments to \verb`\max`,
-\verb`\min` or \verb`\gcd` can be of arbitrary length. The arguments
-themselves can be expressions or numbers. For \verb`\gcd`, \emph{non-integer
-arguments are truncated to integers}. Hence both $y$ and $3y$ are
-independently truncated in the following example -- to $81$ and
-$243$ respectively: 
+\label{sec:calc-n-ary-functions}The functions of more than one variable
+($n$-ary functions) that \texttt{numerica} supports are \verb`\max`,
+\verb`\min` and \verb`\gcd`, greatest common divisor. The comma
+list of arguments (semicolon list if the \verb`comma` package option
+has been used) to \verb`\max`, \verb`\min` or \verb`\gcd` can be
+of arbitrary length. The arguments themselves can be expressions or
+numbers. 
+
+As implemented in \texttt{numerica}, for \verb`\gcd` non-integer
+arguments are\emph{ }rounded to integers. Hence both $y$ and $3y$
+are independently rounded in the following example – to $81$ and
+$243$ respectively:
 \begin{centred}
 \verb`\eval{$ \gcd(12,10x^2,3y,y,63) $}[y=1/0.0123456789,x=3]` $\Longrightarrow$
-\eval{$ \gcd(12,10x^2,3y,y,63) $}[y=1/0.0123456789,x=3].
+$\vsp$\eval{$ \gcd(12,10x^2,3y,y,63) $}[y=1/0.0123456789,x=3].
 \end{centred}
-(The truncation occurs in the argument of \verb`\gcd`, not in the
-vv-list.)
-
-For $n$-ary functions, squaring, cubing, etc. follows a different
-pattern from that for unary functions. For \verb`\max`, \verb`\min`,
-\verb`\gcd` the argument of the function is a comma list. Squaring
-the argument makes no sense. We understand the superscript as applying
-to the function as a whole. (Consistency is not the point here; it
-is what mathematicians do that \texttt{numerica} tries to accommodate.) 
+The rounding occurs within the greatest common divisor routine, not
+in the vv-list; the variable retains its original value. Modifying
+the example, this becomes evident in the sixth decimal place of the
+new result:
 \begin{centred}
-\verb`\eval{$ \gcd(3x,x,\arcsin 1/\deg)^2 $}[x=24]` $\Longrightarrow$
-\eval{$ \gcd(3x,x,\arcsin 1/\deg)^2 $}[x=24].
+\verb`\eval{$ \gcd(12,10x^2,3y,y,63) + y $}[y=1/0.0123456789,x=3]`
+$\Longrightarrow$ $\vsp$\eval{$ \gcd(12,10x^2,3y,y,63) + y $}[y=1/0.0123456789,x=3].
 \end{centred}
-
-\subsection{Delimiting arguments with brackets \& modifiers }
-
-Arguments of unary and $n$-ary functions can be delimited not only
-with parentheses, but also with square brackets and braces, both in
-explicit character form and also in the command form of §\ref{subsec:evalCommandBrackets}.
-The brackets, of whatever kind, can be qualified with \verb`\left \right`,
-\verb`\bigl \bigr`, etc.\footnote{See §\ref{subsec:settingsPunctuation} for the \texttt{{[}p=.{]}}
-(which ensures the concluding full stop appears in the correct place.} 
+For $n$-ary functions, squaring, cubing, etc. follow a different
+pattern from that for unary functions. The argument of these functions
+is a comma list. Squaring it makes no sense and we understand the
+superscript as applying to the function as a whole. (Consistency is
+not the point here; it is how a person reads the expression that \texttt{numerica}
+tries to accommodate.)
 \begin{centred}
-\verb`\eval[p=.]{\[ \sin\left\lbrack \dfrac\pi{1+2+3}\right\rbrack \]}`
-$\Longrightarrow$ \eval[p=.]{\[ \sin\left\lbrack \dfrac\pi{1+2+3}\right\rbrack \]}
+\verb`\eval{$ \gcd(3x,x,\arcsin 1/\deg)^2 $}[x=24]` $\Longrightarrow$
+$\vsp$\eval{$ \gcd(3x,x,\arcsin 1/\deg)^2$}[x=24] .
 \end{centred}
 
-\subsection{Absolute value, floor \& ceiling functions}
+\section{Absolute value, floor \& ceiling functions}
 
-It is tempting to use the \texttt{|} key on the keyboard for inserting
-an absolute value sign. \texttt{numerica} accepts this usage, but
-it is deprecated. The spacing is incorrect -- compare $|-l|$ using
-\texttt{|} against $\lvert-l\rvert$ using \verb`\lvert \rvert`.
-Also, the identity of the left and right delimiters makes nested absolute
-values difficult to parse. \texttt{numerica} does not attempt to do
-so. Placing an absolute value constructed with \texttt{|} within another
-absolute value constructed in the same way is likely to produce a
-compilation error or a spurious result. \verb`\lvert \rvert` are
-better in every way except ease of writing.\texttt{ }To aid such ease
-\texttt{numerica }provides the \verb`\abs` function (using the \texttt{\textbackslash DeclarePairedDelimiter}
-command of the \texttt{mathtools} package). This takes a mutually
-exclusive star (asterisk) or square bracketed optional argument, and
-a mandatory braced argument. The starred form expands to \verb`\left\lvert #1 \right\rvert`
-where \verb`#1` is the mandatory argument: 
+\label{sec:calcAbsValueEtc}It is tempting to use the \textsf{|} key
+on the keyboard for inserting an absolute value sign. \texttt{numerica}
+accepts this usage, but it is strongly deprecated. The spacing is
+incorrect – compare $|-l|$ using \textsf{|}, against $\lvert-l\rvert$
+using \verb`\lvert \rvert`. Also, with\textsf{ |}, the identity of
+the left and right delimiters makes parsing nested absolute values
+difficult. \texttt{numerica} does not attempt to do so. \verb`\lvert \rvert`
+are better in every way except ease of writing.\texttt{ }To aid such
+ease \texttt{numerica }provides the \verb`\abs` function (using the
+\texttt{\textbackslash DeclarePairedDelimiter} command of the \texttt{mathtools}
+package). This takes a mutually exclusive star (asterisk) or square
+bracketed optional argument, and a mandatory braced argument. The
+starred form wraps \verb`\left\lvert`, \verb`\right\rvert` around
+the mandatory argument:
 \begin{centred}
 \verb`\eval[p=.]{\[ 3\abs*{\frac{\abs{n}}{21}-1} \]}[n=-7]` $\Longrightarrow$
 \eval[p=.]{\[ 3\abs*{\frac{\abs{n}}{21}-1} \]}[n=-7]
@@ -1794,55 +2785,55 @@
 The optional argument provides access to the \verb`\big...` modifiers:
 \begin{verbatim}
     \eval[p=.]{\[
+        \abs[\Big]{\abs{a-c}-\abs[\big]{A-C}} 
+      \]}[A=12,a=-10,C=7,c=-5] 
+\end{verbatim}
+$\Longrightarrow$     \eval[p=.]{\[ 
       \abs[\Big]{\abs{a-c}-\abs[\big]{A-C}} 
     \]}[A=12,a=-10,C=7,c=-5] 
-\end{verbatim}
-$\Longrightarrow$     \eval[p=.]{\[
-      \abs[\Big]{\abs{a-c}-\abs[\big]{A-C}} 
-    \]}[A=12,a=-10,C=7,c=-5]
 
-The form without either star or square bracket option dispenses with
-the modifiers altogether: 
+\noindent The form without either option dispenses with modifiers
+altogether:
 \begin{centred}
 \verb`\eval{$ \tfrac12(x+y)+\tfrac12\abs{x-y} $}[x=-3,y=7].` $\Longrightarrow$
 \eval{$ \tfrac12(x+y)+\tfrac12\abs{x-y} $}[x=-3,y=7].
 \end{centred}
-As noted, the star and square bracketed option are mutually exclusive
-arguments.
+As noted, the star and square bracket options are mutually exclusive.
 
 \texttt{numerica} also provides the functions \verb`\floor` and \verb`\ceil`,
 defined in the same way, taking a mutually exclusive star or square
-bracketed optional argument and for the starred forms expanding to
-\verb`\left\lfloor #1 \right\rfloor` and \verb`\left\lceil #1 \right\rceil`
-where \verb`#1` is the mandatory argument, and for the square bracket
-option forms replacing the \verb`\left` and \verb`\right` with the
-corresponding \verb`\big` commands. The form without star or square-bracket
-option dispenses with any modifier at all. 
+bracketed optional argument, the starred forms wrapping \verb`\left\lfloor`,
+\verb`\right\rfloor` or \verb`\left\lceil`, \verb`\right\rceil`
+around the mandatory argument, and  the square bracket option forms
+replacing the \verb`\left` and \verb`\right` with the corresponding
+\verb`\big` commands (see the \verb`\abs` example above). The form
+without star or square-bracket option dispenses with any modifier
+at all.
 \begin{centred}
-\verb`\eval{$ \floor{-\pi} $}` $\Longrightarrow$ \eval{$ \floor{-\pi} $},
-
-\verb`\eval{$ \ceil{\pi} $}` $\Longrightarrow$ \eval{$ \ceil{\pi} $}.
+\verb`\eval[pp,ff]{$ \floor{-\pi}, \ceil{\pi} $}` $\Longrightarrow$
+\eval[pp,ff]{$ \floor{-\pi}, \ceil{\pi} $}.
 \end{centred}
 The floor function, $\lfloor x\rfloor$, is the greatest integer $\le x$;
 the ceiling function, $\lceil x\rceil$ is the smallest integer $\ge x$.
 Like the absolute value, the floor and ceiling functions, can be nested: 
 \begin{centred}
-\verb`\eval{$ \floor{-\pi+\ceil{e}} $}` $\Longrightarrow$\eval{$ \floor{-\pi+\ceil{e}} $}.
+\verb`\eval{$ \floor{-\pi+\ceil{e}} $}` $\Longrightarrow$ \eval{$ \floor{-\pi+\ceil{e}} $}.
 \end{centred}
 
-\subsubsection{Squaring, cubing, \ldots{} absolute values, etc.}
+\subsection{Squaring, cubing, \ldots{} absolute values, etc.}
 
 These three functions can be raised to a power \emph{without} extra
-parentheses: 
+parentheses:
 \begin{centred}
-\verb`\eval{$ \ceil{e}^2 $},` $\Longrightarrow$ \eval{$ \ceil{e}^2 $},
+\verb`\eval[pp,ff]{$ \ceil{e}^2, \floor{e}^2 $}` $\Longrightarrow$
+\eval[pp,ff]{$ \ceil{e}^2, \floor{e}^2 $},\medskip{}
 
-\verb`\eval{$ \abs{-4}^2 $}.` $\Longrightarrow$ \eval{$ \abs{-4}^2 $}.
+\verb`\eval{$ \abs{-4}^2 $}` $\Longrightarrow$ \eval{$ \abs{-4}^2 $}.
 \end{centred}
 
-\subsection{Factorials, binomial coefficients}
+\section{Factorials, binomial coefficients}
 
-\label{subsec:evalFactorialsBinom}Factorials use the familiar trailing
+\label{sec:calcFactorialsBinom}Factorials use the familiar trailing
 \texttt{!} notation: 
 \begin{centred}
 \verb`\eval{$ 7! $}` $\Longrightarrow$ \eval{$ 7! $},
@@ -1853,16 +2844,16 @@
 The examples illustrate how \texttt{numerica} interprets the argument
 of the factorial symbol: it `digests' 
 \begin{itemize}
-\item a preceding (possibly multi-digit) integer, or 
-\item a preceding variable token, or 
-\item a bracketed expression, or 
-\item a bracket-like expression. 
+\item a preceding (possibly multi-digit) integer, or
+\item a preceding variable, or
+\item a bracketed expression, or
+\item a bracket-like expression.
 \end{itemize}
 A bracket-like expression is an absolute value, floor or ceiling function,
-since they delimit arguments in a bracket-like way: 
+since they delimit arguments in a bracket-like way:
 \begin{centred}
 \verb`\eval{$ \abs{-4}!+\floor{\pi}!+\ceil{e}! $}` $\Longrightarrow$
-\eval{$ \abs{-4}!+\floor{\pi}!+\ceil{e}! $}
+\eval{$ \abs{-4}!+\floor{\pi}!+\ceil{e}! $}.
 \end{centred}
 The result of feeding the factorial an expression different in kind
 from one of these four cases may give an error message or an unexpected
@@ -1869,113 +2860,138 @@
 result. Use parentheses around such an expression; for example write
 $(3^{2})!$, rather than $3^{2}!$.
 
-Nesting of brackets for factorials is accepted: 
+Nesting of brackets for factorials is accepted:
 \begin{centred}
 \verb`\eval{$ ((5-2)!+1)! $}` $\Longrightarrow$ \eval{$ ((5-2)!+1)! $}.
 \end{centred}
-The factorials of negative integers or of non-integers are not defined
-in \texttt{numerica}, and again there is the problem met in relation
-to $n$th roots of what happens if the argument of a factorial is
-the result of a calculation and rounding errors mean it is not an
-exact integer. This problem is unlikely to be of practical concern
-since \texttt{numerica} rounds the result of such a calculation by
-default to $14$ significant figures before offering it to the factorial.
-Since \texttt{l3fp} works to $16$ significant figures, there is ample
-`elbowroom' to accommodate rounding errors before the result of a
-calculation ceases to round to an integer.
+The factorials of negative integers are not defined and raise a \texttt{numerica}
+error. It simplifies the code to treat the factorial of a positive
+non-integer as the factorial of the integer it rounds to, rather than
+raising an error. For the sake of the reader, in such circumstances,
+an author should make the rounding explicit: 
+\begin{centred}
+\verb`\eval{$ \floor{\pi}! $}` $\Longrightarrow$\eval{$ \floor{\pi}! $}.
+\end{centred}
+This rounding to an integer is different from the behaviour in earlier
+versions of \texttt{numerica} but should make no noticeable difference. 
 
-\subsubsection{Double factorials}
+\subsection{Double factorials}
 
 The double factorial, written $n!!,$ is the product $n(n-2)(n-4)\ldots\times4\times2$
-when $n$ is even and the product $n(n-2)(n-4)\ldots\times3\times1$
-when $n$ is odd. 
+when $n$ is even, and the product $n(n-2)(n-4)\ldots\times3\times1$
+when $n$ is odd:
 \begin{centred}
-\verb`\eval{$ 6!! $}` $\Longrightarrow$ \eval{$ 6!! $},
-
-\verb`\eval{$ n!! $}[n=\sqrt{49}]` $\Longrightarrow$ \eval{$ n!! $}[n=\sqrt{49}].
+\verb`$\eval[pp,ff]{6!!, 5!!}$` $\Longrightarrow$ $\eval[pp,ff]{6!!, 5!!}$.
 \end{centred}
-Since $n!=n!!(n-1)!!$ it follows that 
+As with factorials, the double factorial sign can be appended to a
+(possibly multi-digit) number, a variable, a bracketed expression
+or a bracket-like expression.
+\begin{centred}
+\verb`\eval[env=\[,ff]{ n!!, (n-1)!!, \abs{2-n}!! }[n=\sqrt{49}]`
+$\Longrightarrow$ \eval[env=\[,ff]{ n!!, (n-1)!!, \abs{2-n}!! }[n=\sqrt{49}]
+\end{centred}
+Since $n!=n!!(n-1)!!$,
 \[
-n!!=\frac{n!}{(n-1)!!}=\frac{(n+1)!}{(n+1)!!}.
+n!!=\frac{n!}{(n-1)!!}=\frac{(n+1)!}{(n+1)!!},
 \]
-Putting $n=0$ in the outer equality shows that $0!!=1$. Now putting
-$n=0$ in the left equality gives $(-1)!!=1$. Double factorials therefore
-are defined for integers $\ge-1$.
+on multiplying top and bottom by $n+1$. Putting $n=0$ in the left
+and right expressions shows that $0!!=1$. Now put $n=0$ in the left
+and middle expressions. We deduce that $(-1)!!=1$. It follows that
+double factorials  are defined for integers $\ge-1$.
 
-\subsubsection{Binomial coefficients}
+\subsection{Binomial coefficients}
 
 Binomial coefficients are entered in \LaTeX{} with the \verb`\binom`\textbf{
-}command. It takes two arguments and has a text-style version \verb`\tbinom`
-and a display-style version \verb`\dbinom`. As implemented in \texttt{numerica},
-these are \emph{generalised} binomial coefficients: 
+}command. It takes two arguments, \verb`\binom{a}{b}` and scales
+like \verb`\frac`: inline it displays as $\binom{a}{b}$, and in
+displaystyle as
 \[
+\binom{a}{b}.
+\]
+One can force textstyle with \verb`\tbinom` and force displaystyle
+with \verb`\dbinom`. As implemented in \texttt{numerica}, these are
+\emph{generalised} binomial coefficients:
+\[
 \binom{x}{k}=\frac{x(x-1)\dots(x-k+1)}{k(k-1)\dots1},\quad(x\in\mathbb{R},~k\in\mathbb{N}),
 \]
-where $x$ need not be a non-negative integer, and where $\binom{x}{0}=1$
-by definition. Although the first (or upper) argument can be any real
-number, the lower argument \emph{must} be a non-negative integer.
-Thus, \verb`\eval{$ \tbinom53 $}` $\Longrightarrow$ \eval{$ \tbinom53 $},
-\verb`\eval{$ \tbinom70 $}` $\Longrightarrow$ \eval{$ \tbinom70 $},
-\verb`\eval{$ \tbinom{4.2}3 $}` $\Longrightarrow$ \eval{$ \tbinom{4.2}3 $},
-but if the second (or lower) argument of \verb`\binom` is \emph{not}
-a non-negative integer, \texttt{numerica} displays a message; see
-§\ref{subsec:errorsIntegerArgs}.
+where $x$ need not be a positive or zero integer, and where $\binom{x}{0}=1$
+by definition. 
+\begin{centred}
+\verb`\eval[pp,p=.,ff]{$ \tbinom53, \tbinom70 $}` $\Longrightarrow$
+\eval[pp,p=.,ff]{$ \tbinom53, \tbinom70 $}
+\end{centred}
+The first (or upper) argument can be any real number; it does not
+need to be an integer or positive: recalling that \eval[eq=\approx]{$\pi^2$}[3],
+\begin{centred}
+\verb`\eval[pp,p=.,ff]{$ \tbinom94, \tbinom{\pi^2}4, \tbinom{10}4 $}[3]`$\Longrightarrow$
+\eval[pp,p=.,ff]{$ \tbinom94, \tbinom{\pi^2}4, \tbinom{10}4 $}[3] 
+\end{centred}
+If the second (or lower) argument of \verb`\binom` is negative, \texttt{numerica}
+responds with a message: 
+\begin{centred}
+\verb`\eval{$ \binom 5{-3} $}` $\Longrightarrow$ \eval{$ \binom 5{-3} $}.
+\end{centred}
+If the second argument is positive but not an integer, \texttt{numerica}
+rounds it to the nearest integer before calculating the binomial coefficient:
+\begin{centred}
+\verb`\eval[pp,ff]{$ \binom 5e, \binom 53 $}` $\Longrightarrow$
+\eval[pp,ff]{$ \binom 5e, \binom 53 $}.
+\end{centred}
+This differs from previous versions of \texttt{numerica} which would
+raise an error in this case. Although positive non-integers are now
+rounded to the nearest integer, out of consideration for the reader,
+an author should make explicit the fact that an integer has been used.
+In the example I should have written \verb`\ceil{e}` rather than
+\verb`e`.
 
-\subsection{Sums and products}
+\section{Sums and products}
 
-\texttt{numerica} recognizes sums (\verb`\sum` displaying as $\sum$)
-and products (\verb`\prod` displaying as $\prod$), and expects both
-symbols to have lower and upper summation/product limits specified.
-The lower limit must be given in the form \emph{sum/prod variable
-= initial value}; the upper limit requires only the final value to
-be specified (although it can also be given in the form \emph{sum/prod
-variable = final value}). The values may be expressions depending
-on other variables and values but must evaluate to integers (or infinity
--- see §\ref{sec:settingsInfiniteSumsProds}). Evaluating to an integer
-means that they \emph{round} to an integer, using a rounding value
-that is set by default to $14$; (recall that \texttt{l3fp} works
-to $16$ significant figures). If a limit evaluates to a non-integer
-at this `int-ifying' rounding value, an error message results. (To
-change this `int-ifying' rounding value, see §\ref{subsec:defaultsIntifyingRounding}.)
-
-As an example of expressions in the limits, this example uses the
-floor and ceiling functions to convert combinations of constants to
-integers (the \verb`[p]` is explained in §\ref{subsec:settingsPunctuation}), 
+\texttt{numerica} recognizes \verb`\sum`, displaying as $\sum$,
+and \verb`\prod`, displaying as $\prod$, and expects both symbols
+to have lower and upper summation or product limits specified. The
+lower limit must be given in the form\emph{ variable=initial value}
+where \emph{variable} is the summation or product variable; the upper
+limit requires only the final value to be specified (although it can
+also be given in the form \emph{variable=final value}). The values
+may be expressions depending on other variables and values, and are
+rounded to integers. This differs from earlier versions of \texttt{numerica}
+where, if the result of a calculation differed too much from an integer,
+it prompted an error message. Now the rounding happens automatically,
+whatever the value. As in other similar contexts, for the sake of
+the reader an author should ensure that the integer value is explicit: 
 \begin{centred}
-\verb`\eval[p]{\[ \sum_{n=\floor{\pi/e}}^{\ceil{\pi e}}n \]}` $\Longrightarrow$
-\eval[p]{\[ \sum_{n=\floor{\pi/e}}^{\ceil{\pi e}}n \]}
+\verb`\eval[p]{\[ \sum_{n=\floor{\pi/e}}^{\ceil{\pi e}}n \]}` $\Longrightarrow$\eval[p]{\[ \sum_{n=\floor{\pi/e}}^{\ceil{\pi e}}n \]}
 \end{centred}
-(which is $\sum_{n=1}^{9}n$).\emph{ }If the upper limit is less than
-the lower limit the result is zero. Notice that there is no vv-list.
-The summation variable does not need to be included there unless there
-are other variables that depend on it. However, in the case 
+\noindent (which is $\sum_{n=1}^{9}n$).\emph{ }If the upper limit
+is less than the lower limit the result is zero. Notice that there
+is no vv-list. The summation variable does not need to be included
+there unless there are other variables that depend on it. However,
+in the case
 \begin{centred}
 \verb`\eval[p]{\[ \sum_{k=1}^N\frac1{k^3} \]}[N=100][4]` $\Longrightarrow$
 \eval[p]{\[ \sum_{k=1}^N\frac1{k^3} \]}[N=100][4]
 \end{centred}
-the upper limit $N$ is necessarily assigned a value in the vv-list.
+the upper limit $N$ is necessarily assigned a value in the vv-list. 
 
-\noindent To the author it seems natural to enter the lower limit
-first, immediately after the \noindent\verb`\sum` command (the sum
-is \emph{from }something \emph{to} something), but no problem will
-accrue if the upper limit is placed first (after all, the appearance
-of the formula in the pdf is the same): 
+To the author it seems natural to enter the lower limit first, immediately
+after the \verb`\sum` command (the sum is \emph{from }something \emph{to}
+something), but no problem will accrue if the upper limit is placed
+first (after all, the appearance of the formula in the \texttt{pdf}
+is the same):
 \begin{centred}
-\noindent\noindent\verb`\eval[p=.]{\[ \sum^N_{k=1}\frac1{k^3} \]}[N=100][4]`
-$\Longrightarrow$ \eval[p=.]{\[ \sum^N_{k=1}\frac1{k^3} \]}[N=100][4]
+\verb`\eval[p=.]{\[ \sum^N_{k=1}\frac1{k^3} \]}[N=100][4]` $\Longrightarrow$
+\eval[p=.]{\[ \sum^N_{k=1}\frac1{k^3} \]}[N=100][4]
 \end{centred}
-\noindent Another example of a sum, using binomial coefficients this
-time, is
+Another example of a sum, using binomial coefficients this time, is 
 \begin{centred}
-\noindent\noindent\verb`\eval[p]{\[ \sum_{m=0}^5\binom{5}{m}x^m y^{5-m} \]}[x=0.75,y=2.25]`
+\verb`\eval[p]{\[ \sum_{m=0}^5\binom{5}{m}x^m y^{5-m} \]}[x=0.75,y=2.25]`
 $\Longrightarrow$ \eval[p]{\[ \sum_{m=0}^5\binom{5}{m}x^m y^{5-m} \]}[x=0.75,y=2.25]
 \end{centred}
-\noindent which is just 
+which is just 
 \begin{centred}
-\noindent\noindent\verb`\eval{$(x+y)^5$}[x=0.75,y=2.25]` $\Longrightarrow$
-\eval{$(x+y)^5$}[x=0.75,y=2.25],
+\verb`\eval{$(x+y)^5$}[x=0.75,y=2.25]` $\Longrightarrow$ \eval{$ (x+y)^5 $}[x=0.75,y=2.25], 
 \end{centred}
-\noindent or $3^{5}$. Now let's calculate a product: 
+or $3^{5}$. Now let's calculate a product:
 \begin{verbatim}
     \eval[p]{\[
       \prod_{k=1}^{100} 
@@ -1982,19 +2998,16 @@
         \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
           \]}[x=1][3]
 \end{verbatim}
-$\Longrightarrow$     \eval[p]{\[
-      \prod_{k=1}^{100} 
-        \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
-          \]}[x=1][3]
+$\Longrightarrow$ \eval[p]{\[\prod_{k=1}^{100} \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)\]}[x=1][3]
 
-\noindent to be compared with \noindent\verb`\eval{$ \sinh 1 $}[3]`
-$\Longrightarrow$ \eval{$ \sinh 1 $}[3]. Obviously more terms than
-$100$ are required in the product to achieve 3-figure accuracy.
+\noindent to be compared with \verb`\eval{$ \sinh 1 $}[3]` $\Longrightarrow$
+\eval{$ \sinh1 $}[3]. Obviously more terms than $100$ are required
+in the product to achieve 3-figure accuracy. 
 
-\subsubsection{Infinite sums and products}
+\subsection{Infinite sums and products}
 
-How many more? Let's `go the whole hog' and put $\infty$ in the upper
-limit of this product: 
+How many more? Let's `go the whole hog' and put $\infty$ in the
+upper limit of this product:
 \begin{verbatim}
     \eval[p=.]{\[
       \prod_{k=1}^{\infty} 
@@ -2001,10 +3014,11 @@
         \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
           \]}[x=1][3] 
 \end{verbatim}
-$\Longrightarrow$     \eval[p=.]{\[
-      \prod_{k=1}^{\infty} 
-        \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
-          \]}[x=1][3] 
+$\Longrightarrow$ \eval[p=.]
+  {\[
+    \prod_{k=1}^{\infty} 
+      \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
+  \]}[x=1][3] 
 
 \noindent Disappointingly, we still get the same result, deficient
 by $1$ in the third decimal place. Obviously \texttt{numerica} has
@@ -2011,121 +3025,467 @@
 not multiplied an infinite number of terms and, just as obviously,
 the finite number of terms it \emph{has} multiplied are too few. How
 \texttt{numerica} decides when to stop evaluating additional terms
-in an infinite sum or product is discussed later, §\ref{sec:settingsInfiniteSumsProds}.
+in an infinite sum or product is discussed below in §\ref{sec:calcStoppingCriterion}.
 
 For this particular product the problem is that it converges slowly.
 Any criterion for when to stop multiplying terms or, for an infinite
-sum adding terms, seems bound to fail for some product or series.
-Presumably any stopping criterion must measure smallness in some way.
-But terms of, for example, the divergent harmonic series $\sum(1/n)$
-can always be found smaller than any value we care to specify. It
-is not surprising that a sufficiently slowly converging product or
-series falls foul of a given criterion.
+sum adding terms, seems bound to fail whenever convergence is sufficiently
+slow. Presumably any stopping criterion must measure smallness in
+some way. But terms of the divergent harmonic series $\sum(1/n)$,
+for example, can always be found smaller than any value we care to
+specify. It is not surprising that a stopping criterion will fail
+when convergence is slow enough. However, the default criterion can
+be changed: again, see below in §\ref{sec:calcStoppingCriterion}. 
 
-The default criterion however can be changed. Because this involves
-values assigned in the settings option of the \verb`\eval` command,
-I discuss infinite sums and products in the section discussing that
-optional argument; see §\ref{sec:settingsInfiniteSumsProds}.
-
 Other infinite sums converge more rapidly, and the default settings
-work admirably. For example \verb`\eval{$ (1+0.1234)^{4.321} $}`
-$\Longrightarrow$ \eval{$ (1+0.1234)^{4.321} $}. Using binomial
-coefficients we can express this as an infinite sum:\medskip{}
-
+work admirably for them. For example
+\begin{centred}
+\verb`\eval{$ (1+0.1234)^{4.321} $}` $\Longrightarrow$ \eval{$ (1+0.1234)^{4.321} $}.
+\end{centred}
+Using binomial coefficients we can express this as an infinite sum:\medskip{}
 \begin{verbatim}
     \eval[p=.]{\[
         \sum_{n=0}^{\infty}\binom{\alpha}{n}x^{n}
            \]}[\alpha=4.321,x=0.1234]
 \end{verbatim}
-$\Longrightarrow$     \eval[p=.]{\[
-        \sum_{n=0}^{\infty}\binom{\alpha}{n}x^{n}
-           \]}[\alpha=4.321,x=0.1234]
+$\Longrightarrow$ \eval[p=.]
+  {\[
+    \sum_{n=0}^{\infty}\binom{\alpha}{n}x^{n}
+  \]}[\alpha=4.321,x=0.1234]
 
-\subsection{Formatting commands}
+\subsection{The stopping criterion}
 
-\label{subsec:evalFormatting-commands}There are many formatting commands
+\label{sec:calcStoppingCriterion}There are ways of tweaking various
+parameters to nudge infinite sums and products to a correct limit.
+These tweaks are applied via the settings option of the \verb`\eval`
+command. 
+
+The normal convergence criterion used by \texttt{numerica} to determine
+when to stop adding/multiplying terms in an infinite sum/product is
+\emph{when the next term added/multiplied leaves the total unaltered
+when rounded to 2 more digits than the specified rounding value.}
+Suppose $L_{k}$ is the partial sum/product after $k$ terms, and
+$r$ is the rounding value.\footnote{E.g.\ if $T(n)$ is the $n$-th term then the partial sum $L_{k}=\sum_{n=1}^{k}T(n)$.}
+Let $\left(L_{k}\right)_{r}$ denote $L_{k}$ rounded to $r$ figures.
+\emph{The infinite sum or product stops at the $(k+1)$-th term (and
+the value is attained at the $k$-th term) when }$\left(L_{k+1}\right)_{r+2}=\left(L_{k}\right)_{r+2}$.
+The hope is that if this is true at rounding value $r+2$ then at
+rounding value $r$ the series or product will have attained a stable
+value at that smaller rounding value.
+
+For a series of monotonic terms converging quickly to a limit, this
+stopping criterion works well, less so if convergence is slower, as
+seen earlier with the infinite product for $\sinh1$. The criterion
+can fail completely when terms behave in a non-monotonic manner. Terms
+of a Fourier series, for example, may take zero values so that $L_{k+1}=L_{k}$
+and, \emph{a fortiori}, $\left(L_{k+1}\right)_{r+2}=\left(L_{k}\right)_{r+2}$;
+the criterion is necessarily satisfied but the series may still be
+far from its limit. In a product the equivalent would be a term taking
+unit value. Sometimes the initial terms of series or products are
+`irregular' and take these `stopping' values meaning sum or product
+would stop after only one or two additions/multiplications and far
+from any limit. 
+
+\begin{table}[t]
+\centering
+\centering{}\caption{Stopping criterion settings}\label{tab:calcStoppingCriterionSettings}
+\begin{center}
+{\small{}%
+\begin{tabular}{ll>{\raggedright}p{6cm}l}
+\toprule 
+{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
+\midrule 
+{\small\texttt{S+}} & {\small int} & {\small extra rounding for sums} & {\small\texttt{2}}\tabularnewline
+{\small\texttt{S?}} & {\small$\text{int}\ge0$} & {\small number of query terms for sums} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{P+}} & {\small int} & {\small extra rounding for products} & {\small\texttt{2}}\tabularnewline
+{\small\texttt{P?}} & {\small$\text{int}\ge0$} & {\small number of query terms for products} & {\small\texttt{0}}\tabularnewline
+\bottomrule
+\end{tabular}}
+\par\end{center}
+\end{table}
+To cope with these possibilities, \texttt{numerica} offers two settings
+for sums, two for products, summarized in Table~\ref{tab:calcStoppingCriterionSettings}.
+These are entered in the settings option of the \verb`\eval` command.
+\begin{itemize}
+\item \texttt{S+=<integer>} \texttt{(P+=<integer>)\quad{}} \emph{additional}
+rounding on top of the specified (or default) rounding for the calculation;
+the larger \texttt{<integer>} is, the more likely that sum or product
+has attained a stable value at the specified rounding value $r$;
+default = $2$
+\item \texttt{S?=<integer> $\ge0$ (P?=<integer> $\ge0$)\quad{}}the number
+of terms to \emph{query} after the stopping criterion has been achieved
+to confirm that it is not an `accident' of particular values; default
+= $0$
+\begin{itemize}
+\item once the stopping criterion has been met, we add/multiply these next
+few terms to the result and check at each step whether the result
+is unchanged at the specified rounding value. Suppose the additional
+rounding (\texttt{S+} or \texttt{P+}) is $\delta r$ on top of the
+specified rounding $r$ and let the number of query terms be $q$.
+(By default $\delta r=2$ and $q=0$.) Suppose $L_{k_{0}}$ is the
+first term at which the stopping criterion is achieved. That means
+$\left(L_{k_{0}}\right)_{r+\delta r}=\left(L_{k_{0}+1}\right)_{r+\delta r}$.
+What we require of the query terms is that $\left(L_{k_{0}}\right)_{r+\delta r}=\left(L_{k_{0}+1+j}\right)_{r+\delta r}$
+for $j=0,1,\ldots,q$.
+\end{itemize}
+\end{itemize}
+Earlier we found that the infinite product for $\sinh1$ with the
+default settings gave the wrong value, $0.174$, deficient by $1$
+in the last digit. We now have the means to tweak the stopping criterion
+by increasing the additional rounding: 
+\begin{verbatim}
+    \eval[p,P+=3]{\[
+      \prod_{k=1}^{\infty}
+      \biggl(\frac{x^2}{k^2\pi^2} +1\biggr) 
+    \]}[x=1][3]\nmcInfo{prod}.
+\end{verbatim}
+\noindent$\Longrightarrow$ \noindent\eval[p,P+=3]{\[
+  \prod_{k=1}^{\infty}
+  \biggl(\frac{x^2}{k^2\pi^2} +1\biggr) 
+\]}[x=1][3]\nmcInfo{prod}.  To obtain that last item of information (350 factors), I've anticipated
+a little and used the command \verb`\nmcInfo` with the argument \verb`prod`
+(see §\ref{sec:supplInfo}). The product now produces the correct
+three-figure value, but it takes $350$ factors to do so. 
+
+Knowing how many terms or factors have been needed helps assess how
+trustworthy the result from an infinite sum or product is. For example,
+for the exponential series,
+\begin{verbatim}
+    \eval[p]{\[
+      \sum_{k=0}^\infty \frac1{k!} 
+    \]}[9]\nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[\sum_{k=0}^\infty \frac1{k!} \]}[9]%\nmcInfo{sum}.
+To $9$ places of decimals, using the default value \texttt{S+=2},
+the exponential series arrives at the right sum after only $15$ terms.
+Convergence is rapid. We can trust this result (and it is in fact
+the correct nine-figure value). By contrast, if we didn't know the
+value of $\sinh1$ beforehand, noting the number of factors required
+would make us justly cautious about accepting the result of the infinite
+product calculation. 
+
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+One way to gain confidence in a result is to choose a possibly unrealistic
+rounding value $r$ – say the default $6$ for the infinite product
+– then use \emph{negative} values for the additional rounding, \texttt{S+=-5},
+\texttt{S+=-4}, \ldots{} , so that the stopping criterion applies at
+rounding values $s=r+S_{+}$ of $6+(-5)=1$ decimal place, $6+(-4)=2$
+decimal places, and so on, but the result is always presented to $6$
+decimal places. You can then see how the $6$-figure results behave
+relative to the number of terms it takes to meet the stopping criterion.
+A little experimenting shows that for the infinite product for $\sinh1$
+the number of factors $N_{s}$ required at a stopping rounding value
+$s$ increases in geometric proportion with a scale factor of about
+$3$: $N_{s}\approx\text{const}\times3^{s}$. This rapidly becomes
+large ($3^{4}=81,3^{5}=243\dots$). For the exponential series on
+the other hand $N_{s}=4+s$, the number of terms increases only slowly,
+in direct proportion to the stopping rounding value.
+
+~
+
+Similar experiments with the sums of inverse fourth, third and second
+powers of the integers, using \verb`\nmcInfo` to find how many terms
+are required at each stopping rounding value, show that at least over
+the rounding value range $1$ to $8$, for inverse fourth powers $N_{s}\approx\text{const}\times1.7^{s}$,
+for inverse third powers $N_{s}\approx\text{const}\times2^{s}$ and
+for inverse squares $N_{s}\approx\text{const}\times3^{s}$. All are
+geometric rather than arithmetic progressions, but for inverse fourth
+powers the scale factor ($\approx1.7$) is sufficiently small that
+for these low values of $s$ the number of terms required does not
+grow too quickly (e.g.\ $1.7^6\approx\eval{1.7^6}[0]$).
+
+~
+
+It is a standard result (Euler) that the inverse fourth power series
+sums to $\pi^{4}/90$: \verb`$ \eval{ \pi^4/90 } $` $\Longrightarrow$
+$ \eval{ \pi^4/90 } $ to six places, and indeed, with the default
+rounding value $6$ and default extra rounding \texttt{S+=2},
+\begin{centred}
+\verb`\eval[p]{\[ \sum_{k=1}^\infty \frac1{k^4} \]}` $\Longrightarrow$
+\eval[p=.]{\[ \sum_{k=1}^\infty \frac1{k^4} \]}
+\end{centred}
+\end{shaded}%
+\end{minipage}
+
+\subsubsection{Premature ending of infinite sums}
+
+All the series considered so far have been monotonic. Trigonometric
+series will generally not be so, nor even single-signed. 
+
+Trigonometric sums are computationally intensive and so, for the following
+example, I have specified a rounding value of 2. The series 
+\[
+\sum_{n=1}^{\infty}\frac{4}{n^{2}\pi^{2}}(1-\cos n\pi)\cos2\pi nt
+\]
+is the Fourier series for the triangular wave function \textbackslash\!/\!\textbackslash\!/\!\textbackslash\!/\!\textbackslash{}
+\ldots{} of period 1, symmetric about the origin where it takes its
+maximum value 1, crossing the $t$-axis at $t=0.25$ and descending
+to its minimum $-1$ at $t=0.5$, before ascending to a second maximum
+at $t=1$ (and so on). In the interval $[0,0.5)$ the series should
+sum to $1-4t$. The problem is that the summand $\frac{4}{n^{2}\pi^{2}}(1-\cos n\pi)\cos2\pi nt$
+vanishes both when $n$ is even and when $4nt$ is an odd integer.
+If $t=0.1$ then $4nt$ is never an odd integer so the summand vanishes
+only for $n$ even, every second term. We expect the result to be
+$1-4\times0.1=0.6$.
+\begin{verbatim}
+    \eval[p]{\[
+      \sum_{n=1}^{\infty}
+        \frac{4}{n^{2}\pi^{2}}
+        (1-\cos n\pi)\cos2\pi nt 
+    \]}[t=0.1][2]\nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[
+  \sum_{n=1}^{\infty}
+    \frac{4}{n^{2}\pi^{2}}
+    (1-\cos n\pi)\cos2\pi nt 
+\]}[t=0.1][2]\info{sum}. Only one term? Of course – in the second term $n=2$ is even so the
+term vanishes and the stopping criterion is satisfied. The way around
+this problem is to query terms \emph{beyond} the one where the stopping
+criterion is achieved, i.e.\ to set \texttt{S?} to a nonzero value.
+We try \texttt{S?=1}: 
+\begin{verbatim}
+    \eval[p,S?=1]{\[
+      \sum_{n=1}^{\infty}
+        \frac{4}{n^{2}\pi^{2}}
+        (1-\cos n\pi)\cos2\pi nt 
+    \]}[t=0.1][2]\nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p,S?=1]{\[
+  \sum_{n=1}^{\infty}
+    \frac{4}{n^{2}\pi^{2}}
+    (1-\cos n\pi)\cos2\pi nt 
+\]}[t=0.1][2]\info{sum}.
+
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+\begin{wraptable}{o}{0.35\columnwidth}%
+\centering{}\vspace{-5ex}
+\caption{Partial sums}\label{tab:calcPartialSums}
+\abovetopsep=2ex %
+\begin{tabular}{cc}
+\toprule 
+$N$ & $\Sigma$\tabularnewline
+\midrule
+$63$ & $0.6001$\tabularnewline
+$64$ & $0.6001$\tabularnewline
+$65$ & $0.5999$\tabularnewline
+$66$ & $0.5999$\tabularnewline
+$67$ & $0.5999$\tabularnewline
+\bottomrule
+\end{tabular}\end{wraptable}%
+Table~\ref{tab:calcPartialSums} lists the results of evaluating
+the partial\emph{ }sums from $n=1$ to $n=N$ for values of $N$ around
+$65$. Since the specified rounding value is $2$ for the calculation,
+the stopping criterion\emph{ }applies at a rounding value of $2+2=4$.
+Since $N=64$ is even, the $64$th term is zero and the sum takes
+the same value as for $N=63$. The $65$th term is the query term
+and the sum differs, so the summation continues. The $66$th term
+vanishes, so the stopping criterion is met. This time for the query
+term, the $67$th, the sum retains the same $4$-figure value, and
+the summation \end{shaded}%
+\end{minipage}
+
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+stops. The result was attained at the $65$th term. Should we be confident
+in the result? Increase the number of query terms to $3$ (there is
+no point in increasing \texttt{S?} to $2$ because of the vanishing
+of the even terms); the sum stops after $113$ terms, with the same
+$0.6$ result.\end{shaded}%
+\end{minipage}\medskip{}
+For a final example, consider the error function 
+\[
+\erf z=\dfrac{2}{\sqrt{\pi}}\int_{0}^{z}e^{-t^{2}}dt
+\]
+which can also be rendered as an infinite sum (\emph{HMF }7.1.5):
+\[
+\erf z=\sum_{n=0}^{\infty}(-1)^{n}\frac{z^{2n+1}}{n!\,(2n+1)}.
+\]
+(\verb`\erf` expanding to \verb`erf` has been defined in the preamble
+to this document using \verb`\DeclareMathOperator`.) We calculate
+this sum when $z=2$ to $10$ places of decimals. Although this is
+an alternating series, it is obvious that the summand never vanishes
+when $z\ne0$ as here. Hence there seems no need to change the default
+value \texttt{S?=0}.
+\begin{verbatim}
+    \eval[p]{\[ 
+      \frac2{\sqrt{\pi}}
+        \sum_{n=0}^\infty(-1)^n
+          \frac{z^{2n+1}}{n!\,(2n+1)}   
+    \]}[z=2][10*]\nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[ 
+  \frac2{\sqrt{\pi}}
+    \sum_{n=0}^\infty(-1)^n
+      \frac{z^{2n+1}}{n!\,(2n+1)}   
+\]}[z=2][10*]\nmcInfo{sum}. According to \emph{HMF }Table 7.1, this calculated value of $\erf2$
+is correct to all $10$ places. But beyond $z=2$ errors will begin
+to interfere with the result. Note that $26$ terms means $n=26$
+was the last value of $n$ for which the summand was evaluated. (The
+sum stops at the $26$th term, $n=25$, but the next term $n=26$
+needs to be calculated for the stopping criterion.) Fortuitously,
+$2^{2\times26+1}=2^{53}$ is the greatest power of $2$ that can be
+\emph{exactly} rendered to the $16$ significant figures that \texttt{l3fp}
+uses. But $n!$ exceeds the $16$-significant figure limit of \texttt{l3fp}
+when $n>21$, so despite the 10-figure result, errors have already
+begun to occur in the denominator of the summand and accrue in the
+sum when $z=2$. For larger $z$ values the errors can only get worse
+and at some point will render the calculated value worthless at any
+meaningful rounding value. For example, when $z=7$ the sum apparently
+`evaluates' to over $929$ whereas we know that 
+\[
+\erf z<\dfrac{2}{\sqrt{\pi}}\int_{0}^{\infty}e^{-t^{2}}dt=1.
+\]
+
+
+\subsubsection{Double sums or products}
+
+\label{subsec:settinsDouble-sums-prods}Sums or products can be iterated.
+For instance, the exponential function can be calculated this way:
+\begin{verbatim}
+    \eval[p]
+      {\[ \sum_{k=0}^{\infty}
+        \prod_{m=1}^{k}\frac{x}{m} \]}[x=2]
+\end{verbatim}
+$\Longrightarrow$     \eval[p]
+     {\[ \sum_{k=0}^{\infty}
+       \prod_{m=1}^{k}\frac{x}{m} \]}[x=2]
+
+\noindent which is \verb`\eval{$ e^2 $}` $\Longrightarrow\eval{\ensuremath{e^{2}}}$.
+
+A second example is afforded by Euler's transformation of series (\emph{HMF~}3.6.27).
+To calculate $e^{-1}$ we use 
+\begin{verbatim}
+    \eval[p]
+      {\[ \sum_{n=0}^{\infty}
+              \frac{(-1)^{n}}{n!} \]}[3]\info{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3]\info{sum}.
+Following Euler, this series can be transformed to the form
+\begin{verbatim}
+    \eval[p,S?=1]{\[
+      \sum_{k=0}^\infty \frac{(-1)^k}{2^{k+1}}
+      \sum_{n=0}^k(-1)^n\binom kn \frac1{(k-n)!} 
+    \]}[3]\nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p,S?=1]{\[ \sum_{k=0}^\infty \frac{(-1)^k}{2^{k+1}}\sum_{n=0}^k(-1)^n\binom kn \frac1{(k-n)!} \]}[3]\nmcInfo{sum}.
+Note the setting \verb`S?=1`. Without it, the summation stops after
+$1$ term, the $k=0$ term, because the $k=1$ term vanishes. With
+\verb`S?=1` it takes $16$ terms of the \emph{outer }sum to reach
+the stopping criterion. Since that sum starts at $0$, that means
+that changing the upper limit from $\infty$ to $15$ should give
+the same result – which it does, taking $\tfrac{1}{2}\times16\times17=136$
+terms in total to get there, to be compared with the $9$ terms of
+the earlier simpler sum, and the terms are more complicated. Obviously
+such double sums are computationally intensive.
+
+\section{Formatting commands}
+
+\label{sec:calcFormatting-commands}There are many formatting commands
 which change the layout of a formula on the page but do not alter
 its calculational content. \texttt{numerica} copes with a great many
-of these formatting commands, although there will surely be some that
-it has overlooked and which will trigger an `Unknown token' message;
-see §\ref{sec:evalErrors}. \footnote{Please contact the author in that case: ajparsloe at gmail.com}
+of these, although there will surely be some that have been overlooked\footnote{Please contact the author in that case: ajparsloe at gmail.com}
+and which will trigger an `Unknown token' message; see §\ref{chap:errorsErrors}.
 
-\subsubsection{Spaces, phantoms, struts}
+\subsection{Spaces, phantoms, struts}
 
 These include cryptic forms like \verb`\,` \verb`\:` and \verb`\>`,
 \verb`\;` and the corresponding `verbose' forms, \verb`\thinspace`,
 \verb`\medspace` and \verb`\thickspace` and their negative equivalents
-\verb`\!` or \verb`\negthinspace`, \verb`\negmedspace` and \verb`\negthickspace`: 
+\verb`\!` or \verb`\negthinspace`, \verb`\negmedspace` and \verb`\negthickspace`:
 \begin{centred}
 \verb`\eval{$ 1\negthickspace+\negthickspace 1 $}` $\Longrightarrow$
 \eval{$ 1\negthickspace+\negthickspace 1 $}
 \end{centred}
-which gives the text spacing of 1+1 as against the usual math spacing
-$1+1$ but doesn't affect the result of the calculation.
+which is a tiny bit tighter than the text spacing, 1+1, and much tighter
+than the usual math spacing $1+1$ – but it doesn't affect the result
+of the calculation. 
 
 Other spacing commands are \verb`\quad` and \verb`\qquad`, and \verb`\hspace{arg}`
 and \verb`\mspace{arg}`. For \verb`\hspace` there is also a starred
 form, \verb`\hspace*{arg}`. Phantoms similarly take an argument:
-\verb`\phantom{arg}`, \verb`\hphantom{arg}` and \verb`\vphantom{arg}`. 
+\verb`\phantom{arg}`, \verb`\hphantom{arg}` and \verb`\vphantom{arg}`.
 \begin{centred}
 \verb`\eval{$ 1\hphantom{mmm}+\hphantom{mmm}1 $}` $\Longrightarrow$
-\eval{$ 1\hphantom{mmm}+\hphantom{mmm}1 $}.
+\eval{$ 1\hphantom{mmm}+ \hphantom{mmm}1 $}.
 \end{centred}
 Like \verb`\vphantom`, struts allow vertical spacing adjustments.
 \texttt{numerica} should digest both \verb`\xmathstrut[optarg]{arg}`
-from \texttt{mathtools} and its `baby cousin' \verb`\mathstrut` from
-\TeX . An example from \emph{The \TeX{} book} demonstrating the use
-of \verb`\mathstrut` is 
+from \texttt{mathtools} and its `baby cousin' \verb`\mathstrut`
+from \TeX . An example from \emph{The \TeX{} book} demonstrating the
+use of \verb`\mathstrut` is
 \begin{verbatim}
      \eval{$\sqrt{\mathstrut a}+\sqrt{\mathstrut d}+
            \sqrt{\mathstrut y}$}[a=4,d=9,y=16] 
 \end{verbatim}
-$\Longrightarrow$      \eval{$\sqrt{\mathstrut a}+\sqrt{\mathstrut d}+
-           \sqrt{\mathstrut y}$}[a=4,d=9,y=16],
+$\Longrightarrow$     \eval{$\sqrt{\mathstrut a}+\sqrt{\mathstrut d}+
+           \sqrt{\mathstrut y}$}[a=4,d=9,y=16] . \medskip{}
 
-And here is an evaluation of an expression from the \texttt{mathtools}
-documentation using \verb`\xmathstrut`: 
+And here is an evaluation of a somewhat ridiculous expression modified
+from the \texttt{mathtools} documentation that uses \verb`\xmathstrut`:
 \begin{verbatim}
-    \eval{\[ \frac{ \frac{ \xmathstrut{0.1} x-1 }
-           { \xmathstrut{0.25} x-\sin{ x} } }
-             {\xmathstrut{0.4} \sqrt{ 10-x } } \]}
+    \eval{\[ \frac{ \frac{\xmathstrut{0.1} 2\ceil x-1}
+           { \xmathstrut{0.25} \ceil x-\sin x } }
+             {\xmathstrut{0.4} \sqrt{10-\ceil x} } \]}
                [x=\pi/6]
 \end{verbatim}
-$\Longrightarrow$    \eval{\[ \frac{ \frac{ \xmathstrut{0.1} x-1 }
-           { \xmathstrut{0.25} x-\sin{ x} } }
-             {\xmathstrut{0.4} \sqrt{ 10-x } } \]}
+$\Longrightarrow$     \eval{\[ \frac{ \frac{\xmathstrut{0.1} 2\ceil x-1}
+           { \xmathstrut{0.25} \ceil x-\sin x } }
+             {\xmathstrut{0.4} \sqrt{10-\ceil x} } \]}
                [x=\pi/6]
 
-\subsubsection{\texttt{\textbackslash splitfrac}}
+\subsubsection{\texttt{\textbackslash mkern}, \texttt{\textbackslash mskip}}
 
+From version 3.0.0, both \verb`\mkern` and \verb`\mskip` are recognized
+by \texttt{numerica}. \verb`\mkern` should be followed either by
+an explicit space specification in \verb`mu` (math units), like \verb`3 mu`
+(or \verb`3mu`), or a control sequence containing such a specification;
+\verb`\mkern` should be followed by an explicit `glue' specification
+or a control sequence containing such a specification. A glue spec.
+is a distance in \verb`mu` possibly followed by some stretch and
+shrink, e.g.\ \verb`3 mu plus 1 mu minus 2 mu` (or \verb`3muplus1muminus2mu`)
+with or without the \verb`plus` and \verb`minus` parts. A silly
+example of the use of \verb`\mkern` and \verb`\mskip` is the following:
+\begin{verbatim}
+    \def\negvmu{-5mu}
+    \eval[env=$]{ 1 \mkern \negvmu +
+                    \mskip 18mu plus 6mu minus 9mu 1 }
+\end{verbatim}
+$\Longrightarrow$ \def\negvmu{-5mu}
+    \eval[env=$]{ 1 \mkern \negvmu +
+                    \mskip 18mu plus 6mu minus 9mu 1 }.
+
+\subsection{\texttt{\textbackslash splitfrac}, \texttt{\textbackslash splitdfrac}}
+
 The \texttt{mathtools} package provides \verb`\splitfrac` and \verb`\splitdfrac`
-to aid handling of clumsy fractions. The documentation gives an (artificial)
-example of use. I've mangled it to produce an even more ridiculous
-illustration, adding to the mess an enormous square root, the modifiers
-\verb`\left` and \verb`\right`, and the command-form alternatives
-to parentheses, \verb`\lparen` and \verb`\rparen`; also the use
-of \verb`\dfrac`. A little mental arithmetic will convince that we
-are evaluating the square root of $(9\times7)^{2}$ which indeed is
-what we get:\footnote{For the \texttt{{[}p=.,vvd={]}} see §\ref{subsec:settingsPunctuation}
-and §\ref{subsec:settingsVvDisplayChangeLocal}. The first puts the
-concluding full stop in the right place; the second suppresses the
-vv-list.} \medskip{}
-
+to aid handling of clumsy fractions. I've mangled the example in the
+\texttt{mathtools} documentation illustrating this command to produce
+an even more ridiculous illustration, adding to the mess an enormous
+square root, \verb`\left` and \verb`\right` modifiers, and command-form
+ parentheses; also the use of \verb`\dfrac`. In the other direction,
+the \verb`vv=` in the settings option suppresses the vv-list (see
+§\ref{subsec:settingsVvDisplayChangeLocal}). A little mental arithmetic
+will convince that we are evaluating the square root of $(9\times7)^{2}$
+which indeed is what we get:
 \begin{verbatim}
-	\eval[p=.,vvd=]{\[
-    \sqrt{\left\lparen
-      \frac{ \splitfrac{xy + xy + xy + xy + xy}
-              {+ xy + xy + xy + xy}
-           }
-           { \dfrac z7}
-          \right\rparen \left\lparen
-            \frac{ \splitdfrac{xy + xy + xy + xy + xy}
-                     {+ xy + xy + xy + xy}
+    \eval[p=.,vv=]
+      {\[ \sqrt{ \left\lparen
+          \frac{ \splitfrac{xy + xy + xy + xy + xy}
+                {+ xy + xy + xy + xy}
+               }
+               { \dfrac z7}
+                 \right\rparen \left\lparen
+          \frac{ \splitdfrac{xy + xy + xy + xy + xy}
+                 {+ xy + xy + xy + xy}
                  }
                  {\dfrac z7}\right\rparen}
-      \]}[x=2,y=5,z=10]
+       \]}[x=2,y=5,z=10]
 \end{verbatim}
-$\Longrightarrow$ 	\eval[p=.,vvd=]{\[
+$\Longrightarrow$ \eval[p=.,vv=]{\[
     \sqrt{\left\lparen
       \frac{ \splitfrac{xy + xy + xy + xy + xy}
               {+ xy + xy + xy + xy}
@@ -2138,180 +3498,262 @@
                  {\dfrac z7}\right\rparen}
       \]}[x=2,y=5,z=10]
 
-\subsubsection{Colour}
+\subsection{Colour}
 
-\label{subsec:Colour}(Anglicised spelling at least for the heading!)
-If you add to the preamble of your document the line 
-\begin{lyxcode}
-\textbackslash usepackage\{color\}
-\end{lyxcode}
+\label{subsec:calcColour}(Anglicised spelling at least for the heading!)
+If you add to the preamble of your document the line
+\begin{verbatim}
+    \usepackage{color}
+\end{verbatim}
 two commands become available, \verb`\textcolor[optarg]{arg1}{arg2}`
 and the declaration form of command, \verb`\color[optarg]{arg}`.
-\texttt{numerica} readily accepts the former in a formula to be evaluated: 
+\texttt{numerica} readily accepts the former in a formula to be evaluated:
 \begin{centred}
 \verb`\eval{$ \sin \tfrac\pi6n\textcolor{red}{T}+1 $}[T=9,n=3]` $\Longrightarrow$
-\eval{$ \sin \tfrac\pi6n\textcolor{red}{T}+1 $}[T=9,n=3]
+\eval{$ \sin \tfrac\pi6n\textcolor{red}{T}+1  $}[T=9,n=3]
 \end{centred}
-(assuming you had some wish to highlight the time $T$).
-
-However there are restrictions on the use of \verb`\color` in \verb`\eval`
-commands. \verb`\color` is a \emph{declaration} form of command.
-It has effect until the end of the current group or environment. If
-you want to restrict it to only part of that group you need to em-brace
-the command and what it is to apply to, 
-\begin{lyxcode}
-<pre-stuff>\{\textbackslash color\{red\}<red-stuff>\}<post-stuff\}
-\end{lyxcode}
-but that is where the problem arises. \texttt{numerica} does not check
-for `unannounced' brace groups. It expects a brace group to be introduced
-by a preceding instruction like \verb`\sqrt` or \verb`\frac` or
-\verb`^`. When announced in this way, \texttt{numerica} can handle
-the brace group appropriately. But the brace group \verb`{\color{red}<red-stuff>}`
-is not so announced. \texttt{numerica}'s parsing routine will not
-recognize what it has just swallowed and a \LaTeX{} error will result.
-So, \verb`\color` cannot be used in a formula in a `naked' or unannounced
-brace group. Writing \verb`\eval{$ \color{red} \sin \tfrac\pi6nT+1 $}[T=9,n=3]`
-is fine, as is 
+(assuming you had some wish to highlight the time $T$). You can even
+colour the $T$ in the vv-list too, but it adds a lot of typing for
+a small gain:
 \begin{centred}
-\verb`\eval{$  \sin \tfrac\pi6nT+1 \color{red} $}[T=9,n=3]` $\Longrightarrow$
-\eval{$  \sin \tfrac\pi6nT+1 \color{red} $}[T=9,n=3].
+\verb`\eval{$ \sin \tfrac\pi6n\textcolor{red}{T}+1 $}[\textcolor{red}{T}=9,n=3]`
+$\Longrightarrow$ \eval{$ \sin \tfrac\pi6n\textcolor{red}{T}+1 $}[\textcolor{red}{T}=9,n=3].
 \end{centred}
-So too, because the \verb`\frac` introduces the confining brace group,
-is 
+However \verb`\color` is a \emph{declaration} form of command. It
+has effect until the end of the current group or environment. If you
+want to restrict it to only part of that group you need to em-brace
+the command and what it is to apply to,
+\begin{verbatim}
+    <pre-stuff>{\color{red}<red-stuff>}<post-stuff}
+\end{verbatim}
+but that is where the problem arises. `Unannounced' brace groups
+(see §\ref{subsec:evalBraced-groups}) can easily result in unexpected
+results or \LaTeX{} errors. Writing
 \begin{centred}
-\verb`\eval{$ \frac{\color[gray]{0.5}A}b $}[A=12,b=4]` $\Longrightarrow$\eval{$ \frac{\color[gray]{0.5}A}b $}[A=12,b=4]
+\verb`\eval{$ \color{red} \sin \tfrac\pi6nT+1 $}[T=9,n=3]`$\Longrightarrow$
+\eval{$ \color{red} \sin \tfrac\pi6nT+1 $}[T=9,n=3]
 \end{centred}
-where both arguments of the \verb`\color` command are used for grayscale
-output.
+is fine. So too, because the \verb`\color` command is `trapped'
+within the braces defining the first argument of the \verb`\frac`,
+is
+\begin{centred}
+\verb`\eval{$ \frac{\color[gray]{0.5}A}B $}[A=12,b=4]` $\Longrightarrow$\eval{$ \frac{\color[gray]{0.5}A}B $}[A=12,B=4].
+\end{centred}
+(Both arguments of the \verb`\color` command have been used for grayscale
+output.) Also fine is
+\begin{centred}
+\verb`\eval{$ 3{\color{red}x}+1 $}[x=2]` $\Longrightarrow$ \eval{$ 3{\color{red}x}+1 $}[x=2]
+\end{centred}
+because juxtaposition in this case means multiplication, but substituting
+the actual value \verb`2` for \verb`x` produces
+\begin{centred}
+\verb`\eval{$ 3{\color{red}2}+1 $}` $\Longrightarrow$ \eval{$ 3{\color{red}2}+1 $}.
+\end{centred}
+Recall the discussion at §\ref{subsec:evalBraced-groups}. An \emph{unannounced}
+brace group is simply appended to what has gone before. The resulting
+juxtaposition of $3$ and $x$ means multiply which was what was intended,
+but the juxtaposition of $3$ and $2$ has quite a different meaning.
 
-But trying something like \verb`\eval{$ 3{\color[gray]{0.5}x}+1 $}[x=2]`
-will cause a \LaTeX{} error and halt compilation since there is no
-command announcing the brace group confining the \verb`\color` command.
+\subsection{\texttt{\textbackslash text}, \texttt{\textbackslash mbox} and
+font commands}
 
-\subsubsection{\texttt{\textbackslash text}, \texttt{\textbackslash mbox}, font
-commands}
-
-\label{subsec:Text-mbox-fonts}Following a rethink of the behaviour
-of a number of font and formatting commands, in version 2 of \texttt{numerica}
-the content of a \verb`\text` or \verb`\mbox` command is \emph{invisible}
-to the \verb`\eval` command. \emph{This behaviour is different from
-that of version 1.} Now the content is ignored in a calculation, 
+\label{subsec:calcText-mbox-fonts}The content of a \verb`\text`
+or \verb`\mbox` command is \emph{invisible} to the \verb`\eval`
+command and is ignored in calculations,
 \begin{centred}
-\verb`\eval*{ 1/0.0123456789 \mbox{approx.} }[5]` $\Longrightarrow$
-\eval*{ 1/0.0123456789 \mbox{approx.} }[5],
+\verb`\eval*{ 1/0.0123456789 \mbox{approx.\ 81} }[5]` $\Longrightarrow$
+\eval*{ 1/0.0123456789 \mbox{approx.}}[5],
 \end{centred}
 even when the \verb`\text` or \verb`\mbox` contains mathematical
-content.
+content. The author's view is that these commands are likely to be
+used for comments, annotations, or remarks, rather than to modify
+symbols of calculational significance.
 
-Conversely, the content of font commands (like \verb`\mathbf` or
-\verb`\mathcal`) is \emph{visible} to \verb`\eval`. This becomes
-useful should numbers be input in scientific notation (see §\ref{subsec:settingsInputtingSciNotation}).
-As well as the math font commands, \verb`\eval` also accepts \verb`\textrm`,
-\verb`\textsf` and \verb`\texttt`. Thus a number in scientific notation
-like \verb`2e-1` appearing in the formula or the vv-list can display
-correctly by wrapping it in a \verb`\textrm` or \verb`\texttt` command,
-rather than displaying inappropriately as the algebraic expression
-$2e-1$.
+Conversely, \emph{specific }font commands, like \verb`\mathbf` or
+\verb`\textrm`, may well apply to such symbols and so there content
+should be \emph{visible} to \verb`\eval`. This becomes useful should
+numbers be input in scientific notation (see §\ref{subsec:settingsInputtingSciNotation})
+where \verb`\textrm` or \verb`\texttt` may be useful so that a number
+in scientific notation like \verb`2e-1` appearing in a formula or
+the vv-list can display correctly rather than inappropriately as the
+algebraic expression $2e-1$. 
 
-\subsubsection{\texttt{\textbackslash ensuremath},\texttt{ \$},\texttt{ \textbackslash (},\texttt{
-\textbackslash )},\texttt{ \textbackslash{[}},\texttt{ \textbackslash{]}}}
+The complete list of font commands where the content is visible to
+\verb`\eval` is
+\begin{enumerate}
+\item \verb`\mathrm{}`, \verb`\mathit{}`, \verb`\mathtt{}`, \verb`\mathbf{}`,
+\verb`\mathsf{}`, \verb`\mathcal{}`, \verb`\mathbb{}`, \verb`\mathfrak{}`,
+\verb`\mathscr{}`
+\item \verb`\textrm{}`, \verb`\textsf{}`, \verb`\texttt{}`, \verb`\textit{}`,
+\verb`\textsl{}`, \verb`\textbf{}`, \verb`\textsc{}`
+\end{enumerate}
+The commands \verb`\mathbb{}` and \verb`\mathfrak{}` require the
+\texttt{amsfonts} package to be loaded; \verb`\mathscr` requires
+the \texttt{euscript} package to be loaded with the \verb`mathscr`
+package option. 
 
-Should \verb`\ensuremath` be included in a formula for evaluation
-(but why?) it is digested without demur, irrespective of whether explicit
-math delimiters are present or not. More generally, should math delimiters
-(through some momentary oversight) be used both within and outside
-an \verb`\eval` command, the command is processed as if only the
-outside environment is involved; the inner delimiters are ignored: 
+\section{Environment precedence}
+
+\label{sec:calcEnvironment-precedence}Math environments are relevant
+particularly for multi-formula calculations. For a single formula
+evaluation, either an inline (\verb`$`) or \verb`equation*` (\verb`\[`)
+environment is probably all that is needed. 
+
+The environment of a calculation is determined in one or two of three
+ways: first, \verb`\eval` may sit within an environment, 
+\begin{verbatim}
+    \begin{env}
+    \eval{...}
+    \end{env}
+\end{verbatim}
+Second, the \verb`env` setting may be used, \verb`\eval[env=...]{...}`.
+And third, \verb`\eval` may wrap around an environment, e.g. \verb`\eval{\[...\]}`.
+Should a user, inadvertently or otherwise, specify `extra' environments
+in a calculation, the environment wrapping around \verb`\eval` takes
+precedence over the \verb`env`-setting environment which takes precedence
+over the environment wrapped within \verb`\eval`:
 \begin{centred}
-\verb`$ \eval{\[ -4^2 \]} $` $\Longrightarrow$$ \eval{\[ -4^2 \]} $
+\verb`$\eval[env=align,pp,ff]{\[ \pi,e,\phi,\gamma \]}[3]$` $\Longrightarrow$
+$\eval[env=align,pp,ff]{\[ \pi,e,\phi,\gamma \]}[3]$.
 \end{centred}
+As you can see, the inline \verb`$` delimiters have prevails over
+the \verb`align` environment and \verb`\[` \verb`\]` delimiters. 
 
-\section{Error messages }
+Of course for the \verb`-ed` environments of \texttt{amsmath} a surrounding
+math environment is necessary – as it is for \verb`cases`, \verb`dcases`
+and \verb`array` environments. If \verb`\eval` wraps around an \verb`-ed`
+or like environment, the surrounding environment may either be \verb`env`-specified
+or wrap around \verb`\eval` (and if both are used, inadvertently
+or otherwise, the latter takes precedence). 
 
-\label{sec:evalErrors}There are two kinds of error in \texttt{numerica}:
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+Having these three different ways of specifying the environment may
+seem like overkill, but they are likely to arise in different contexts.
+The author envisaged a user writing an expression within an environment
+and then wondering what it evaluates to. Surely it is natural in this
+case just to wrap \verb`\eval` around the lot, environment and expression,
+and let \emph{it}, \verb`\eval`, do the \emph{formula=result} typesetting.
+Or, one may enter an expression into \verb`\eval` \emph{before} deciding
+on the environment. How much easier just to write \verb`env=align*`
+(or whatever the environment chosen is) in the settings option than
+to insert \verb`\begin{align*}` before the expression and \verb`\end{align*}`
+after. Finally, \verb`\eval` can find itself within a surrounding
+environment in many ways. It may be necessary in order to use an AMS
+\verb`-ed` environment, or it may occur in a context like that in
+§\ref{subsec:introExploring}. The upshot is that all three ways of
+specifying environments should be – and are – catered for as of version
+3.0.0.\end{shaded}%
+\end{minipage}
+
+\chapter{Error messages }
+
+\label{chap:errorsErrors}There are two kinds of error in \texttt{numerica}:
 those in the underlying \LaTeX{} which are reported in the \LaTeX{}
-log, shown on the terminal, and generally halt compilation, and specifically
-\texttt{numerica}-related errors which do not halt compilation and
-produce messages displayed in the pdf where one would expect the result
-of the calculation to be. The original reason for doing things this
-way was to enable \texttt{numerica} to be used effectively with the
-instant preview facility of the document processor \LyX . More philosophically,
-one might view such errors as similar to errors of grammar or spelling
-mistakes in text. It is not clear that they should halt compilation.
+log and shown on the terminal, and generally halt compilation, and
+specifically \texttt{numerica}-related errors which do not halt compilation
+and produce messages displayed in the pdf where one would expect the
+result of the calculation to be. The original reason for doing things
+this way was to enable \texttt{numerica} to be used effectively with
+the instant preview facility of the document processor \LyX . More
+philosophically, one might view such errors as similar to errors of
+grammar or spelling mistakes in text. It is not clear that they should
+halt compilation. 
+
 Hence strictly \texttt{numerica}-related errors leave brief messages
-in the pdf at the offending places.
+in the pdf at the offending places. From version 3.0.0 of \texttt{numerica}
+they also leave messages in the \LaTeX{} log like
+\begin{centred}
+\verb`numerica error on line <n> in <location>`
+\end{centred}
+where \verb`<location>` will usually be \verb`formula` or \verb`variable=value list`
+or possibly some more specific location like \verb`sum` or \verb`product`.
+\verb`<n>` is the line number in the \verb`.tex` file where the
+error occurs. These messages in the log do not halt compilation. They
+allow the user to pinpoint – especially helpful in a long document
+– the actual line in the \verb`.tex` file where the \texttt{numerica}
+error occurs.
 
 Before discussing specific error messages, note that there is a debug
-facility (of a sort) discussed below in §\ref{subsec:settingsDebug}.
+facility (of a sort) discussed below in §\ref{sec:settingsDebug}. 
 
-Error messages are in two parts: a \emph{what} part and a \emph{where}
-part.
+\section{Specific messages}
 
+\texttt{numerica} error messages that appear in the \texttt{pdf} in
+place of the expected result are in two parts: a \emph{what} part
+and a \emph{where} part.
+
 \subsection{Mismatched brackets}
 
 \label{subsec:errorsMismatched-brackets}An unmatched left parenthesis
 or other left bracket (in this case a missing right parenthesis) usually
-results in a \texttt{numerica} error: 
+results in a \texttt{numerica} error:
 \begin{centred}
 \verb`$\eval{\sin(\pi/(1+x)}[x=1]$` $\Longrightarrow$ $\eval{\sin(\pi/(1+x)}[x=1]$
 \end{centred}
-For the same error in the vv-list, the what-part remains unchanged
-but the where-part is altered:
+For the same error in the vv-list, the \emph{what}-part remains unchanged
+but the \emph{where}-part is altered:
 \begin{centred}
-\verb`$\eval{ 1+y }[x=1,y=\sin(\pi/(1+x)]$` $\Longrightarrow$ $\eval{ 1+y }[x=1,y=\sin(\pi/(1+x)]$
+\verb`$\eval{ 1+y }[x=1,y=\sin(\pi/(1+x)]$` $\Longrightarrow$ $\eval{ 1+y }[y=\sin(\pi/(1+x),x=1]$
 \end{centred}
-The \emph{what} message is the same; the \emph{where} is different.
-
 An unmatched right parenthesis or other right bracket (in this case
 a missing \emph{left} parenthesis) usually results in a similar \texttt{numerica}
-error: 
+error:
 \begin{centred}
 \verb`$\eval{2((x+y)/(y+z)))^2}[x=1,y=2,z=3]$` $\Longrightarrow$
-$\eval{2((x+y)/(y+z)))^2}[x=1,y=2,z=3]$
+$\eval{2((x+y)/(y+z)))^{2}}[x=1,y=2,z=3]$
 \end{centred}
 But note that an unmatched modifier like \verb`\left` or \verb`\right`
 is a \LaTeX{} error and is caught by \LaTeX{} before \texttt{numerica}
-can respond and so results in a terminal and logfile message.
+can respond and so results in a terminal and logfile message. 
 
 \subsection{Unknown tokens}
 
-An `Unknown token' message can arise in a number of ways. If an expression
-involves a number of variables, some of which depend on others, their
-order in the vv-list matters: 
-\begin{centred}
-\verb`$\eval{\tfrac12 vt}[t=2,v=gt,g=9.8]$` $\Longrightarrow$ $\eval{\tfrac12 vt}[t=2,v=gt,g=9.8]$
-\end{centred}
-The vv-list is evaluated from the \emph{right} so that in this example
-the variable \texttt{v} depends on a quantity \texttt{t} that is not
-yet defined. Hence the message. The remedy is to move \texttt{t} to
-the right of \texttt{v} in the vv-list.
+An `Unknown token' message can arise in a number of ways. If an
+expression involves a number of variables, some of which depend on
+others, their order in the vv-list matters: 
+\begin{center}
+\verb`$\eval{\tfrac12 vt}[t=2,v=gt,g=9.8]$` $\Longrightarrow$ \eval{\tfrac{1}{2}vt}[t=2,v=gt,g=9.8] 
+\par\end{center}
 
+\noindent The vv-list is evaluated from the \emph{right} so that in
+this example the variable \verb`v` depends on a quantity \verb`t`
+that is not yet defined. Hence the message. The remedy is to move
+\verb`t` to the right of \verb`v` in the vv-list.
+
 Similarly, if we use a variable in the formula that has not been assigned
 a value in the vv-list, we again get the `Unknown token' message,
-but this time the location is the formula: 
+but this time the location is the formula:
 \begin{centred}
-\verb`$\eval{\pi r^2h}[r=3]$` $\Longrightarrow$ $\eval{\pi r^2h}[r=3]$
+\verb`$\eval{\pi r^2h}[r=3]$` $\Longrightarrow$ \eval{\pi r^{2}h}[r=3]
 \end{centred}
-The remedy obviously is to assign a value to \texttt{h} in the vv-list\texttt{.}
+The remedy obviously is to assign a value to \verb`h` in the vv-list\texttt{.}
 
 The same message will result if a mathematical operation or function
-is used that has not been implemented in \texttt{numerica}: 
+is used that has not been implemented in \texttt{numerica}:
 \begin{centred}
-\verb`$\eval{u \bmod v }[v=7,u=3]$` $\Longrightarrow$ $\eval{u \bmod v }[v=7,u=3]$
+\verb`$\eval{u \bmod v }[v=7,u=3]$` $\Longrightarrow$ \eval{u\bmod v}[v=7,u=3] 
 \end{centred}
 A missing comma in the vv-list will generally result in an unknown
-token message: 
+token message:
 \begin{centred}
-\verb`$\eval{axy}[a=3 y=2,x=1]$` $\Longrightarrow$ $\eval{axy}[a=3 y=2,x=1]$
+\verb`$\eval{axy}[a=3 y=2,x=1]$` $\Longrightarrow$ \eval{axy}[a=3y=2,x=1] 
 \end{centred}
-Because of the missing comma, \texttt{numerica} assumes \verb`a`
-has the `value' \verb`3y=2`, an expression which it then tries to
-evaluate, but the variable \verb`y` in this expression has not been
-assigned a value, which generates the message.
-
-\emph{Extra} commas in the vv-list should cause no problems: 
+Because of the missing comma, \texttt{numerica} sees only two variables
+in the vv-list, \verb`x` and \verb`a` and assumes \verb`a` has
+the `value' \verb`3y=2`, an expression which it then tries to evaluate,
+but \verb`y` has not been assigned a value. Parenthetically, if you
+give \verb`y` a value, say \verb`y=2/3`, the expression evaluates,
+treating the combination \verb`3 y=2` as a comparison evaluating
+to true for this value of \verb`y`, meaning \verb`a=1` and
 \begin{centred}
+\verb`$\eval{axy}[a=3 y=2,y=2/3,x=1]$` $\Longrightarrow$ $\vsp\eval{axy}[a=3 y=2,y=2/3,x=1]$.
+\end{centred}
+\emph{Extra} commas in the vv-list should cause no problems:
+\begin{centred}
 \verb`$\eval{axy}[,a=3,,y=2,x=1,]$` $\Longrightarrow$ $\eval{axy}[,a=3,,y=2,x=1,]$
+.
 \end{centred}
 The presence of multi-token variables can also cause an unknown token
 message if the check for such variables is turned off; see §\ref{subsec:settingsMultitokSwitch}.
@@ -2318,75 +3760,87 @@
 
 \subsection{Overlooked value assignments}
 
-Perhaps if one is evaluating a formula with a number of variables
+Perhaps if one is evaluating a long formula with a number of variables
 and assigning different experimental values to them to see the effect,
-a variable might be overlooked: 
+a variable might be overlooked (I have done this). The example is
+too simple to be a likely candidate for this error but shows the message:
 \begin{centred}
-\verb`$\eval{axy}[a=3,y=,x=1]$` $\Longrightarrow$ $\eval{axy}[a=3,y=,x=1]$
+\verb`$\eval{axy}[a=3,y=,x=1]$` $\Longrightarrow$ \eval{axy}[a=3,y=,x=1] 
 \end{centred}
 In the example the variable \verb`y` has been overlooked. The remedy
-is obvious -- assign a value to it.
+is obvious.
 
-\subsection{Integer argument errors}
+\subsection{Negative integers in the wrong place}
 
-\label{subsec:errorsIntegerArgs}Some functions require integer arguments
--- factorials, the second argument of a binomial coefficient, and
-(in \texttt{numerica}) $n$th roots using the optional argument of
-\texttt{\textbackslash sqrt}; also summation and product variables.
-If integers are explicitly entered for these arguments there is no
-problem, but if the value of the argument is the result of a calculation,
-rounding errors require thinking about. What accumulation of rounding
-errors is \emph{too} much so that the result of the calculation \emph{cannot}
-be considered an integer? \texttt{numerica} is generous: in the default
-setup, if a calculation rounds to an integer at rounding value $14$
-the result of the calculation is considered an integer (obviously,
-the value resulting from the rounding). Since \texttt{l3fp} works
-to $16$ significant figures that gives ample room for rounding errors
-to `get lost in' and be ignored, while still ruling out such things
-as (recall the example in §\ref{subsec:evalBoolean-output}), 
+Factorials (apart from the double factorial \eval{$(-1)!!$}), binomial
+coefficients, and $n$-th roots, require positive or at least non-negative
+integers.
 \begin{centred}
-\verb`\eval{\[ \sum_{n=1}^N n \]}[N=1/0.0123456789]` $\Longrightarrow$
-\eval{\[ \sum_{n=1}^N n \]}[N=1/0.0123456789]
-\end{centred}
-where $N$ differs from $81$ not until the seventh decimal place.
+\verb`\eval{$ \sqrt[-1]{2} $}` $\Longrightarrow$ \eval{$ \sqrt[-1]{2} $}\medskip{}
 
-The default rounding value of $14$ for `int-ifying' calculations
-can be changed: see §\ref{subsec:defaultsIntifyingRounding}.
+\verb`\eval{$ (-3)! $}` $\Longrightarrow$ \eval{$ (-3)! $}\medskip{}
 
-\subsection{Comparison errors}
-
-Should a user try to make a comparison using a combination like \verb`>=`
-rather than \verb`\geq`, \texttt{numerica} admonishes like this: 
-\begin{centred}
-\verb`$\eval{ e^\pi >= \pi^e }[?]$` $\Longrightarrow$ $\eval{ e^\pi >= \pi^e }[?]$
+\verb`\eval{$ \binom{7}{-3} $}` $\Longrightarrow$ \eval{$ \binom{7}{-3} $}
 \end{centred}
-(The relation is true by the way.) The same error is generated by
-other multi-token comparisons. They are used in programming languages,
-yes, but \emph{not} in mathematics.
 
 \subsection{Invalid base for \texttt{\textbackslash log}}
 
-ISO recommends using \verb`\log` only with a subscripted base specified.
-Otherwise how is one to know whether the base is \verb`e` or $10$
-or $2$ or whatever? Nonetheless \texttt{numerica} assumes that when
-\verb`\log` is used unsubscripted, the base is 10. Suppose you want
-to make $12$ the base, but forget to put braces around the $12$: 
+ISO recommends using \verb`\log` only with a subscripted base specified,
+a recommendation honoured in the breach rather than the observance.
+\texttt{numerica} assumes that when \verb`\log` is used unsubscripted,
+the base is 10 and that \verb`\ln` is used for base \verb`e`. Suppose
+you want to make $12$ the base, but forget to put braces around the
+$12$:
 \begin{centred}
-\verb`$\eval{ \log_12 1728 }$` $\Longrightarrow$ $\eval{ \log_12 1728 }$
+\verb`$\eval{ \log_12 1728 }$` $\Longrightarrow$ $\eval{ \log_12 1728 } $
 \end{centred}
-Here, \texttt{numerica} has taken \texttt{1} as the base (and $21728$
+Here, \texttt{numerica} has taken \texttt{1} as the base (and $2$
 as the argument) of the logarithm and responds accordingly.
 
+\subsection{Environment errors}
+
+Errors can arise from environments wrongly used, although environmental
+precedence (§\ref{sec:calcEnvironment-precedence}) sidesteps a number
+of apparent problems. Some environments – \verb`aligned`, \verb`alignedat`,
+\verb`gathered`, \verb`cases`, \verb`dcases` and \verb`array`
+– can be used only within another math environment. Thus
+\begin{centred}
+\verb`\eval[env=aligned,ff]{ \sin x, \cos x, \tan x }[x=\pi/6]` $\Longrightarrow$
+\eval[env=aligned,ff]{\sin x, \cos x, \tan x}[x=\pi/6]
+\end{centred}
+The remedy, obviously, is to put the \verb`\eval` command between,
+say, \verb`\[`, \verb`\]` delimiters. In the other direction, because
+of environment precedence, forgetting the \verb`ed` at the end of
+the \verb`env`-ironment does not result in an error but displays
+the result in the outer, wrapping environment:
+\begin{verbatim}
+    \[ \eval[env=align,p=.,ff]
+          { \sin x, \cos x, \tan x}[x=\pi/6] \]
+\end{verbatim}
+$\Longrightarrow$ \[ \eval[env=align,p=.,ff]
+          { \sin x, \cos x, \tan x}[x=\pi/6] \]
+
+An unknown environment produces a message:
+\begin{verbatim}
+    \eval[env=foo]{ \pi }\par
+    \eval{\begin{foo} \pi \end{foo}}
+\end{verbatim}
+$\Longrightarrow$     \eval[env=foo]{ \pi }\par
+    \eval{\begin{foo} \pi \end{foo}}
+
 \subsection{\texttt{l3fp} errors}
 
 Some errors arising at the \texttt{l3fp} level are trapped and a message
-displayed.
+displayed. 
 
 \subsubsection{Dividing by zero}
 \begin{centred}
-\verb`$\eval{1/\sin x}[x=0]$` $\Longrightarrow$ $\eval{1/\sin x}[x=0]$
+\verb`$\eval{1/\sin x}[x=0]$` $\Longrightarrow$ \eval{1/\sin x}[x=0] 
 \end{centred}
-Note however that \verb`$\eval{1/\sin x}[x=\pi]$` $\Longrightarrow\,\eval{1/\sin x}[x=\pi]$,
+Note however that
+\begin{centred}
+\verb`$\eval{1/\sin x}[x=\pi]$` $\Longrightarrow\,\eval{1/\sin x}[x=\pi]$, 
+\end{centred}
 because of rounding errors in distant decimal places. No doubt this
 is true for other functions as well.
 
@@ -2395,41 +3849,43 @@
 \label{subsec:errorsInverse-powers}Finding inverse integer powers
 of \emph{positive} numbers should always be possible, but raising
 a \emph{negative} number to an inverse power generates an error even
-when -- mathematically -- it should not: 
+when – mathematically – it should not: 
 \begin{centred}
 \verb`\eval{$ (-125)^{1/3} $}` $\Longrightarrow$ \eval{$ (-125)^{1/3} $}
 \end{centred}
 This is a feature of floating point arithmetic. When a number is raised
 to a rational power, say $p/q$ where $p$ and $q$ are non-zero integers,
-then the result is the $p$th power of the $q$th root of the number.
-Can a $q$th root be taken? If our floating point system used (for
+then the result is the $p$th power of the $q$-th root of the number.
+Can a $q$-th root be taken? If our floating point system used (for
 ease of illustration) only $4$ significant digits, $p/q=1/3$ would
 be the fraction $3333/10^{4}$, an odd numerator over an even denominator.
 But a negative number does not possess an even ($10^{4}$th) root.
+The user needs to take care of the minus sign, in this case simply
+by omitting the parentheses.
 
 Trying to evaluate a function like a factorial or square root or inverse
 trig. function outside its domain of definition also produces this
-error: 
+error:
 \begin{centred}
 \verb`$\eval{\arccos x}[x=2]$` $\Longrightarrow$ $\eval{\arccos x}[x=2]$
 \end{centred}
 In this case the inverse cosine, which is defined only on the interval
-$[-1,1]$, has been fed the value $2$.
+$[-1,1]$, has been fed the value $2$. 
 
 Trying to evaluate an expression that resolves to $0/0$ also produces
-this message: 
+this message:
 \begin{centred}
-\verb`$\eval{\frac{1-y}{x-2}}[x=2,y=1]$` $\Longrightarrow$ $\eval{\frac{1-y}{x-2}}[x=2,y=1]$
+\verb`$\eval{\frac{1-y}{x-2}}[x=2,y=1]$` $\Longrightarrow$ \eval{\frac{1-y}{x-2}}[x=2,y=1]
 \end{centred}
 
 \subsubsection{Overflow/underflow}
 
-The factorial (discussed in §\ref{subsec:evalFactorialsBinom}) provides
-an example of overflow: 
+The factorial (discussed in §\ref{sec:calcFactorialsBinom}) provides
+an example of overflow:
 \begin{centred}
-\verb`$\eval{3249!}$`\texttt{ }$\Longrightarrow$ $\eval{3249!}$
+\verb`$\eval{3249!}$`\texttt{ }$\Longrightarrow$ \eval{3249! } 
 \end{centred}
-This is hardly surprising since 
+This is hardly surprising since
 \begin{centred}
 \verb`$\eval{3248!}[x]$` $\Longrightarrow$ $\eval{3248!}[x]$.
 \end{centred}
@@ -2437,114 +3893,196 @@
 A number in the form $a\times10^{b}$ must have $-10001\le b<10000$.
 If this is not the case an overflow or underflow condition occurs.
 As the examples show, an overflow condition generates a \texttt{numerica}
-error.
+error. 
 
 For underflow, where the number is closer to $0$ than $10^{-10001}$,
 \texttt{l3fp} assigns a zero value to the quantity. \texttt{numerica}
 accepts the zero value and the error is ignored.
 
-\chapter{Settings}
+\subsection{Obsolete settings}
 
-\label{chap:Settings}A calculation is effected against a background
-of default values for various quantities. For a particular calculation,
-these values may not be appropriate; or you may have different preferences.
-The way to change settings for a particular calculation is through
-the settings option of \verb`\nmcEvaluate` discussed next. The way
-to change a \emph{default} setting is by creating a configuration
-file \texttt{numerica.cfg} discussed in §\ref{sec:settingsDefaults}.
+(For settings, see the next chapter.) Some settings in earlier versions
+of \texttt{numerica} may be superseded by later developments and rendered
+obsolete. With version 3.0.0 there are two of these obsolete settings,
+and some deprecations. The superseded settings are these: 
+\begin{itemize}
+\item \verb`()` \quad{}previously a setting for handling complicated arguments
+to trigonometric functions. Now \LaTeX{} braces are recommended; see
+§\ref{subsec:evalBraced-groups} and §\ref{subsec:calcComplicated-arguments}. 
+\item \verb`reuse` \quad{}previously a setting determining what is saved
+with the \verb`\nmcReuse` command (§\ref{sec:supplReuse}). Now only
+the numerical result is saved – although it can be saved in a variety
+of forms, depending on the result-format specification in the \verb`\eval`
+command.
+\end{itemize}
+Use of either setting generates a similar message, changing only the
+content between the quote marks in the following:
+\begin{centred}
+\verb`\eval[()=2]{$ \sin\frac12\bigl(A+B\bigr) $}[A=\pi/5,B=\pi/7]`
+$\Longrightarrow$ \eval[()=2] {$ \sin\frac12\bigl(A+B\bigr) $}[A=\pi/5,B=\pi/7]
+\end{centred}
 
-\section{Settings option}
+\chapter{Settings}
 
-\label{sec:settingsOption}The second argument of the \verb`\nmcEvaluate`
-command is the settings option, delimited by square brackets. This
-option is a \emph{key=value} list, hence comma-separated. \emph{Key=value
-}lists tend to be wordy. For back-of-envelope calculations one wants
-to be able to `dash off' the calculation, hence the short, cryptic
-nature of the keys. Most settings are generic, applicable not only
-to \verb`\nmcEvaluate` but also to other commands that are available
-if the packages \texttt{numerica-plus} or \texttt{numerica-tables}
-are loaded; see §\ref{subsec:Related-packages}.
+\label{chap:settingsSettings}The first square-bracketed optional
+argument (and second argument overall) of the \verb`\nmcEvaluate`
+command (see Chapter~\ref{chap:evalEvaluate}) is the settings option
+preceding the main argument that contain the expression or expressions
+to be evaluated. The settings option is a comma-separated\footnote{Including when the \texttt{comma} package option is used. No \emph{decimal}
+number is required in the settings, only integers.} \emph{key=value} list. Such\emph{ }lists tend to be wordy. For back-of-envelope
+calculations one wants to be able to `dash off' the calculation;
+hence short, cryptically named keys have been used. Many settings
+are generic, applicable not only to \verb`\nmcEvaluate` but also
+to other commands that are available in \texttt{numerica} (see Chapter~\ref{chap:Supplementary-commands})
+and the packages \texttt{numerica-plus} and \texttt{numerica-tables}
+– briefly described in §\ref{subsec:introPackagesOptions}. 
 
-\subsection{\textquoteleft Debug\textquoteright{} facility}
-
-\label{subsec:settingsDebug}It is rather grandiose to call this a
-debug facility, but if a calculation goes wrong or produces a surprising
-result, \texttt{numerica} offers a means of examining various quantities
-at some intermediate stages on the way to the final result. To use
-the facility, enter 
-\begin{lyxcode}
-dbg~=~<integer>
-\end{lyxcode}
-into the settings option. (White space around the equals sign is optional.) 
+A calculation is effected against a background of assigned values
+for various quantities – the calculational environment. For a particular
+calculation, these values may not be appropriate; or you may have
+different preferences. The complete list of such settings available
+for \verb`\nmcEvaluate` (or \verb`\eval`) is shown in Tables~\ref{tab:settingsFunctionalSettingsParams}
+and \ref{tab:settingsDisplaySettingsParams}, separated into \emph{functional}
+settings (which affect the calculation) and \emph{display} settings
+(which don't).
 \begin{itemize}
-\item \texttt{dbg=0 }turns off the debug function, displays the result or
-error message (this is the default); 
-\item \texttt{dbg=1 }equivalent to \texttt{dbg=2{*}3{*}5{*}7}; 
+\item The \emph{initial} values listed are the values assigned to the settings
+initially at each use of the \verb`\eval` (and other) commands. 
+\item A \emph{default} value is the value assigned to the setting if you
+simply enter its name (without assigning a value to it) in the settings
+option. 
+\item $0/1$ alternatives are interpreted as $1$ meaning ON and $0$ meaning
+OFF.
 \end{itemize}
-\begin{table}[t]
-\centering \centering{}\caption{Settings options}
+For example, entering \verb`o` in the settings option is equivalent
+to entering \verb`o=1`, meaning angles are assumed to be in degrees,
+but unless \verb`o` is entered, \verb`\eval` uses \verb`o=0`, the
+initial value, meaning angles are assumed to be in radians.
 
-\centering{}%
-\begin{tabular}{ll>{\raggedright}p{4cm}>{\raggedright}p{4cm}}
+\begin{table}
+\centering
+\centering{}\caption{Functional settings parameters}\label{tab:settingsFunctionalSettingsParams}
+\begin{center}
+\begin{tabular}{>{\raggedright}p{1.5cm}>{\raggedright}p{1.5cm}>{\raggedright}p{3cm}>{\raggedright}p{1.5cm}>{\raggedright}p{1.5cm}}
 \toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule 
-{\small\texttt{dbg}} & {\small int} & {\small debug `magic' integer} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{view}} &  & {\small equivalent to }{\small\texttt{dbg=1}} & \tabularnewline
-{\small\texttt{\textasciicircum}} & {\small char} & {\small exponent mark for sci. notation input} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{xx}} & {\small int (0/1)} & {\small multi-token variable switch} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{()}} & {\small int (0/1/2)} & {\small trig. arg. parsing} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{o}} & {\small int (0/1)} & {\small degree switch for trig. functions} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{log}} & {\small num} & {\small base of logarithms for }{\small\verb`\log`} & {\small\texttt{10}}\tabularnewline
-{\small\texttt{vv@}} & {\small int (0/1)} & {\small vv-list calculation mode} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{vvd}} & {\small token(s)} & {\small vv-list display-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 12mu 6mu minus 9mu(vv)}}\tabularnewline
-{\small\texttt{vvi}} & {\small token(s)} & {\small vv-list text-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{*} &  & {\small suppress equation numbering if }{\small\texttt{\textbackslash\textbackslash}}{\small{}
-in }{\small\texttt{vvd}} & \tabularnewline
-{\small\texttt{p}} & token(s) & {\small punctuation (esp. in display-style)} & {\small\texttt{,}}\tabularnewline
-{\small\texttt{reuse}} & {\small int} & {\small form of result saved with }{\small\verb`\nmcReuse`} & {\small\texttt{0}}\tabularnewline
+{\small key} & {\small type} & {\small meaning} & {\small default} & {\small initial}\tabularnewline
+\midrule
+{\small\texttt{dbg}} & {\small int} & {\small debug data} &  & {\small\texttt{0}}\tabularnewline
+{\small\texttt{view}} &  & {\small\texttt{dbg=1}} & {\small\texttt{dbg=1}} & \tabularnewline
+{\small\texttt{\textasciicircum}} & {\small char} & {\small exp. mark for sci. notation input} & {\small\texttt{e}} & \tabularnewline
+{\small\texttt{xx}} & {\small int (0/1)} & {\small accept multi-token variables} &  & {\small\texttt{1}}\tabularnewline
+\multirow{2}{1.5cm}{\texttt{ff}} & \multirow{2}{1.5cm}{{\small char}} & \multirow{2}{3cm}{{\small main arg. multi- formula delimiter}} & \multicolumn{2}{l}{{\small\texttt{, }}{\small (if decimal dot)}}\tabularnewline
+ &  &  & \multicolumn{2}{l}{{\small\texttt{; }}{\small (if decimal comma)}}\tabularnewline
+{\small\texttt{1s2}} & {\small int (0/1)} & {\small allow spaced digit groups in numbers} & {\small\texttt{1}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{/min}} & {\small$\text{int}\ge1$} & {\small fraction form denom- inator search start} &  & {\small\texttt{1}}\tabularnewline
+{\small\texttt{/max}} & {\small$\text{int}\ge1$} & {\small fraction form denom- inator search end} &  & {\small\texttt{200}}\tabularnewline
+{\small\texttt{vv@}} & \multirow{3}{1.5cm}{{\small int (0/1)}} & \multirow{3}{3cm}{{\small vv-list calculation mode}} & \multirow{3}{1.5cm}{} & \multirow{3}{1.5cm}{{\small\texttt{0}}}\tabularnewline
+\multirow{2}{1.5cm}{{\small\texttt{vvmode}}} &  &  &  & \tabularnewline
+ &  &  &  & \tabularnewline
+{\small\texttt{o}} & {\small int (0/1)} & {\small trig. function args in degrees} & {\small\texttt{1}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{log}} & {\small num} & {\small base of logs for }{\small{\small\verb`\log`}} &  & {\small\texttt{10}}\tabularnewline
+{\small\texttt{S+}} & {\small int} & {\small extra rounding, sums} &  & {\small\texttt{2}}\tabularnewline
+{\small\texttt{S?}} & {\small$\text{int}\ge0$} & {\small number of query terms, sums} &  & {\small\texttt{0}}\tabularnewline
+{\small\texttt{P+}} & {\small int} & {\small extra rounding, products } &  & {\small\texttt{2}}\tabularnewline
+{\small\texttt{P?}} & {\small$\text{int}\ge0$} & {\small number of query terms, products} &  & {\small\texttt{0}}\tabularnewline
+\cmidrule{1-1}
+{\small\texttt{()}} & \multicolumn{4}{l}{{\small obsolete; see §\ref{sec:settinsDeprecatedObsoleteOptions}}}\tabularnewline
+{\small\texttt{reuse}} & \multicolumn{4}{l}{{\small obsolete; see §\ref{sec:settinsDeprecatedObsoleteOptions}}}\tabularnewline
+{\small\texttt{{*}}} & \multicolumn{4}{l}{{\small obsolete; see §\ref{sec:settinsDeprecatedObsoleteOptions}}}\tabularnewline
 \bottomrule
 \end{tabular}
+\par\end{center}
 \end{table}
 
-The `magic' integers are the following primes and their products 
+\begin{table}
+\centering
+\caption{Display settings parameters}\label{tab:settingsDisplaySettingsParams}
+\medskip{}
+
+\begin{tabular}{>{\raggedright}p{1cm}>{\raggedright}p{1.5cm}>{\raggedright}p{3.5cm}>{\centering}p{1.5cm}>{\centering}p{1.5cm}}
+\toprule 
+{\small key} & {\small type} & {\small meaning} & {\small default} & {\small initial}\tabularnewline
+\texttt{f} & {\small int (0/1)} & {\small show/hide formula} &  & \tabularnewline
+{\small\texttt{p}} & {\small token(s)} & {\small concluding punctuation } & {\small\texttt{,}} & \tabularnewline
+{\small\texttt{pp}} & {\small token(s)} & {\small multi-formula inter- result punctuation} & {\small\texttt{,}} & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{env}} & {\small token(s)} & {\small math environment} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{arg}} & {\small token(s)} & {\small arg. for }{\small\texttt{-at}}{\small , }{\small\texttt{array}}{\small{}
+envs} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{eq}} & {\small token(s)} & {\small relation symbol} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{vv}} & {\small token(s)} & {\small vv-list specification} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{sep}} & {\small token(s)} & {\small separator between multi-formula results} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{\textbackslash\}}} & {\small token(s)} & {\small right bracket for inner math environments} & {\small\textbackslash{} }{\small\texttt{\textbackslash\}}} & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{vvi}} & \multicolumn{4}{l}{{\small deprecated; use }{\small\texttt{vv }}}\tabularnewline
+{\small\texttt{vvd}} & \multicolumn{4}{l}{{\small deprecated; use }{\small\texttt{vv}}}\tabularnewline
+\bottomrule
+\end{tabular}
+
+\end{table}
+
+
+\section{\textquoteleft Debug\textquoteright{} facility}
+
+\label{sec:settingsDebug}It is rather grandiose to call this a debug
+facility, but if a calculation goes wrong or produces a surprising
+result, \texttt{numerica} offers a means of examining various quantities
+at some intermediate stages on the way to the final result. To use
+the facility, enter 
+\begin{verbatim}
+    dbg = <integer>
+\end{verbatim}
+into the settings option. (White space around the equals sign is optional.) 
 \begin{itemize}
-\item \texttt{dbg=2} displays the vv-list after multi-token variables have
-been converted to their single token form, \texttt{\textbackslash nmc\_a},
-\texttt{\textbackslash nmc\_b}, etc.; 
-\item \texttt{dbg=3} displays the formula after multi-token variables have
-been converted to their single token form; 
-\item \texttt{dbg=5} displays the stored variables and their \emph{evaluated}
-values (\texttt{dbg=2} lists the values as expressions); 
-\item \texttt{dbg=7} displays the formula after it has been fp-ified but
+\item \verb`dbg=0`\texttt{ }turns off the debug function, displays the
+result or error message (this is the initial setting);
+\item \verb`dbg=1`\texttt{ }equivalent to \verb`dbg=2*3*5*7*11` for \verb`\eval`;
+\end{itemize}
+The `magic' integers are the first few prime numbers and their products
+\begin{itemize}
+\item \verb`dbg=2` displays the formula after multi-token variables have
+been converted to their single token form, \verb`\nmc_a`, \verb`\nmc_b`,
+etc.;
+\item \verb`dbg=3` displays the vv-list after multi-token variables have
+been converted to their single token form;
+\item \verb`dbg=5` displays the stored variables and their values \emph{after}
+evaluation (\verb`dbg=3` lists the values as expressions);
+\item \verb`dbg=7` displays the formula after it has been fp-ified but
 before it has been fed to \texttt{l3fp} to evaluate; 
 \begin{itemize}
-\item should the formula successfully evaluate, the result of the evaluation
-is also displayed (but without any formatting). 
+\item When interpreting the fp-form, be aware that differences in the ways
+\texttt{numerica} and \texttt{l3fp} read formulas can lead to more
+or fewer parentheses than seem strictly necessary. In particular be
+aware that in \texttt{l3fp} function calls bind most tightly so that,
+for example, \verb`sin 2pi` evaluates not to zero but to $(\sin2)\times\pi$,
+and \verb`sin x^2` evaluates to $(\sin x)^{2}$. \texttt{numerica}
+takes care of the former by inserting extra parentheses and exploits
+the latter by not inserting parentheses.
 \end{itemize}
+\item \verb`dbg=11` displays the \LaTeX{} form of the final display; it
+will contain, \emph{inter alia}, the numerical result.
 \end{itemize}
 To display two or more of the debug elements simultaneously, use the
 product of their debug numbers for the magic integer. This can be
-entered either as the multiplied-out product, or as the `waiting to
-be evaluated' product with asterisks (stars) between the factors.
-Thus \texttt{dbg=6} or \verb`dbg=2*3` display both the vv-list and
-formula after multi-token variables have been converted to single
-token form; \texttt{dbg=10} or \verb`dbg=2*5` display both the vv-list
-after multi-token variables have been converted to single token form
-and the recorded variables with their evaluated values. And similarly
-for the other magic integers listed. For other integers, if they are
-divisible by $2$ or $3$ or $5$ or $7$, they will display the corresponding
-component. Both \texttt{dbg=210} and \verb`dbg=2*3*5*7` display all
-four elements, but rather than remembering this product, it suffices
-to put \texttt{dbg=1}. This is equivalent and displays all elements.
+entered either as the multiplied-out product, or as the `waiting
+to be evaluated' product with asterisks (stars) between the factors.
+Thus \verb`dbg=6` and \verb`dbg=2*3` each display both the vv-list
+and formula after multi-token variables have been converted to single
+token form; \verb`dbg=77` or \verb`dbg=7*11` each display both the
+form of the expression that is fed to \texttt{l3fp} (the `fp-ified'
+form) and the \LaTeX{} form of the final display (including the numerical
+result). And generally, if an integer is divisible by $2$, $3$,
+$5$, $7$, or $11$ the corresponding element of the debug display
+will be shown. Both \verb`dbg=2310` and \verb`dbg=2*3*5*7*11` display
+all five elements, but rather than remembering this product or typing
+all those digits and asterisks, it suffices to enter \verb`dbg=1`.
+This is equivalent and displays all elements.
 
 The debug option uses an \verb`aligned`\texttt{ }or \verb`align*`
-environment to display its wares, depending on the presence or absence
-of math delimiters around the \verb`\eval` command. The following
-uses \verb`align*` and shows how multi-token variables are handled,
-how a chain of comparisons is evaluated (§\ref{subsec:evalBoolean-output})
-and how formatting instructions in the number-format option are ignored
-in the debug display: 
+environment to display its wares, depending on whether \verb`\eval`
+lies within or around a math environment. The following uses \verb`align*`
+and shows how multi-token variables are handled and how a chain of
+comparisons is evaluated (§\ref{subsec:evalBoolean-output}):
 \begin{verbatim}
     \eval[dbg=1]{ a < 2a' < 3a'' }
       [a=\pi,a'=\phi,a''=e\gamma][4???]
@@ -2553,140 +4091,155 @@
       [a=\pi,a'=\phi,a''=e\gamma][4???]
 
 \noindent The various items are displayed in chronological order.
-First comes the vv-list after conversion of multi-token to single-token
-variables, then the formula in those single-token variables; these
+First comes the formula after conversion of multi-token to single-token
+variables, then the vv-list in those single-token variables; these
 are created essentially at the same time. Next the stored values of
-the variables are displayed. These are the values \emph{after }evaluation.
-The fourth element both in the display and chronologically is the
-fp-ified formula. Often this can be a thicket of parentheses, especially
-if unary functions or fractions are involved. The final element of
-both the display and chronologically is the result from evaluating
-the formula. This is shown only if $7$ is a factor of the \texttt{dbg}
-integer, and there is no error. Despite the appearance of \noindent\verb`???`
-in the number-format option, the result displays as 1. Results are
-never rounded or formatted in the debug display, although as is apparent
-here, the rounding number \noindent\verb`4` is used in the comparisons.
-
-When interpreting the fp-form, differences in the ways \texttt{numerica}
-and \texttt{l3fp} read formulas can lead to more or less parentheses
-than seem strictly necessary. In particular be aware that in \texttt{l3fp}
-function calls bind most tightly so that, for example, \verb`sin 2pi`
-evaluates not to zero but to $(\sin2)\times\pi$, and \verb`sin x^2`
-evaluates to $(\sin x)^{2}$. \texttt{numerica} takes care of the
-former by inserting extra parentheses and exploits the latter by not
-inserting parentheses: 
+the variables are displayed. These are the values \emph{after }vv-list
+evaluation. (Even if the \verb`comma` package option is being used
+and the decimal point is a comma, the stored values will display with
+a decimal dot because this is what \texttt{l3fp} uses.) The fourth
+element both in the display and chronologically is the fp-ified formula.
+Often this can be a thicket of parentheses, especially if unary functions
+or fractions are involved. The final element of both the display and
+chronologically is the \LaTeX{} form of the display. In the example
+it is skimpy, because no environment was specified. Putting, say,
+\verb`env=$` in the settings option results in a much fuller final
+line:
 \begin{verbatim}
-    \eval[dbg=1]{ \sin 2x \cos^2 y }
-         [x=\pi/12,y=\pi/4]
+    \eval[dbg=11,env=$]{ a < 2a' < 3a'' }
+      [a=\pi,a'=\phi,a''=e\gamma][4???]
 \end{verbatim}
-$\Longrightarrow$     \eval[dbg=1]{ \sin 2x \cos^2 y }
-         [x=\pi/12,y=\pi/4]
+$\Longrightarrow$     \eval[dbg=11,env=$]{ a < 2a' < 3a'' }
+      [a=\pi,a'=\phi,a''=e\gamma][4???]By using \verb`dbg=11` in the settings option I have limited the
+display to the \LaTeX{} form, since the other elements are unchanged.
 
-Finally, note that those mathematical operations that have no direct
-representation in \texttt{l3fp} contribute only their value to the
-fp-form. This applies to sums and products, double factorials, partly
-to binomial coefficients, and also to \verb`\eval` and other commands
-when nested one within another (see Chapter~\ref{chap:Nesting}).
-The following (ridiculous) example illustrates the matter: 
+Mathematical operations that have no direct counterpart in \texttt{l3fp}
+contribute only their numerical value to the fp-form. This applies
+to sums and products, double factorials, partly to binomial coefficients,
+and also to \verb`\eval` and other commands when nested one within
+another (see Chapter~\ref{sec:miscNesting}). The following (ridiculous)
+example illustrates the matter:
 \begin{verbatim}
     \eval[dbg=1]{\[ 
       \sum_{n=1}^k n + \binom{2k}{m} - \frac1{4k} + 
         \prod_{n=2}^k (1-1/n) + m!! \]}[m=6,k=5]
 \end{verbatim}
-$\Longrightarrow$    \eval[dbg=1]{\[ 
+$\Longrightarrow$     \eval[dbg=1]{\[ 
       \sum_{n=1}^k n + \binom{2k}{m} - \frac1{4k} + 
-        \prod_{n=2}^k (1-1/n) + m!! \]}[m=6,k=5]
+        \prod_{n=2}^k (1-1/n) + m!! \]}[m=6,k=5]($0$\textdegree{}~C in kelvin!) In the \verb`fp-form` line, the
+various contributions to the overall result are displayed simply as
+numbers because \texttt{l3fp} does not (at least as yet) handle these
+elements natively.
 
-\noindent ($0$°~C in kelvin!) In the \noindent\verb`fp-form` line,
-the various contributions to the overall result are displayed simply
-as numbers because \texttt{l3fp} does not (at least as yet) handle
-these elements natively.
+\subsection{Multi-formula calculations}
 
+Using \verb`dbg=1` on a multi-formula calculation displays the formula
+and fp-form of the last formula `digested' by \verb`\eval`. Other
+elements of the debug display are not limited in this way. If all
+formulas are successfully evaluated then this will be the final formula
+entered in the multi-formula calculation. But should there be an error
+when evaluating one of the component formulas, \emph{that} will be
+the last formula evaluated; the debug information will pertain to
+that formula. For example, 
+\begin{verbatim}
+    \eval[dbg=1,ff]{$ \sin x, \arccos x, \tan x $}[x=\pi/3] 
+\end{verbatim}
+$\Longrightarrow$     \eval[dbg=1,ff]{$ \sin x, \arccos x, \tan x $}[x=\pi/3]Both
+error message and debug information are present, the debug information
+pertaining to the formula, \verb`\arccos x`, where the error occurred.
+
 \subsection{Negative \texttt{dbg} values}
 
-Negative \texttt{dbg} values are possible: \texttt{dbg=-2}, \texttt{dbg=-3},
-etc. (and \texttt{dbg=-1} meaning \texttt{dbg=-210}) have exactly
-the same effects as the corresponding positive values except for some
-details of display. The display for positive \texttt{dbg} values is
-the one evident in the examples above. Lines wrap, the left margin
-is not indented and the display occupies the page width. For negative
-\texttt{dbg} values, lines do not wrap, the left margin is indented
-and the display occupies the text width. An example is presented in
-§\ref{subsec:nestDebugging} below where the display for a nested
-\verb`\eval` is significantly improved with a negative \texttt{dbg}
-value.
+Had the \verb`$` delimiters been placed around rather than within
+the \verb`\eval` command in the last example, both error message
+and debug display would have been crowded onto the one line and would
+generally exceed the dimensions of the paper. The remedy is to turn
+off the error message by using a \emph{negative} debug number of the
+same numerical value, in this case \verb`dbg=-1` (note that this
+use of \emph{negative} debug numbers differs from their use in previous
+versions of \texttt{numerica}):
+\begin{verbatim}
+    $\eval[dbg=-1,ff]{ \sin x, \arccos x, \tan x }[x=\pi/3]$
+\end{verbatim}
+$\Longrightarrow$ $\eval[dbg=-1,ff]{ \sin x, \arccos x, \tan x}[x=\pi/3]$
 
 \subsection{\texttt{view} setting}
 
-Putting \texttt{dbg=1} may seem a little obscure in order to view
-internal values of \texttt{numerica}. In that case, simply writing
-\verb`view` in the settings option will produce the same effect as
-entering \verb`dbg=1`.
+Putting \verb`dbg=1` in the settings option may seem somewhat obscure
+in order to view internal values of \texttt{numerica}. Writing \verb`view`
+instead (it does not need to be equated to anything) is equivalent
+and should be easier to remember.
 
+\section{Other functional settings}
+
 \subsection{Inputting numbers in scientific notation}
 
-\label{subsec:settingsInputtingSciNotation}\emph{Outputting} numbers
-in scientific notation is controlled by the final trailing argument
-of the \texttt{\textbackslash eval} command. Such output is turned
-off by default and needs to be explicitly ordered. Similarly, \emph{inputting}
-numbers in scientific notation is turned off by default and needs
-to be explicitly ordered. To turn it on, write 
-\begin{lyxcode}
-\textasciicircum ~=~<char>
-\end{lyxcode}
-\noindent in the settings option, where \texttt{<char>} is any single
-character, usually \texttt{e} or \texttt{d} or their upper-casings,
-but not restricted to them: \texttt{\textasciicircum =@} for instance
-is perfectly possible, and has the advantage over \texttt{e} or \texttt{d}
-that it doesn't conflict with the use of the character as a variable
-or constant. 
+\label{subsec:settingsInputtingSciNotation}Outputting numbers in
+scientific notation is controlled by the final trailing argument of
+the \verb`\eval` command. Such output is turned off by default and
+needs to be explicitly ordered. Similarly, \emph{inputting} numbers
+in scientific notation is turned off by default and needs to be explicitly
+ordered. To turn it on, write
+\begin{verbatim}
+    ^ = <char>
+\end{verbatim}
+\noindent in the settings option, where \verb`<char>` is any single
+character, usually \verb`e` or \verb`d` or their upper-casings,
+but not restricted to them: \verb`^=@` for instance is perfectly
+possible, and has the advantage over \verb`e` or \verb`d` that it
+doesn't conflict with the use of the character as a variable or constant. 
 \begin{centred}
-\noindent\noindent\verb`$ \eval[^=@]{ 1.23 at -1 } $` $\Longrightarrow$
-$ \eval[^=@]{ 1.23 at -1 } $. 
+\verb`$ \eval[^=@]{ 0.123 + 1.23 at -1 } $` $\Longrightarrow$ $ \eval[^=@]{ 0.123 + 1.23 at -1 } $.
 \end{centred}
-\noindent With letters for the exponent mark -- say \noindent\verb`d`
-or \noindent\verb`e` -- the problem is interpreting forms like \texttt{8d-3}
-or \texttt{2e-1}. Does such a form denote a number in scientific notation
-or an algebraic expression? In \texttt{numerica}, if the settings
-option shows \texttt{\textasciicircum =d}, then a form like \texttt{8d-3}
-is treated as a number in scientific notation. Similarly for \texttt{e}
-or any other letter used as the exponent marker for the input of scientific
-numbers. (But only one character can be so used at a time.) Note that
-the number \emph{must} start with a digit: \noindent\verb`e-1` for
-instance does not, and will be treated as an algebraic expression
-involving the exponential constant: 
+The example shows that numbers can still be input in ordinary decimal
+form at the same time as scientific notation is used. 
+
+The default exponent mark is \verb`e` so that entering \verb`^`
+in the settings option is equivalent to entering \verb`^=e` and will
+suffice to turn on the inputting of numbers in scientific notation
+using this mark:
 \begin{centred}
-\noindent\noindent\verb`$ \eval[^=e]{ x+e-1 }[x=1] $` $\Longrightarrow$
-$ \eval[^=e]{ x+e-1 }[x=1] $
+\verb`$ \eval[^]{ 0.123 + 1.23e-1 } $` $\Longrightarrow$ $ \eval[^]{ 0.123 + 1.23e-1 } $.
 \end{centred}
-\noindent but 
+With letters for the exponent mark – say \verb`d` or \verb`e` –
+there is a problem in interpreting forms like \verb`8d-3` or \verb`2e-1`.
+Does such a form denote a number in scientific notation or an algebraic
+expression? In \texttt{numerica}, if the settings option shows \verb`^=d`,
+then a form like \verb`8d-3` is treated as a number in scientific
+notation. Similarly for \verb`e` or any other letter used as the
+exponent mark for the input of scientific numbers. (But only one character
+can be so used at a time.) Note that the number \emph{must start with
+a digit}: \verb`e-1` for instance does not and will be treated as
+an algebraic expression involving the exponential constant:
 \begin{centred}
-\noindent\noindent\verb`$ \eval[^=e]{ x+1e-1 }[x=1] $` $\Longrightarrow$
-$ \eval[^=e]{ x+1e-1 }[x=1] $.
+\verb`$ \eval[^]{ x+e-1 }[x=1] $` $\Longrightarrow$ $ \eval[^]{ x+e-1 }[x=1] $ 
 \end{centred}
-\noindent A problem of appearance arises if scientific numbers appear
-in the vv-list or formula and either is displayed in the result. A
-number like \noindent\verb`2e-1` will display as $2e-1$, as if it
-were an algebraic expression. In version 1 of \texttt{numerica} the
-cure was to wrap \noindent\verb`2e-1` in a \noindent\verb`\text`
-or \noindent\verb`\mbox` command. In version 2 of \texttt{numerica}
-the behaviour of \noindent\verb`\text` and \noindent\verb`\mbox`
-has been re-thought; see §\ref{subsec:Text-mbox-fonts}. Their contents
-are now invisible to the \noindent\verb`\eval` command. The solution
-is to wrap \noindent\verb`2e-1` in a \noindent\verb`\textrm` or
-\noindent\verb`\textsf` or \noindent\verb`\texttt` command. These
-commands were not recognized by \noindent\verb`\eval` in version
-1 but \emph{are} in version 2:
+but
 \begin{centred}
-\noindent\noindent\verb`\eval[^=e]{$  5x $ }[x=\texttt{2e-1}]` $\Longrightarrow$
-\eval[^=e]{$  5x $ }[x=\texttt{2e-1}],
+\verb`$ \eval[^]{ x+1e-1 }[x=1] $` $\Longrightarrow$ $ \eval[^]{ x+1e-1 }[x=1] $. 
+\end{centred}
+A problem of appearance arises if scientific numbers appear in the
+vv-list or formula and either is displayed in the result. A number
+like \verb`2e-1` will display as $2e-1$, as if it were an algebraic
+expression. In version 1 of \texttt{numerica} the cure was to wrap
+\verb`2e-1` in a \verb`\text` or \verb`\mbox` command. In version
+2 of \texttt{numerica} the behaviour of \verb`\text` and \verb`\mbox`
+was re-thought; see §\ref{subsec:calcText-mbox-fonts}. Their contents
+are  invisible to the \verb`\eval` command. The solution is to wrap
+\verb`2e-1` in a \verb`\textrm` or \verb`\textsf` or \verb`\texttt`
+command. These commands were not recognized by \verb`\eval` in version
+1 but in versions from 2.0.0:
+\begin{centred}
+\verb`\eval[^=e]{$  5x $ }[x=\texttt{2e-1}]` $\Longrightarrow$ \eval[^=e]{$  5x $ }[x=\texttt{2e-1}]
+,
 
-\verb`\eval[^=e]{$ 5\texttt{2e-1} $ }` $\Longrightarrow$ \eval[^=e]{$ 5\texttt{2e-1} $ }.
+\verb`\eval[^=e]{$ 5\texttt{2e-1} $ }` $\Longrightarrow$ \eval[^=e]{$  5(\texttt{2e-1}) $ }
+.
 \end{centred}
 If you use a particular character as the exponent marker for inputting
 numbers in scientific notation, it is good practice \emph{not} to
 use that character as a variable, not because it will cause an error
-but because it makes expressions harder to read.
+but because it makes expressions harder to read. 
 
 \subsection{Multi-token variables}
 
@@ -2698,76 +4251,84 @@
 This conversion takes time. Even if there are no multi-token variables
 used at all, \texttt{numerica} still needs to check that that is so.
 There is a setting that allows a user to turn off or turn on the check
-for such variables by entering 
-\begin{lyxcode}
-xx~=~<integer>
-\end{lyxcode}
-into the settings option. If \texttt{<integer>} is \texttt{0}, the
-check for (and conversion of) multi-token variables is turned off;
-if \texttt{<integer>} is \texttt{1} (or any other\emph{ non-zero}
-integer), the check, and conversion if needed, goes ahead. By default,
-checking for multi-token variables and converting them if found is
-turned \emph{on}. (The name for the key, \texttt{xx}, is chosen because
-\texttt{x} is the most familiar variable of all, introduced in elementary
-algebra, and doubling it like this suggests multi-token-ness.)
+for such variables by entering
+\begin{verbatim}
+    xx = <integer>
+\end{verbatim}
+into the settings option. If \verb`<integer>` is \verb`0`, the check
+for (and conversion of) multi-token variables is turned off; if \verb`<integer>`
+is \verb`1` (or any other\emph{ non-zero} integer), the check, and
+conversion if needed, goes ahead. \texttt{numerica} assumes multi-token
+variables may be used (primed or subscripted variables are common)
+so \verb`xx=1` is assumed initially. (The name for the key, \verb`xx`,
+is chosen because \verb`x` is the most familiar variable of all,
+introduced in elementary algebra, and doubling it like this suggests
+multi-token-ness.)
 
 If checking is turned off when a multi-token variable is present,
-an error results. We don't need to enter \texttt{xx=1} in the first
-of the following examples because the check for multi-token variables
-is on by default. Explicitly turning it off in the second produces
-an error. 
+an error results. We don't need to turn on the check in the first
+of the following examples because that is the initial pre-set state.
+Explicitly turning it off in the second produces an error.
 \begin{centred}
 \verb`\eval{$ x_0^{\,2} $}[x_0=5]` $\Longrightarrow$ \eval{$ x_0^{\,2} $}[x_0=5],\medskip{}
- \verb`\eval[xx=0]{$ x_0^{\,2} $}[x_0=5]` $\Longrightarrow$ \eval[xx=0]{$ x_0^{\,2} $}[x_0=5]
+\verb`\eval[xx=0]{$ x_0^{\,2} $}[x_0=5]` $\Longrightarrow$\\
+ \eval[xx=0]{$ x_0^{\,2} $}[x_0=5]
 \end{centred}
 
-\subsection{Parsing arguments of trigonometric functions}
+\subsection{Multi-formula separator}
 
-This setting allows a wider range of arguments to trigonometric functions
-to be parsed (think Fourier series) without needing to insert extra
-parentheses in order for them to be read correctly by \verb`\eval`;
-see §\ref{subsec:parseTrigFns}.
+\label{subsec:settingsMulti-formula-separator}The \verb`\eval` command
+can evaluate more than one formula at a time. This is activated with
+the \verb`ff` setting. Entering
+\begin{verbatim}
+    ff = <char>
+\end{verbatim}
+in the settings option means multiple formulas separated by \verb`<char>`
+in the main argument of \verb`\eval` will be evaluated. For example,
+using \verb`ff=|`:
+\begin{centred}
+\verb`\eval[ff=|,pp]{ \pi^e | e^\pi | 2\phi^{\phi\pi} }` $\Longrightarrow$
+\eval[ff=|,pp]{ \pi^e | e^\pi | 2\phi^{\phi\pi} }.
+\end{centred}
+When \verb`ff` is used without the \verb`= <char>` part, it defaults
+to the vv-list separator – a comma if the decimal point is a dot (period,
+full stop), a semicolon if the decimal point is a comma (i.e.\ if
+the \verb`comma` package option is used). If \verb`ff=` is used,
+with nothing on the right of the equals sign, to prevent a \LaTeX{}
+error being raised, the vv-list separator is retained as the multi-formula
+separator. 
 
-\subsection{Using degrees rather than radians}
+\subsection{Spaced digit grouping}
 
-\label{subsec:settingsDegrees}You may find it more convenient to
-use degrees rather than radians with trigonometric functions. This
-can be switched on simply by entering a lowercase \texttt{o} in the
-settings option. (The author hopes the charitable eye sees a degree
-symbol in the \texttt{o}.) Thus 
+\label{subsec:settingsDigitGroupingSpaces}Numbers containing many
+digits can be easier to read if the digits are grouped into blocks.
+\texttt{numerica} accepts \emph{as input} numbers with such grouped
+digits provided the intervening character is a space. This needs to
+be explicitly turned on with the setting \verb`1s2`:
+\begin{centred}
+\verb`\eval[1s2]{ 12 3456.7890 1234 }` $\Longrightarrow$ \eval[1s2=1]{ 12 3456.7890 1234 }.
+\end{centred}
+Without the \verb`1s2` setting, the separate blocks of digits are
+multiplied together:
+\begin{verbatim}
+    \eval[dbg=77]{ 12 3456.7890 1234 } 
+\end{verbatim}
+$\Longrightarrow$\eval[dbg=77]{$ 12 3456.7890 1234 $}
 
-\verb`\eval[o]{$ \sin 30 $}` $\Longrightarrow$ \eval[o]{$ \sin 30 $},
+\subsection{Fraction-form denominator limits}
 
-\verb`\eval[o]{$ \arcsin 0.5 $}` $\Longrightarrow$ \eval[o]{$ \arcsin 0.5 $}.
+\label{subsec:settingsFractionOutput}To restrict the size of the
+denominator in fraction-form ouput \verb`\eval` has two settings
+\begin{verbatim}
+    /min = <integer1>
+    /max = <integer2>
+\end{verbatim}
+(Those are \emph{not} backslashes!) \verb`<integer1>` is the value
+to start searching from for a denominator for the fraction; \verb`integer2`
+is the value to search to and then stop the search if none has been
+found (to the requested accuracy). The initial values are \verb`/min=1`
+and \verb`/max=200`. See the discussion at §\ref{subsec:evalFraction-form-output}.
 
-This is a \verb`0/1` switch, \verb`0` signifying \verb`off` or
-`don't use degrees', \verb`1` signifying \verb`on` or `do use degrees'.
-Although the \verb`o` default is \verb`1`, out-of-the-box \texttt{numerica}
-assumes radians are being used. Thus if \verb`o` is absent from the
-settings option of an \verb`\eval` command, the out-of-the-box setting
-prevails and radians are used, but if \verb`o` is present, it is
-equivalent to \verb`o=1`. To explicitly turn off the use of degrees
-requires the full setting, \verb`o=0`.
-
-If you want to change the out-of-the-box setting you need to put the
-line \verb`use-degrees = 1` into a configuration file; see §\ref{sec:settingsDefaults}.
-
-\subsection{Specifying a logarithm base}
-
-\label{subsec:settingsLogBase}If you wish to use \verb`\log` without
-a subscripted base in a particular calculation, then add an entry
-like 
-\begin{lyxcode}
-log~=~<positive~number>
-\end{lyxcode}
-where \verb`<positive number>`~$\ne1$ to the settings option of
-the \verb`\eval` command. The \verb`<positive number>` does not
-need to be an integer. It could be \verb`e` (if you object to writing
-\verb`\ln`) but is more likely to be $2$ or another small integer;
-$10$ is the default. If you want to use this changed base not for
-one but most calculations, then add an entry with your choice of base
-to a configuration file; see §\ref{sec:settingsDefaults}.
-
 \subsection{Calculation mode}
 
 \label{subsec:settingsRecalcMode}A variable may change in the course
@@ -2774,1432 +4335,474 @@
 of a calculation. This is certainly true of sums and products. If
 a parameter in the vv-list depends on the variable then that parameter
 will need to be recalculated, perhaps repeatedly, in the course of
-a calculation. By entering either 
-\begin{lyxcode}
-vv@~=~<integer>
-\end{lyxcode}
-or (as in version 1 of \texttt{numerica}), 
-\begin{lyxcode}
-vvmode~=~<integer>
-\end{lyxcode}
+a calculation. By entering either
+\begin{verbatim}
+    vv@ = <integer>
+\end{verbatim}
+or (as in version 1 of \texttt{numerica}),
+\begin{verbatim}
+    vvmode = <integer>
+\end{verbatim}
 in the settings option it is possible to turn on or off the ability
 to repeatedly evaluate the vv-list; \verb`<integer>` here takes two
-possible values, \texttt{0} or \texttt{1}. \texttt{vv@=0} (or \texttt{vvmode=0})
+possible values, \verb`0` or \verb`1`. \verb`vv@=0` (or \verb`vvmode=0`)
 means the vv-list is evaluated once at the start of the calculation;
-\texttt{vv@=1} (or\texttt{ vvmode=1}) means the vv-list is recalculated
-every time the relevant variable changes.\footnote{In version 1 of \texttt{numerica} only the \texttt{vvmode} name for
+\verb`vv@=1` (or\texttt{ }\verb`vvmode=1`) means the vv-list is
+recalculated every time the relevant variable changes.\footnote{In version 1 of \texttt{numerica} only the \texttt{vvmode} name for
 this setting was available. To the author's eye, the \texttt{@} sign
-seems sufficiently close to a symbol like $\circlearrowleft$, suggesting\texttt{
-}redo or recalculate, that \texttt{vv@} is now preferred. The \texttt{@}
-symbol is -- universally? -- available on keyboards and \texttt{vv@}
-is only half as many keypresses as \texttt{vvmode}.}
+seems suggestively close to a symbol like $\circlearrowleft$ to mean
+`redo' (and is generally available on keyboards). }
 
 For example, in a sum it may be desirable to place the summand, or
 some part of it, in the vv-list. Since the summation variable obviously
-changes during the course of the calculation, we need to enter \texttt{vv@=1}
-in the settings option. Repeating an earlier sum (the seting \verb`p=.`
-is discussed in §\ref{subsec:settingsPunctuation}), \medskip{}
-
+changes during the course of the calculation, we need to enter \verb`vv@=1`
+in the settings option. Repeating an earlier sum, \medskip{}
 \begin{verbatim}
     \eval[p=.,vv@=1]{\[ \sum_{k=1}^N f(k) \]}
       [N=100,f(k)=1/k^3,{k}=1][4] 
 \end{verbatim}
-$\Longrightarrow$     \eval[p=.,vv@=1]{\[ \sum_{k=1}^N f(k) \]}
-      [N=100,f(k)=1/k^3,{k}=1][4] 
+$\Longrightarrow$      \eval[p=.,vv@=1]{\[ \sum_{k=1}^N f(k) \]}
+        [N=100,f(k)=1/k^3,{k}=1][4]
 
-As you can see, the summand \texttt{f(k)} has been given explicit
-form in the vv-list -- equated to \texttt{1/k\textasciicircum 3}.
-That means we need to give a preceding value to \texttt{k} in the
-vv-list to avoid an unknown token message, hence the rightmost entry.
-But we don't want \texttt{k=1} appearing in the final display, so
-we wrap \texttt{k} in braces (see §\ref{subsec:evalVvSuppressVars}).
-Since the value \texttt{k=1} applies only to the first term in the
-sum, to ensure it is not used for all terms, we enter \texttt{vv@=1}
-in the settings option. This turns vv-recalculation mode on and ensures
-\texttt{k=1} is overwritten by \texttt{k=2}, \texttt{k=3} and so on,
-and the vv-list recalculated each time. The final result is the same
-as before, although recalculating the vv-list at each step is a more
-resource-hungry process. The difference may not be marked for this
-example; with more complicated expressions it noticeably takes longer.
+As you can see, the summand \verb`f(k)` has been given explicit form
+in the vv-list – equated to \verb`1/k^3`. That means we need to give
+a preceding value to \verb`k` in the vv-list to avoid an unknown
+token message, hence the rightmost entry. But we don't want \verb`k=1`
+appearing in the final display, so we wrap \verb`k` in braces (see
+§\ref{subsec:evalVvSuppressVars}). Since the value \verb`k=1` applies
+only to the first term in the sum, to ensure it is not used for all
+terms, we enter \verb`vv@=1` in the settings option. This turns vv-recalculation
+mode on and ensures \verb`k=1` is overwritten by \verb`k=2`, \verb`k=3`
+and so on, and the vv-list recalculated each time. The final result
+is the same as before, although recalculating the vv-list at each
+step is a more resource-hungry process. The difference may not be
+marked for this example; with more complicated expressions it noticeably
+takes longer.
 
 Because it is necessary to activate this switch when using \emph{implicit}
-notations -- like $f(k)$ in the example -- rather than the explicit
+notations – like $f(k)$ in the example – rather than the explicit
 form of the function in the main argument, it seems natural to call
-\texttt{vv@=1} \emph{implicit }mode and \texttt{vv@=0} (the default)
-\emph{explicit }mode. Most calculations are explicit mode -- the
-vv-list is evaluated only once.\emph{ }
+\verb`vv@=1` \emph{implicit }mode and \verb`vv@=0` (the default)
+\emph{explicit }mode. Most calculations are explicit mode – the vv-list
+is evaluated only once.\emph{ }
 
-\subsection{Changing the vv-list display format}
+\subsection{Using degrees rather than radians}
 
-\label{subsec:settingsVvDisplayChangeLocal}In previous formulas with
-variables the vv-list has been displayed following the result. It
-is wrapped in parentheses following a comma followed by a space. These
-formatting elements -- comma, space, parentheses -- can all be changed
-with the settings option.
+\label{subsec:settingsDegrees}You may find it more convenient to
+use degrees rather than radians with trigonometric functions. This
+can be switched on simply by entering a lowercase \verb`o` in the
+settings option. (The author hopes the charitable eye sees a degree
+symbol in the  \verb`o`.) Thus
+\begin{centred}
+\verb`\eval[o]{$ \sin 30 $}` $\Longrightarrow$ \eval[o]{$ \sin 30 $},
 
-The default format specification is 
-\begin{lyxcode}
-\{,\}\textbackslash mskip~12mu~plus~6mu~minus~9mu(vv)
-\end{lyxcode}
-for a text-style display (an inline formula) and 
-\begin{lyxcode}
-\{,\}\textbackslash mskip~36mu~minus~24mu(vv)
-\end{lyxcode}
-in a display-style context. The commas are wrapped in braces because
-these are items in a comma-separated list. Both entries exhibit the
-elements: punctuation (comma), preceding a variable space, preceding
-the parenthesized vv-list (the \texttt{vv} placeholder). No full stop
-is inserted after the closing parentheses because the \texttt{\textbackslash eval}
-command may occur in the middle of a sentence (even in display style).
-For inline use, the elasticity of the space becomes relevant when
-\TeX{} is adjusting individual lines to fit sentences into paragraphs
-and paragraphs into pages. The largest spacing that can be stretched
-to is a quad, $18$~mu (mu~=~math unit), and the smallest that
-can be shrunk to is a thin space, $3$~mu. In display style,\texttt{
-}the largest spacing specified is the double quad, in line with the
-recommendation in \emph{The \TeX{} Book}, Chapter~18, but this can
-shrink to a single quad, for instance if the vv-list is heavily populated
-with variables so that the evaluated result is pushed well to the
-left by the vv-list. (But see below, §\ref{subsec:settings New-line-display}.)
-
-If you want to change these defaults, enter in the settings option 
-\begin{lyxcode}
-vvi~=~<new~specification>
-\end{lyxcode}
-to change the inline display and 
-\begin{lyxcode}
-vvd~=~<new~specification>
-\end{lyxcode}
-to change the display-style display For example the settings 
-\begin{lyxcode}
-vvi~=~\{,\}\textbackslash quad(vv)
-
-vvd~=~\{,\}\textbackslash qquad(vv)
-\end{lyxcode}
-would give a comma (in braces since the settings option is a comma-separated
-list) and a fixed space (of one or two quads) between the result and
-the parenthesized vv-list.
-
-The vv-list itself in the display specification is represented by
-the placeholder \texttt{vv}. If the \texttt{vv} is omitted from the
-specification, then the vv-list will not appear at all: 
-\begin{centred}
-\verb`\eval[vvi=?!]{$ \pi $}[\pi=3]` $\Longrightarrow$ \eval[vvi=?!]{$ \pi $}[\pi=3]
+\verb`\eval[o]{$ \arcsin 0.5 $}` $\Longrightarrow$ \eval[o]{$ \arcsin 0.5 $}.
 \end{centred}
-More relevantly, it may well be the case that all variables in the
-vv-list are suppressed (wrapped in braces). In that case nothing is
-displayed. Compare the last example with 
-\begin{centred}
-\verb`\eval[vvi=?!]{$ \pi $}[{\pi}=3]` $\Longrightarrow$ \eval[vvi=?!]{$ \pi $}[{\pi}=3]
-\end{centred}
-and 
-\begin{centred}
-\verb`\eval[vvi=?!]{$ \pi $}` $\Longrightarrow$ \eval[vvi=?!]{$ \pi $}.
-\end{centred}
-See also the punctuation setting below, §\ref{subsec:settingsPunctuation}.
+This is a \verb`0/1` switch, \verb`0` signifying \verb`off` or
+`don't use degrees', \verb`1` signifying \verb`on` or `do use
+degrees'. Out-of-the-box \texttt{numerica} assumes radians are being
+used, \verb`o=0`. As noted in §\ref{subsec:calcTrigonometricFunctions},
+one can also append \verb`\degree` to a number (or a variable), making
+the \verb`o` switch unnecessary for the \emph{direct} functions (but
+always necessary if you want the \emph{inverse} functions to produce
+an answer in degrees). 
 
-\subsection{Displaying the vv-list on a new line }
+\subsection{Specifying a logarithm base}
 
-\label{subsec:settings New-line-display}Display of a long formula
-with many variables, hence a full vv-list, may not fit comfortably
-on a line. In an earlier example I used Brahmagupta's formula to calculate
-the area of a triangle. It squeezed onto a line. I shall now use his
-formula for the area of a cyclic quadrilateral: 
-\[
-A=\sqrt{(s-a)(s-b)(s-c)(s-d)}.
-\]
-The extra side (quadrilateral as against triangle) means there is
-a further variable to accommodate, not only in the formula but also
-in the vv-list. In the following example, the cyclic quadrilateral
-is formed by a 45-45-90 triangle of hypotenuse 2 joined along the
-hypotenuse to a 30-60-90 triangle. The sides are therefore $\surd2,\surd2,\surd3,1$.
-Adding the areas of the two triangles, the area of the quadrilateral
-is $A=1+\tfrac{1}{2}\surd3$, or in decimal form, \verb`$\eval{1+\tfrac12\surd3}$`
-$\Longrightarrow$ $\eval{1+\tfrac{1}{2}\surd3}$. Let's check with
-Brahmagupta's formula: 
+\label{subsec:settingsLogBase}If you wish to use \verb`\log` without
+a subscripted base in a particular calculation, then add an entry
+like 
 \begin{verbatim}
-    \eval[p=.,vvd={,}\\(vv),*]
-      {\[ \sqrt{(s-a)(s-b)(s-c)(s-d)} \]}
-        [s=\tfrac12(a+b+c+d),
-           a=\surd2,b=\surd2,c=\surd3,d=1] 
+    log = <positive number>
 \end{verbatim}
-$\Longrightarrow$     \eval[p=.,vvd={,}\\(vv),*]
-      {\[ \sqrt{(s-a)(s-b)(s-c)(s-d)} \]}
-        [s=\tfrac12(a+b+c+d),
-           a=\surd2,b=\surd2,c=\surd3,d=1] 
+where \verb`<positive number>`~$\ne1$ to the settings option of
+the \verb`\eval` command. The \verb`<positive number>` does not
+need to be an integer. It could be \verb`e` (if you object to writing
+\verb`\ln`) but is more likely to be $2$ or another small integer.
+If no value is specified, \texttt{numerica} assumes \verb`log=10`.
 
-\noindent The values agree. The point to note here is the\texttt{
-vvd=\{,\}\textbackslash\textbackslash (vv)} and the \texttt{{*}}
-in the settings option. The \texttt{\textbackslash\textbackslash}
-in a specification for \texttt{vvd} acts as a trigger for \texttt{numerica}
-to replace whatever math delimiters are enclosed by the \noindent\verb`\eval`
-command with a \noindent\verb`multline` environment. As you can see,
-the specification inserts a comma after the formula and places the
-parenthesized vv-list on a new line. The star \texttt{{*}} if present
-suppresses equation numbering by turning the \noindent\verb`multline`
-into a \noindent\verb`multline*` environment.
+\subsection{\textquoteleft Infinite\textquoteright{} sum and product settings}
 
-Things to note in the use of\texttt{ \textbackslash\textbackslash}
-in a \texttt{vvd} specification are that 
-\begin{itemize}
-\item it applies only to the \texttt{vvd} specification, not the \texttt{vvi}
-spec.; 
-\item it applies only when\emph{ }\verb`\eval`\emph{ wraps around }a math
-environment of some kind; 
-\item it has no effect when the \verb`\eval` command is used \emph{within}
-a math environment when the presentation of the result is of the form
-\emph{result, vv-list}. The formula is not displayed and so the pressure
-on space is less and the `ordinary' vv-list specification is used. 
-\end{itemize}
+These settings, \verb`S+=<integer>`, \verb`P+=<integer>`, \verb`S?=<integer>`,
+\verb`P?=<integer>`, where the latter two are non-negative, determine
+when the stopping criterion for `infinite' sums and products applies.
+They are discussed in §\ref{sec:calcStoppingCriterion}. 
 
-\subsection{Punctuation}
+\section{Display-related settings}
 
-\label{subsec:settingsPunctuation}The \verb`\eval` command can be
-used within mathematical delimiters or it can be wrapped around mathematical
-delimiters. The latter gives a \emph{formula=result} style of display
-automatically, which is convenient. One doesn't need to write the
-\emph{formula=} part of the expression, but it causes a problem when
-\verb`\eval` wraps around a display-style or similar environment:
-how to display a following punctuation mark? For an inline display
-we can simply follow the \verb`\eval` command with the appropriate
-punctuation, for instance: \verb`\eval{$ 1+1 $}.` $\Longrightarrow$
-\eval{$ 1+1 $}. But with \verb`\[ \]` delimiters used \emph{within}
-the \verb`\eval` command a trailing fullstop will slide off to the
-start of the next line, since it is beyond the closing delimiter.
-We want it to display as if it were the last element \emph{before}
-the closing delimiter.
+The following settings have no effect on the calculation but do change
+how the result is displayed. 
 
-Explicitly putting it there -- \verb`\eval{\[ 1+1. \]}` -- means
-the punctuation mark becomes part of the formula. Potentially \texttt{numerica}
-then needs to check not just for a fullstop but also other possible
-punctuation marks like comma, semicolon, perhaps even exclamation
-and question marks. All these marks have roles in mathematics or \texttt{l3fp}.
-Including them in the formula means distinguishing their punctuation
-role from their mathematical role and can only cause difficulties
-and slow evaluation.
+\subsection{Show/hide formula, \texttt{f}}
 
-Instead, \texttt{numerica} uses the setting 
-\begin{lyxcode}
-p~=~<char(s)>~
-\end{lyxcode}
-to place the \verb`<char(s)>` after the result but within the environment
-delimiters. The default punctuation mark is the comma so that simply
-entering \texttt{p} will produce a comma in the appropriate place.
-This saves having to write \texttt{p=\{,\}} as would otherwise be
-required, since the settings option is a \emph{comma}-separated list.
+\verb`\eval` automatically shows the formula in the result display
+if the \verb`env` setting is used to define the environment or \verb`\eval`
+wraps around the environment, but if the environment wraps around
+\verb`\eval`, display of the formula is suppressed. Either circumstance
+can be changed by entering \verb`f=0` to suppress display of the
+formula or \verb`f=1` to display the formula.
 
-Nor is one limited to a single punctuation mark: 
-\begin{centred}
-\verb`\eval[p=\ \text{(but no 8!)}]{\[ \frac{1}{81} \]}[9]` $\Longrightarrow$
-\eval[p=\ \text{(but no 8!)}]{\[ \frac{1}{81} \]}[9]
-\end{centred}
+\subsection{Environment settings, \texttt{env} etc.}
 
-\subsection{Reuse setting}
+\label{subsec:settingsEnvironmentSettings}The math environment in
+which a calculation is presented can be specified in three different
+ways: externally, with \verb`\eval` lying within the environment,
+or internally, either through the \verb`env` setting
+\begin{verbatim}
+    env=<environment>
+\end{verbatim}
+or by explicitly writing the environment into the main argument containing
+the formula, although this last method is clumsy for anything other
+than \verb`$...$` or \verb`\(...\)` or \verb`\[...\]`. If multiple
+environments are – inadvertently or otherwise – specified, the outer
+environment takes precedence over the \verb`env` setting which takes
+precedence over the main-argument environment; this matter was discussed
+with examples in §\ref{sec:calcEnvironment-precedence}.
 
-This setting determines whether the entire display or only the numerical
-result is saved to file with the \verb`\nmcReuse` command. See below,
-§\ref{subsec:supplReuseEvalSetting}.
-
-\section{Infinite sums and products}
-
-\label{sec:settingsInfiniteSumsProds}There are ways of tweaking various
-default settings to nudge infinite sums and products to a correct
-limit. These tweaks are applied via the settings option of the \verb`\eval`
-command.
-
-The normal convergence criterion used by \texttt{numerica} to determine
-when to stop adding/multiplying terms in an infinite sum/product is
-\emph{when the next term added/multiplied leaves the total unaltered
-when rounded to 2 more digits than the specified rounding value.}
-Suppose $T_{k}$ is the sum/product after the inclusion of $k$ terms,
-and $r$ is the rounding value. Denote $T_{k}$ rounded to $r$ figures
-by $\left(T_{k}\right)_{r}$. \emph{The infinite sum or product stops
-at the $(k+1)$th term (and the value is attained at the $k$th term)
-when }$\left(T_{k+1}\right)_{r+2}=\left(T_{k}\right)_{r+2}$. The
-hope is that if this is true at rounding value $r+2$ then at rounding
-value $r$ the series or product will have attained a stable value
-at that level of rounding.
-
-For a series of monotonic terms converging quickly to a limit, this
-stopping criterion works well, less so if convergence is slower, as
-seen earlier with the infinite product for $\sinh1$. The criterion
-can fail completely when terms behave in a non-monotonic manner. Terms
-of a Fourier series, for example, may take zero values; the criterion
-is necessarily satisfied but the series may still be far from its
-limit. In a product the equivalent would be a term taking unit value.
-Sometimes the initial terms of series or products are `irregular'
-and take these `stopping' values meaning sum or product would stop
-after only one or two additions/multiplications and far from any limit.
-
-\begin{table}[t]
-\centering{}\caption{Settings for infinite sums \& products}\label{tab:settingsSumsProducts}
- {\small{}%
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
+\begin{table}
+\centering
+\caption{Initial values for environments}\label{tab:settingsEnvironment-defaults}
+\medskip{}
+\begin{tabular}{lccV{\linewidth}l}
 \toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule 
-{\small\texttt{S+ }} & {\small int} & {\small extra rounding for stopping criterion} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{S? }} & {\small$\text{int}\ge0$} & {\small stopping criterion query terms for sums} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{P+ }} & {\small int} & {\small extra rounding for stopping criterion} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{P?}}{\small{} } & {\small$\text{int}\ge0$} & {\small stopping criterion query terms for products} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{env}} & {\small rem/}{\small\texttt{arg}} & {\small\texttt{eq}} & {\small\texttt{vv}} & {\small\texttt{sep}}\tabularnewline
+\midrule
+{\small\texttt{\$}} & \multirow{3}{*}{} & \multirow{3}{*}{{\small\texttt{=}}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 12muplus}}~\linebreak{}
+{\small\texttt{6muminus9mu(vv)}}
+\end{cellvarwidth}} & \multirow{3}{*}{{\small\texttt{\textbackslash quad}}}\tabularnewline
+{\small\texttt{\textbackslash (}} &  &  &  & \tabularnewline
+{\small\texttt{math}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{\textbackslash{[}}} &  & {\small\texttt{=}} & \begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth} & {\small\texttt{\textbackslash{]}\textbackslash{[}}}\tabularnewline
+\cmidrule{1-1}
+{\small\texttt{displaymath}} & \multirow{3}{*}{} & \multirow{3}{*}{{\small\texttt{=}}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{\textbackslash end\{}}{\small\texttt{\emph{env}}}{\small\texttt{\}}}~\linebreak{}
+{\small\texttt{\textbackslash begin\{}}{\small\texttt{\emph{env}}}{\small\texttt{\}}}
+\end{cellvarwidth}}\tabularnewline
+{\small\texttt{equation}} &  &  &  & \tabularnewline
+{\small\texttt{equation{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{multline}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+\centering
+{\small\texttt{\textbackslash eval}}{\small{} in }\linebreak{}
+{\small{} }{\small\texttt{m'line}}
+\end{cellvarwidth}} & \multirow{2}{*}{{\small\texttt{=}}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth}} & \multirow{2}{*}{{\small\texttt{\textbackslash hfill\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{multline{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{multline}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+\centering
+{\small\texttt{m'line}}~\linebreak{}
+{\small in }{\small\texttt{\textbackslash eval}}
+\end{cellvarwidth}} & \multirow{2}{*}{{\small\texttt{=}}} & \multirow{2}{*}{{\small\texttt{,\textbackslash\textbackslash (vv)}}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{\textbackslash end\{}}{\small\texttt{\emph{env}}}{\small\texttt{\}}}~\linebreak{}
+{\small\texttt{\textbackslash begin\{}}{\small\texttt{\emph{env}}}{\small\texttt{\}}}
+\end{cellvarwidth}}\tabularnewline
+{\small\texttt{multline{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{eqnarray}} & \multirow{2}{*}{} & \multirow{2}{*}{{\small\texttt{\&=\&}}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth}} & \multirow{2}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{eqnarray{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{align}} & \multirow{3}{*}{} & \multirow{3}{*}{{\small\texttt{\&=}}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth}} & \multirow{3}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{align{*}}} &  &  &  & \tabularnewline
+{\small\texttt{aligned}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{flalign}} & \multirow{2}{*}{} & \multirow{2}{*}{{\small\texttt{\&=}}} & \multirow{2}{*}{{\small\texttt{,\&(vv)}}} & \multirow{2}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{flalign{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{gather}} & \multirow{3}{*}{} & \multirow{3}{*}{{\small\texttt{\&=\&}}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 12muplus}}~\linebreak{}
+{\small\texttt{6muminus9mu(vv)}}
+\end{cellvarwidth}} & \multirow{3}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{gather{*}}} &  &  &  & \tabularnewline
+{\small\texttt{gathered}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{alignat}} & \multirow{3}{*}{{\small\texttt{2}}} & \multirow{3}{*}{{\small\texttt{\&=\textbackslash ;\&}}} & \multirow{3}{*}{{\small\texttt{,\textbackslash qquad\&(vv)}}} & \multirow{3}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{alignat{*}}} &  &  &  & \tabularnewline
+{\small\texttt{alignedat}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{array}} & {\small\texttt{rcrl}} & {\small\texttt{\&=\&}} & {\small\texttt{,\&(vv)}} & {\small\texttt{\textbackslash\textbackslash}}\tabularnewline
+\cmidrule{1-1}
+{\small\texttt{cases}} & \multirow{2}{*}{} & \multirow{2}{*}{{\small\texttt{=}}} & \multirow{2}{*}{{\small\texttt{,\textbackslash quad\textbackslash hfill(vv)}}} & \multirow{2}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{dcases}} &  &  &  & \tabularnewline
 \bottomrule
-\end{tabular}}
+\end{tabular}
 \end{table}
+Table~\ref{tab:settingsEnvironment-defaults} lists the environments
+that \verb`env` can be set to and that \verb`\eval` recognizes.
+It also lists the initial values of the settings \verb`arg`, \verb`eq`,
+\verb`vv` and \verb`sep`, designed to give sensible displays, without
+further intervention by the user, in many circumstances. (When the
+\verb`comma` package option is used, the comma leading the entries
+in the \verb`vv` column is replaced by a semicolon.) If you are using
+the \verb`env` setting, and want to change a value for one or more
+of these settings, then the changed value must be entered \emph{after}
+the \verb`env` setting to have any effect. 
 
-To cope with these possibilities, \texttt{numerica} offers two settings
-for sums, two for products, summarized in Table~\ref{tab:settingsSumsProducts}.
-These are entered in the settings option of the \verb`\eval` command. 
-\begin{itemize}
-\item \texttt{S+=<integer> }or \texttt{P+=<integer>} additional rounding
-on top of the specified (or default) rounding for the calculation;
-default = $2$ 
-\begin{itemize}
-\item the larger the additional \texttt{<integer>} is, the more likely that
-sum or product has attained a stable value at the specified rounding
-$r$ 
-\end{itemize}
-\item \texttt{S?=<integer${}\,\mathtt{\ge0}$> }or \texttt{P?=<integer${}\,\mathtt{\ge0}$>}
-the number of final terms to query after the stopping criterion has
-been achieved to confirm that it is not an `accident' of particular
-values; default = $0$ 
-\begin{itemize}
-\item a final few terms to be summed/multiplied and the rounded result after
-each such operation to be compared with the rounded result at the
-time the stopping criterion was achieved. Suppose the additional rounding
-(\texttt{S+} or \texttt{P+}) is $n$ on top of the specified rounding
-$r$ and let the number of final checking terms be $m$. Suppose $T_{k_{0}}$
-is the first term at which the stopping criterion is achieved: $\left(T_{k_{0}}\right)_{r+n}=\left(T_{k_{0}+1}\right)_{r+n}$.
-What we require of the final query terms is that $\left(T_{k_{0}}\right)_{r+n}=\left(T_{k_{0}+1+j}\right)_{r+n}$
-for $j=0,1,\ldots,m$. 
-\end{itemize}
-\end{itemize}
-Previously we found that the infinite product for $\sinh1$ with the
-default settings gave the wrong value, $0.174$, deficient by $1$
-in the last digit. We now have the means to tweak the stopping criterion
-by increasing the additional rounding: 
+There are other settings which inter-play with these environment settings
+but are not given initial values by the \verb`env` setting as \verb`arg`,
+\verb`eq`, \verb`vv` and \verb`sep` are, and so do not need to
+follow it in the settings option, but it is clearer and therefore
+good practice if they do. These are the punctuation settings \verb`p`
+and \verb`pp`, and the \verb`\}` setting applying only to \verb`aligned`,
+\verb`alignedat`, \verb`gathered`, \verb`cases`, \verb`dcases`,
+and \verb`array` environments – ones that require an enclosing math
+environment. The \verb`\}` setting gathers the results of a multi-formula
+display within a large right delimiter (right brace by default); it
+is usually followed by  the vv-list and allows the results of a multi-formula
+calculation to be collectively numbered rather than individually. 
+
+\subsubsection{\texttt{arg}}
+
+The \verb`array` and \verb`alignat` group of environments require
+an argument, as in \verb`\begin{array}{arg}...` and \verb`\begin{alignat}{arg}...`.
+For recognized environments the pre-set value of \verb`arg` is shown
+in the second column of Table~\ref{tab:settingsEnvironment-defaults}.
+Note that the use of \verb`arg` environments is possible with \verb`\eval`
+\emph{only} when used with the \verb`env` setting; otherwise the
+\verb`{arg}` is misinterpreted and will generally cause an error,
+as in the following, with its peculiar error message
 \begin{verbatim}
-    \eval[p,P+=3]{\[
-      \prod_{k=1}^{\infty}
-      \biggl(\frac{x^2}{k^2\pi^2} +1\biggr) 
-    \]}[x=1][3] \nmcInfo{prod}.
+    \[
+      \eval[ff]{ \begin{array}{rcll} 
+        \sin x, \cos x, \tan x 
+      \end{array}}[x=\pi/6]
+    \]
 \end{verbatim}
-\noindent$\Longrightarrow$     \eval[p,P+=3]{\[
-      \prod_{k=1}^{\infty}
-      \biggl(\frac{x^2}{k^2\pi^2} +1\biggr) 
-    \]}[x=1][3] \nmcInfo{prod}.
+$\Longrightarrow$     \[
+      \eval[ff]{ \begin{array}{rclr} 
+        \sin x, \cos x, \tan x 
+      \end{array}}[x=\pi/6]
+    \]
 
-\noindent To obtain that last item of information (350 factors), I've
-anticipated a little and used the command \noindent\verb`\nmcInfo`
-with the argument \noindent\verb`prod`; see §\ref{sec:supplInfo}.
-The product now produces the correct three-figure value, but it takes
-$350$ factors to do so.
-
-Knowing how many terms or factors have been needed helps assess how
-trustworthy the result from an infinite sum or product is. For example,
-for the exponential series, 
+\noindent The problem does not arise when the \verb`env` setting
+is used: 
 \begin{verbatim}
-    \eval[p]{\[
-      \sum_{k=0}^\infty \frac1{k!} 
-    \]}[9] \nmcInfo{sum}.
+    \[
+      \eval[env=array,ff]{ 
+        \sin x, \cos x, \tan x }[x=\pi/6][*]
+    \]
 \end{verbatim}
-$\Longrightarrow$     \eval[p]{\[
-      \sum_{k=0}^\infty \frac1{k!} 
-    \]}[9] \nmcInfo{sum}.
+$\Longrightarrow$     \[
+      \eval[env=array,ff]{ 
+        \sin x, \cos x, \tan x }[x=\pi/6][*]
+    \]
 
-To $9$ places of decimals, using the default value \texttt{S+=2},
-the exponential series arrives at the right sum after only $15$ terms.
-Convergence is rapid. We can trust this result (and it is in fact
-the correct nine-figure value). By contrast, if we didn't know the
-value of $\sinh1$ beforehand, noting the number of factors required
-would make us justly cautious about accepting the result of the infinite
-product calculation.
+\noindent In this case, with the pre-set \verb`arg=rcrl`, the formulas
+are right-aligned, the equality signs are centred, the numerical results
+are right-aligned and the vv-lists are left-aligned. These alignments
+can be changed with the \verb`arg` setting, but this must \emph{follow}
+the \verb`env` setting for the changes to have any effect.
 
-\noindent{}%
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-One way to gain confidence in a result is to choose a possibly unrealistic
-rounding value -- say, the default $6$ for the infinite product
--- then use \emph{negative} values for the extra rounding, \texttt{S+=-5},
-\texttt{S+=-4}, \ldots{} , so that the stopping criterion applies at
-rounding values $s$ of $6+(-5)=1$, one decimal place, $6+(-4)=2$,
-two decimal places, and so on, but the result is always presented
-to $6$ decimal places. You can then see how the $6$-figure results
-behave relative to the number of terms it takes to meet the stopping
-criterion. A little experimenting shows that for the infinite product
-for $\sinh1$ the number of factors $N_{s}$ required at a stopping
-rounding value $s$ increases in geometric proportion with a scale
-factor of about $3$: $N_{s}\approx\text{const}\times3^{s}$. This
-rapidly becomes large ($3^{4}=81,3^{5}=243\dots$). For the exponential
-series on the other hand $N_{s}=4+s$, the number of terms increases
-only slowly, in direct proportion to the stopping rounding value.
-Similar experiments with the sums of inverse fourth, third and second
-powers of the integers using \verb`\nmcInfo` to find how many terms
-are required at each stopping rounding value, show that at least over
-the rounding value range $1$ to $8$, for inverse fourth powers $N_{s}\approx\text{const}\times1.7^{s}$,
-for inverse third powers $N_{s}\approx\text{const}\times2^{s}$ and
-for inverse squares $N_{s}\approx\text{const}\times3^{s}$. All are
-geometric rather than arithmetic progressions, but for inverse fourth
-powers the scale factor ($\approx1.7$) is sufficiently small that
-for these low values of $s$ the number of terms required does not
-grow too quickly (e.g. $1.7^{6}\approx\eval{1.7^{6}}[0]$). \end{shaded}%
-\end{minipage}
+\subsubsection{\texttt{eq}}
 
-\noindent{}%
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-It is a standard result (Euler) that the series sums to $\pi^{4}/90$:
-\verb`$ \eval{ \pi^4/90 } $` $\Longrightarrow$ $\eval{\pi^{4}/90}$
-to six places, and indeed, with the default \texttt{S+=2}, 
+\label{subsec:settingsRelationSymbol}Throughout this document, \emph{formula=result}
+displays have used the equality sign between the two sides. Most of
+the results however have been approximate. If you want a different
+relation symbol in the display, enter
+\begin{verbatim}
+    eq=<char(s)>
+\end{verbatim}
+in the settings option. For example,
 \begin{centred}
-\verb`\eval[p=.]{\[ \sum_{k=1}^\infty \frac1{k^4} \]}` $\Longrightarrow$
-\eval[p=.]{\[ \sum_{k=1}^\infty \frac1{k^4} \]}
+\verb`\eval[eq=\approx]{$ \pi $}[4]` $\Longrightarrow$ \eval[eq=\approx]{$ \pi $}[4].
 \end{centred}
-\end{shaded}%
-\end{minipage}
+If the \verb`approx` package option is being used, note that \verb`eq`
+defaults to \verb`=` , so that – say – for a calculation with an
+integer answer for which $\approx$ would be inappropriate it suffices
+just to enter \verb`eq` to obtain $=$ between formula and result. 
 
-\subsection{Premature ending of infinite sums}
+A main use of this setting is with environments with alignment where
+\verb`&=` and \verb`&=&` are natural values for \verb`eq`; see
+below, §\ref{subsec:settingsEnvironmentSettings}. If the \verb`env`
+setting is being used then the \verb`eq` setting must \emph{follow}
+it to have any effect.
 
-\noindent All the series considered so far have been monotonic. Trigonometric
-series will generally not be so, nor even single-signed.
+\subsubsection{\texttt{vv}}
 
-Trigonometric sums are computationally intensive and so, for the following
-example, I have specified a rounding value of 2. The series 
-\[
-\sum_{n=1}^{\infty}\frac{4}{n^{2}\pi^{2}}(1-\cos n\pi)\cos2\pi nt
-\]
-is the Fourier series for the triangular wave function \textbackslash\negthinspace{}/\negthinspace{}\textbackslash\negthinspace{}/\negthinspace{}\textbackslash\negthinspace{}/\negthinspace{}\textbackslash{}
-\ldots{} of period 1, symmetric about the origin where it takes its
-maximum value 1, crossing the axis at $t=0.25$ and descending to
-its minimum $-1$ at $t=0.5$, before ascending to a second maximum
-at $t=1$ (and so on). In the interval $[0,0.5)$ the series should
-sum to $1-4t$. The problem is that the summand $\frac{4}{n^{2}\pi^{2}}(1-\cos n\pi)\cos2\pi nt$
-vanishes both when $n$ is even and when $4nt$ is an odd integer.
-If $t=0.1$ then $4nt$ is never an odd integer so the summand vanishes
-only for $n$ even, every second term. We expect the result to be
-$1-4\times0.1=0.6$. 
+\label{subsec:settingsVvDisplayChangeLocal}In many of the examples
+in this document the vv-list has been displayed following the result.
+It is wrapped in parentheses following a comma and a space. (A semicolon
+replaces the comma if the \verb`comma` package option is used.) These
+elements – comma, space, parentheses – can all be changed by entering
 \begin{verbatim}
-    \eval[p]{\[
-      \sum_{n=1}^{\infty}
-        \frac{4}{n^{2}\pi^{2}}
-        (1-\cos n\pi)\cos2\pi nt 
-    \]}[t=0.1][2] \nmcInfo{sum}.
+    vv=<tokens>
 \end{verbatim}
-$\Longrightarrow$     \eval[p]{\[
-      \sum_{n=1}^{\infty}
-        \frac{4}{n^{2}\pi^{2}}
-        (1-\cos n\pi)\cos2\pi nt 
-    \]}[t=0.1][2] \nmcInfo{sum}.
-
-\noindent Only one term? Of course -- since for the second term $n$
-is even, the term vanishes and the stopping criterion is satisfied.
-The way around this problem is to query terms \emph{beyond} the one
-where the stopping criterion is achieved, i.e., to set \texttt{S?}
-to a nonzero value. We try \texttt{S?=1}: 
+in the settings option. For example
 \begin{verbatim}
-    \eval[p,S?=1]{\[
-      \sum_{n=1}^{\infty}
-        \frac{4}{n^{2}\pi^{2}}
-        (1-\cos n\pi)\cos2\pi nt 
-    \]}[t=0.1][2] \nmcInfo{sum}.
+    vv=;\mskip 12mu plus 6mu minus 9mu(vv)
 \end{verbatim}
-$\Longrightarrow$     \eval[p,S?=1]{\[
-      \sum_{n=1}^{\infty}
-        \frac{4}{n^{2}\pi^{2}}
-        (1-\cos n\pi)\cos2\pi nt 
-    \]}[t=0.1][2] \nmcInfo{sum}.
+will result in a semicolon immediately following the numerical result
+followed by an elastic space followed by the actual vv-list – replacing
+the placeholder \verb`vv` – enclosed in parentheses. No full stop
+is inserted after the closing parenthesis because the \verb`\eval`
+command may occur in the middle of a sentence (and the \verb`p` setting
+is available for such punctuation in displaystyle contexts). For inline
+use, the elasticity of the space becomes relevant when \TeX{} is adjusting
+individual lines to fit sentences into paragraphs and paragraphs into
+pages. If a comma were to replace the semicolon in the suggested vv-list
+spec., it would need to be entered in braces or as \verb`\comma`,
+since the settings option is a comma-separated list. In displaystyle
+settings, some shrink in the space is a good idea to accommodate a
+long formula or many variables in the vv-list.
 
-\noindent{}%
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-\begin{wraptable}{o}{0.35\columnwidth}%
-\centering{}\vspace{-5ex}
- \caption{Finite sums}\label{tab:settingsFinite-sums}
- \abovetopsep=2ex %
-\begin{tabular}{cc}
-\toprule 
-$N$ & $\Sigma$\tabularnewline
-\midrule 
-$63$ & $0.6001$\tabularnewline
-$64$ & $0.6001$\tabularnewline
-$65$ & $0.5999$\tabularnewline
-$66$ & $0.5999$\tabularnewline
-$67$ & $0.5999$\tabularnewline
-\bottomrule
-\end{tabular}\end{wraptable}%
+For a particular calculation with a surprising result, one might specify
+\verb`vv=?!` with no vv-list shown (since the \verb`vv` placeholder
+is not used on the right):
+\begin{centred}
+\verb`\eval[vv=?!]{$ \pi $}[\pi=3]` $\Longrightarrow$  \eval[vvi=?!]{$ \pi $}[\pi=3]
+\end{centred}
+Different formats for vv-list display are appropriate for different
+environments. Those with alignment, like the AMS environments, may
+have an alignment token \verb`&` following a comma (or semicolon)
+before display of the vv-list proper; see below, §\ref{subsec:settingsEnvironmentSettings}
+and Table~\ref{tab:settingsEnvironment-defaults}. If the \verb`env`
+setting is being used then the \verb`vv` setting must \emph{follow}
+it to have any effect.
 
-Table~\ref{tab:settingsFinite-sums} lists the results of evaluating
-the \emph{finite }sums from $n=1$ to $N$ for values of $N$ around
-$65$. Since the specified rounding value is $2$ for the calculation,
-the stopping criterion\emph{ }applies at a rounding value of $2$
-more than that, $4$. Since $N=64$ is even, the summand for the $64$th
-term is zero and the sum takes the same value as for $N=63$. The
-$65$th term is the query term and the sum differs, so the summation
-continues. The $66$th term vanishes, so the stopping criterion is
-met. This time for the query term, the $67$th, the sum retains the
-same $4$-figure value, and the summation stops. The result was attained
-at the $65$th term. Should we be confident in the result? Increase
-the number of query terms to $3$ (there is no point in increasing
-\texttt{S?} to $2$ because of the vanishing of the even terms), the
-sum stops after $113$ terms, with the same $0.6$ result.\end{shaded}%
-\end{minipage}
+\subsubsection{\texttt{sep}}
 
-\noindent For a final example, consider the error function 
-\[
-\erf z=\dfrac{2}{\sqrt{\pi}}\int_{0}^{z}e^{-t^{2}}dt
-\]
-which can also be rendered as an infinite sum (\emph{HMF }7.1.5):
-\[
-\erf z=\sum_{n=0}^{\infty}(-1)^{n}\frac{z^{2n+1}}{n!(2n+1)}.
-\]
-(\noindent\verb`\erf` expanding to \noindent\verb`erf` has been
-defined in the preamble to this document using \noindent\verb`\DeclareMathOperator`.)
-We calculate this sum for $z=2$ to $10$ places of decimals. Although
-this is an alternating series, it is obvious that the summand never
-vanishes when $z\ne0$ as here. Hence there seems no need to change
-the default value \texttt{S?=0}. 
+\label{subsec:settingsEnvironments-sep}Displaying the results of
+a multi-formula calculation means separating the displays for each
+result. The \verb`sep` setting specifies the tokens inserted between
+each display: 
 \begin{verbatim}
-    \eval[p]{\[ 
-      \frac2{\sqrt{\pi}}
-        \sum_{n=0}^\infty(-1)^n
-          \frac{z^{2n+1}}{n!(2n+1)}   
-    \]}[z=2][10*] \nmcInfo{sum}.
+    sep = <tokens>
 \end{verbatim}
-$\Longrightarrow$     \eval[p]{\[ 
-      \frac2{\sqrt{\pi}}
-        \sum_{n=0}^\infty(-1)^n
-          \frac{z^{2n+1}}{n!(2n+1)}   
-    \]}[z=2][10*] \nmcInfo{sum}.
+where \verb`<tokens>` may be something like \verb`\quad` for an
+inline environment or \verb`\\` in a multi-line environment, see
+Table~\ref{tab:settingsEnvironment-defaults}. For \verb`multline`
+and \verb`multline*` different values are assigned depending as \verb`\eval`
+is wrapped by or wraps the environment. The function of the \verb`sep`
+setting overlaps that of the \verb`pp` setting, but it proves more
+flexible to keep them separate. Since \verb`env`-ironments come with
+pre-set values of \verb`sep`, if both settings are being used, the
+\verb`sep` setting must \emph{follow} \verb`env` for it to have
+any effect.
 
-According to \emph{HMF }Table 7.1, this calculated value of $\erf2$
-is correct to all $10$ places. But beyond $z=2$ errors will begin
-to interfere with the result. Note that $26$ terms means $n=26$
-was the last value of $n$ for which the summand was evaluated. (The
-sum stops at the $26$th term, $n=25$, but the next term $n=26$
-needs to be calculated for the stopping criterion.) Fortuitously,
-$2^{2\times26+1}=2^{53}$ is the greatest power of $2$ that can be
-\emph{exactly} rendered to the $16$ significant figures that \texttt{l3fp}
-uses. But $n!$ exceeds the $16$-significant figure limit of \texttt{l3fp}
-when $n>21$, so despite the 10-figure result, errors have already
-begun to occur in the denominator of the summand and accrue in the
-sum when $z=2$. For larger $z$ values the errors can only get worse
-and at some point will render the calculated value worthless at any
-meaningful rounding value. For example, when $z=7$ the sum apparently
-`evaluates' to over $929$ whereas we know that 
-\[
-\erf z<\dfrac{2}{\sqrt{\pi}}\int_{0}^{\infty}e^{-t^{2}}dt=1.
-\]
+\subsubsection{\texttt{p}, \texttt{pp}}
 
-
-\subsection{Double sums or products}
-
-Sums or products can be iterated. For instance, the exponential function
-can be calculated this way: 
+\label{subsec:settingsPunctuation}As noted in the discussion at §\ref{subsec:introPunctuation},
+punctuation of the display of a result is straightforward when the
+\verb`\eval` command is used in inline contexts but requires use
+of a setting in displaystyle environments. The setting 
 \begin{verbatim}
-    \eval[p]
-      {\[ \sum_{k=0}^{\infty}
-        \prod_{m=1}^{k}\frac{x}{m} \]}[x=2]
+    p = <char(s)> 
 \end{verbatim}
-$\Longrightarrow$     \eval[p]
-      {\[ \sum_{k=0}^{\infty}
-        \prod_{m=1}^{k}\frac{x}{m} \]}[x=2]
-
-\noindent which is \noindent\verb`\eval{$ e^2 $}` $\Longrightarrow\eval{\ensuremath{e^{2}}}$.
-
-A second example is afforded by Euler's transformation of series (\emph{HMF~}3.6.27).
-To calculate $e^{-1}$ we use 
-\begin{verbatim}
-    \eval[p]
-      {\[ \sum_{n=0}^{\infty}
-              \frac{(-1)^{n}}{n!} \]}[3] \info{sum}.
-\end{verbatim}
-$\Longrightarrow$     \eval[p]
-      {\[ \sum_{n=0}^{\infty}
-              \frac{(-1)^{n}}{n!} \]}[3] \info{sum}.
-
-Following Euler, this series can be transformed to the form 
-\begin{verbatim}
-    \eval[p,S?=1]{\[
-      \sum_{k=0}^\infty \frac{(-1)^k}{2^{k+1}}
-      \sum_{n=0}^k(-1)^n\binom kn \frac1{(k-n)!} 
-    \]}[3] \nmcInfo{sum}.
-\end{verbatim}
-$\Longrightarrow$     \eval[p,S?=1]{\[
-      \sum_{k=0}^\infty \frac{(-1)^k}{2^{k+1}}
-      \sum_{n=0}^k(-1)^n\binom kn \frac1{(k-n)!} 
-    \]}[3] \nmcInfo{sum}.
-
-\noindent Note the setting \noindent\verb`S?=1`. Without it, the
-summation stops after $1$ term, the $k=0$ term, because the $k=1$
-term vanishes. With \noindent\verb`S?=1` it takes $16$ terms of
-the \emph{outer }sum to reach the stopping criterion. Since that sum
-starts at $0$, that means that changing the upper limit from $\infty$
-to $15$ should give the same result -- which it does -- but it
-takes $\tfrac{1}{2}\times16\times17=136$ terms in total to get there,
-to be compared with the $9$ terms of the earlier simpler sum, and
-the terms are more complicated. Obviously such double sums are computationally
-intensive.
-
-\section{Changing default values}
-
-\label{sec:settingsDefaults}The settings option enables various settings
-to be changed for an individual calculation. You may find yourself
-wanting to make such changes sufficiently often that a change of default
-value is a better plan than encumbering each calculation with a list
-of settings.
-
-The way to do that is to create a \emph{configuration file} named
-\texttt{numerica.cfg} in a text editor. Its entries are of the form
-\emph{key=value} followed by a comma, and for clarity preferably one
-entry per line (although this is not essential).The key names are
-noticeably more verbose than the corresponding keys of the settings
-option.\emph{ }The possible keys are listed in Table~\ref{tab:settingsDefaults},
-together with their current default values.
-
-\begin{table}[t]
-\centering{}\caption{Default values, \texttt{\textbackslash eval} command}\label{tab:settingsDefaults}
- %
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small value}\tabularnewline
-\midrule 
-{\small rounding} & {\small\texttt{6}}\tabularnewline
-{\small pad} & {\small\texttt{0}}\tabularnewline
-{\small output-sci-notation} & {\small\texttt{0}}\tabularnewline
-{\small output-exponent-char} & {\small\texttt{e}}\tabularnewline
-{\small\%} & \tabularnewline
-{\small input-sci-notation} & {\small\texttt{0}}\tabularnewline
-{\small input-exponent-char} & {\small\texttt{e}}\tabularnewline
-{\small multitoken-variables} & {\small\texttt{1}}\tabularnewline
-{\small use-degrees} & {\small\texttt{0}}\tabularnewline
-{\small logarithm-base} & {\small\texttt{10}}\tabularnewline
-{\small vv-display} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{\small vv-inline} & {\small\texttt{\{,\}\textbackslash mskip 12mu 6mu minus 9mu(vv)}}\tabularnewline
-{\small\%} & \tabularnewline
-{\small sum-extra-rounding} & {\small\texttt{2}}\tabularnewline
-{\small sum-query-terms} & {\small\texttt{0}}\tabularnewline
-{\small prod-extra-rounding} & {\small\texttt{2}}\tabularnewline
-{\small prod-query-terms} & {\small\texttt{0}}\tabularnewline
-\% & \tabularnewline
-{\small intify-rounding} & {\small\texttt{14}}\tabularnewline
-{\small eval-reuse} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\end{table}
-
-Keys taking one of two possible values, \verb`0` (for \verb`false/off`)
-or \verb`1` (for \verb`true/on`), are \verb`pad` (the result with
-zeros), \verb`output-sci-notation`, \verb`input-sci-notation`, (check
-for) \verb`multitoken-variables`, and \verb`use-degrees` (for trig.
-functions).
-
-The table is divided into four parts. 
-\begin{itemize}
-\item The top four rows concern elements that can be changed for individual
-calculations with the trailing optional argument of \verb`\eval`:
-rounding, padding with zeros, and outputting in scientific notation;
-see §\ref{subsec:evalRoundingEtc}. 
-\begin{itemize}
-\item Note that to output the result always in scientific notation requires
-two settings, first setting \texttt{output-sci-notation} to \texttt{1},
-and then choosing a character to act as the exponent marker. Because
-\texttt{l3fp} uses \texttt{e} for this character, \texttt{numerica}
-has made \texttt{e} its default. But this option is turned off by
-default (hence the \texttt{0} against this key). 
-\end{itemize}
-\item The next block of rows concern general elements that can be changed
-for individual calculations with the settings option of \verb`\eval`;
-see §\ref{sec:settingsOption}. The key names are more expansive here
-but the effect is the same. 
-\begin{itemize}
-\item Note that to input numbers in scientific notation requires two settings,
-first setting \texttt{input-sci-notation} to \texttt{1}, and then
-choosing a character to act as the exponent marker. Because \texttt{l3fp}
-uses \texttt{e} for this character, \texttt{numerica} has made \texttt{e}
-its default. The option is turned off by default (hence the \texttt{0}
-against this key). 
-\end{itemize}
-\item The third block of rows concern default settings for infinite sums
-and products. These correspond to the keys \texttt{S+}, \texttt{S?}
-and \texttt{P+}, \texttt{P?} of the settings option that can be used
-to tweak the behaviour of the stopping criterion for such sums or
-products; see §\ref{sec:settingsInfiniteSumsProds}. 
-\item The last block is for `left-overs': specifying at what rounding value
-a floating point should be considered an integer (see §\ref{subsec:defaultsIntifyingRounding}
-below), and specifying what kind of result is saved to file when the
-\verb`\nmcReuse` command is used (see §\ref{subsec:supplReuseEvalSetting}). 
-\end{itemize}
-If you are dissatisfied with any of the default values listed, then
-in a text editor create a new file called \texttt{numerica.cfg} and
-assign \emph{your} values to the relevant keys. For instance, if you
-find yourself working to $4$ figures, that rounding to $6$ is too
-many, then make the entry \texttt{rounding~=}~4. If also you want
-results always presented in proper scientific notation,\emph{ $d.d_{1}d_{2}d_{3}d_{4}\times10^{n}$},
-then add a comma after \texttt{4} and enter on a new line (recommended
-but not strictly necessary; the comma is the crucial thing), \texttt{output-sci-notation~=~1,}
-(note the comma) and on another new line, \texttt{output-exponent-char~=~x}.
-
-Perhaps you also want a non-zero setting for the final query terms
-for infinite sums and products. This makes sense if you are largely
-dealing with non-monotonic series -- like Fourier series. Even the
-Euler transformation of the exponential series for $e^{-1}$ discussed
-above required a non-zero \texttt{S?}. If you wish to make this change
-then add a comma and on a new line add (for instance) \texttt{sum-query-terms~=~1,}
-and again on a new line, \texttt{prod-query-terms~=}~1. If this
-is all you wish to change, then no comma is necessary after this final
-entry. Your newly created file should look something like 
-\begin{lyxcode}
-rounding~~~~~~~~~~~~~=~4,
-
-output-sci-notation~~=~1,
-
-output-exponent-char~=~x,
-
-sum-query-terms~~~~~~=~1,
-
-prod-query-terms~~~~~=~1
-\end{lyxcode}
-The white spacing may be different; white space is ignored by \texttt{numerica}
-when reading the file. Using it to align the equals signs helps \emph{us}
-read the file. Note that the last entry, because it is the last entry,
-lacks a comma. Now save the file with the name \texttt{numerica.cfg}.
-This file will be read by \texttt{numerica} near the end of its loading
-process. These settings will be \texttt{numerica}'s defaults for the
-relevant keys.
-
-\subsection{Location of \texttt{numerica.cfg}}
-
-Save, yes, but where to? If the new settings are likely to apply only
-to your current document, then the document's directory is a sensible
-place to put it and \texttt{numerica} will certainly find it there
-since it is part of \LaTeX 3 file handling that file searches are
-not limited to the \TeX{} distribution (including your personal texmf
-tree) but also include the current document directory. But what happens
-when you start working on another document? Will you remember to copy
-\texttt{numerica.cfg} to its new location? That is why your \emph{personal
-texmf tree} is a better place.
-
-\subsubsection{Personal texmf tree? }
-
-\label{subsec:settingsPersonal-texmf-tree}This is a directory for
-`waifs and strays' of the \TeX{} system that are not included in the
-standard distributions like MiK\TeX{} or \TeX Live. Here you place
-personal packages designed for your own particular circumstances.
-These may include your own \TeX{} or \LaTeX{} package, say \texttt{mypackage.sty},
-achieving some small or singular effect that doesn't warrant wider
-distribution on CTAN. Here you might place configuration files for
-other packages with your preferences (unless the package requires
-some specific location). Here you can put your personal bibliography
-files.
-
-Your personal texmf tree is structured like the standard MiK\TeX{}
-or \TeX Live hierarchy but placed in another location so that there
-is no chance of its being overwritten when packages in MiK\TeX{} or
-\TeX Live are updated. But these distributions need to be alerted
-to its existence.
-
-For example, in the MiK\TeX{} console, click on \textsf{Settings},
-and then on the \textsf{Directories} tab of the resulting dialog.
-Here you get to add your personal texmf hierarchy to the list of paths
-that MiK\TeX{} searches, by clicking on the \textsf{+} button, browsing
-to your texmf folder and selecting it. By using the up and down arrow
-keys that the MiK\TeX{} console provides, ensure that it lies \emph{above
-}the the entry for the main MiK\TeX{} tree. That way, files in your
-personal texmf tree will be found first and loaded. Now go to the
-\textsf{Tasks} menu and click on \textsf{Refresh the filename database}.
-This will let MiK\TeX{} know what is held in your personal texmf tree.
-Files there can then be used like standard \LaTeX{} packages.
-
-\subsection{Rounding in \textquoteleft int-ifying\textquoteright{} calculations}
-
-\label{subsec:defaultsIntifyingRounding}Factorials, binomial coefficients,
-summation and product variables, and (in \texttt{numerica}) $n$th
-roots from the \texttt{\textbackslash sqrt} command, all require
-integer arguments. These integers may indeed be entered explicitly
-as integers, but they can also be determined as the result of a calculation.
-Rounding errors may mean the result is not an exact integer. How much
-leeway should be allowed before it is clear that the calculation did
-not give an integer result? In the default setup, \texttt{numerica}
-is generous. A number is considered an integer if it rounds to an
-integer when the rounding value is $14$. Since \texttt{l3fp} works
-to $16$ significant figures this provides more than enough `elbowroom'
-for innocuous rounding errors to be accommodated. If a calculation
-does not round to an integer at a rounding value of $14$ then it
-seems reasonable to conclude that it has \emph{really }not given an
-integer answer, not just that rounding errors have accumulated. If
-you want to change this `int-ifying' value for a particular calculation,
-then add a line to \texttt{numerica.cfg} like 
-\begin{lyxcode}
-intify-rounding~=~<integer>
-\end{lyxcode}
-Since \texttt{l3fp} works to $16$ significant figures, values of
-\verb`<integer>` greater than $16$ are pointless. Generally int-ifying
-rounding values will be less than but close to $16$ (although when
-testing the code I used some ridiculous values like $3$ or $4$).
-If other entries follow this one in the file, then conclude the line
-with a comma.
-
-\section{Parsing mathematical arguments}
-
-\label{sec:Argument-parsing} A main aim of the \texttt{numerica}
-package is to require minimal, preferably no, adjustment to the \LaTeX{}
-form in which an expression is typeset in order to evaluate it. But
-mathematicians do not follow codified rules of the kind programming
-languages insist on when writing formulas -- like parenthesizing
-the arguments of functions, or inserting explicit multiplication signs
-({*}) between juxtaposed terms. Hence the question of where the arguments
-of mathematical functions end is acute. For a few functions \LaTeX{}
-delimits the argument: think of \verb`\sqrt`, \verb`\frac`, \verb`\binom`;
-also \verb`^`. But for functions like \verb`\sin` or \verb`\tanh`
-or \verb`\ln`, unary functions, this is not so; nor is it for sums
-and products, and comparisons.
-
-Before discussing the parsing rules for different groups of functions,
-I discuss the means \texttt{numerica} provides to handle exceptions
-to those rules, when one \emph{does} need to make some adjustment
-to a formula.
-
-\subsection{The cleave commands \texttt{\textbackslash q} and \texttt{\textbackslash Q}}
-
-\label{subsec:parseCleave}The word \emph{cleave} has two opposed
-meanings: to adhere or cling to, and to split apart or separate. \texttt{numerica}
-defines two commands, \verb`\q` and \verb`\Q` to achieve these opposite
-effects. When a mathematical argument is being parsed, the \verb`\q`
-command joins the next token to the argument (\emph{cleaves to});
-the \verb`\Q` command severs the next token from the argument (\emph{cleaves
-apart}). Neither command is added to the argument nor leaves a visible
-trace in the output.
-
-Thus, without \verb`\q`, 
+places {\ttfamily\verb`<char(s)>`} after the display of
+everything else but within the environment delimiters. The default
+punctuation mark is the comma so that entering \verb`p` alone will
+produce a comma in the appropriate place. Since the settings option
+is a comma-separated list, this saves having to write \verb`p={,}`.
+Note that {\ttfamily\verb`<char(s)>`} need not be a single-character
+punctuation mark: 
 \begin{centred}
-\verb`\eval{$ \sin(n+\tfrac12)(x-t) $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
-\eval{$ \sin(n+\tfrac12)(x-t) $}[n=3,x=t+\pi,t=1.234],
+\verb`\eval[p=\ \text{(but no 8!)}]{\[ \frac{1}{81} \]}[9]` $\Longrightarrow$
+\eval[p=\ \text{(but no 8!)}]{\[ \frac{1}{81} \]}[9]
 \end{centred}
-which is $(\sin\tfrac{7}{2})\times\pi$. With \verb`\q` between the
-bracketed factors, 
-\begin{centred}
-\verb`\eval{$ \sin(n+\tfrac12)\q(x-t) $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
-\eval{$ \sin(n+\tfrac12)\q(x-t) $}[n=3,x=t+\pi,t=1.234],
-\end{centred}
-which is $\sin(\tfrac{7}{2}\pi)$. Similarly, without \verb`\q`, 
-\begin{centred}
-\verb`\eval[p]{\[ \cos\frac{2\pi}{T}n(t+\tfrac12T) \]}[T=2,t=1,n=3]`
-$\Longrightarrow$\eval[p]{\[ \cos\frac{2\pi}{T}n(t+\tfrac12T) \]}[T=2,t=1,n=3] 
-\end{centred}
-which is $(\cos\pi)\times3\times(1+\tfrac{1}{2}\times2)$. With \verb`\q`
-used twice, once after the fraction and once before the left parenthesis,
+For multi-formula commands punctuation may be desired not just after
+the final result (the \verb`p` setting) but also after the intermediate
+results. For these, use the setting
 \begin{verbatim}
-    \eval[p]{\[ 
-      \cos\frac{2\pi}{T}\q n\q(t+\tfrac12T)
-        \]}[T=2,t=1,n=3]
+    pp = <char(s)>
 \end{verbatim}
-$\Longrightarrow$     \eval[p]{\[ 
-      \cos\frac{2\pi}{T}\q n\q(t+\tfrac12T)
-        \]}[T=2,t=1,n=3]
+Like \verb`p`, the \verb`pp` setting defaults to a comma to avoid
+having to write \verb`pp={,}`. See the examples at §\ref{subsec:intoMultiFormulaPunctuation}
+and throughout this document.
 
-\noindent which is $\cos(\pi\times3\times2)$.
+\subsubsection{\texttt{\textbackslash\}}}
 
-It should be noted that for \emph{trigonometric }functions, because
-of their use in Fourier series especially, there is another way of
-handling arguments that contain parentheses (and fractions). This
-is discussed in §\ref{subsec:parseTrigFns} below.
-
-For the \verb`\Q` command which splits an argument we have, without
-it, 
-\begin{centred}
-\verb`\eval{$ 1/2e $}` $\Longrightarrow$\eval{$ 1/2e $},
-\end{centred}
-which is the reciprocal of $2e$, whereas with the \verb`\Q` command
-inserted before \verb`e`, 
-\begin{centred}
-\verb`\eval{$ 1/2\Q e $}` $\Longrightarrow$\eval{$ 1/2\Q e $},
-\end{centred}
-which is one half of $e$, although it is unlikely to be read that
-way. If one half of $e$ is intended then parenthesize the $1/2$
-or present as a \verb`\tfrac`.
-
-\subsubsection{Mnemonic}
-
-As mnemonic, best seen in sans serif for the Latin Modern fonts used
-in this document, think of the letter \textsf{q} as a circle \emph{cleaving
-to} a vertical descender; think of the letter \textsf{Q} as a circle
-\emph{cleaved apart} by the diagonal stroke.
-
-\subsection{Parsing groups}
-
-The arguments of different groups of functions are handled in different
-ways. The criterion used for deciding when an argument ends for one
-group will not be that used for others. Table §\ref{subsec:defaultsIntifyingRounding}
-lists the different groups that \texttt{numerica} takes account of.
-At the top are functions or operations that have the smallest reach
-when determining where their arguments end; at the bottom are operations
-that have the greatest reach. The denominator of a slash fraction
-is treated as a unary function and is assigned to group II. By default
-trigonometric functions are treated the same as other unary functions
-but there is a setting which enables the direct (rather than inverse)
-trigonometric functions to accept a wider range of arguments, as occurs
-in Fourier series. Hence they are separated into their own group.
-
-\begin{table}
-\centering
-
-\caption{Parsing groups}
-\label{tab:settingsParsing-groups} \texttt{{}{}}{\ttfamily{}%
-\begin{tabular}{ll}
-\toprule 
-{\small\texttt{group}} & {\small\texttt{function/operation}}\tabularnewline
-\midrule 
-{\small\texttt{I}} & {\small\texttt{surd, logical Not}}\tabularnewline
-{\small\texttt{II}} & {\small\texttt{unary functions (direct trig. functions default), /}}\tabularnewline
-{\small\texttt{III}} & {\small\texttt{direct trig. functions with special setting}}\tabularnewline
-{\small\texttt{IV}} & {\small\texttt{sums, products}}\tabularnewline
-{\small\texttt{V}} & {\small\texttt{comparisons}}\tabularnewline
-{\small\texttt{VI}} & {\small\texttt{logical And, logical Or}}\tabularnewline
-\bottomrule
-\end{tabular}}
-\end{table}
-
-A formula is a sequence of tokens and brace groups. All parsing occurs
-from the left, \LaTeX{} argument by \LaTeX{} argument, where \emph{argument}
-means either a token (an N-type argument in \texttt{expl3}-speak)
-or a brace group (an n-type argument). To distinguish \LaTeX{} arguments
-from mathematical arguments I shall when necessary refer to L-args
-and M-args. A mathematical argument may end \emph{at} an L-arg, meaning
-immediately before the L-arg, or end \emph{with} the L-arg, meaning
-immediately after the L-arg. Ending or not will in general depend
-on whether the argument is in \emph{first position} -- the position
-immediately following a function token like \verb`\sin` or \verb`\log`
--- or in \emph{general position} -- any later position (although
-for trigonometric functions we will also need to consider \emph{second}
-and even \emph{third }positions).
-
-For counting position, we need to allow for formatting elements and
-multi-token numbers -- in both decimal and scientific formats. Formatting
-elements do not change the position count. This applies to things
-like thin spaces or phantoms (and their arguments) or modifiers like
-\verb`\left` or \verb`\biggl`. Multi-token numbers (in decimal or
-scientific formats) are treated as single items; they advance the
-position count by exactly one. \LaTeX{} functions -- like \verb`\frac`
--- which take \LaTeX{} arguments again advance the position count
-only by one. Mathematically, the fraction is viewed as a single unit.
-
-I shall refer to a token or a token and its \LaTeX{} arguments --
-like \verb`\frac` and its arguments -- as an \emph{item}. Similarly,
-a (possibly multi-token) number is an item. Also it will help to distinguish
-tokens within brackets where both brackets lie to the right of a function
-from those that do not. The former I call \emph{clothed}; the latter
-are \emph{naked}. Thus the plus sign in $(\sin x+y)$ is naked relative
-to the sine (one bracket to the left of the function), but is clothed
-in $\sin(x+y)$ (both brackets to the right of the function).
-
-\subsubsection{Parsing group I}
-
-The only functions in this category are the surd and logical Not.
-
-Why distinguish the surd from other unary functions? Surely we all
-agree that \verb`\sin2\pi`, displaying as $\sin2\pi$, vanishes?
-The argument of the sine extends beyond the $2$ to include the $\pi$.
-But \verb`\surd2\pi`, displaying as $\surd2\pi$, is understood to
-be the product $\surd2\times\pi$. The argument of the surd ends with
-the $2$. The surd binds more tightly to its argument than is true
-of unary functions generally.
-
-For parsing group I 
-\begin{enumerate}
-\item if a left bracket is in first position, the mathematical argument
-ends with the matching right bracket; otherwise 
-\item the argument ends with the item in first position and any L- or M-args
-required by that item. 
-\end{enumerate}
-If the factorial sign \verb`!` \emph{preceded} its argument, it too
-would belong to this parsing state, for it also binds tightly like
-the surd. This means that an expression like $\surd4!$ is intrinsically
-ambiguous. Is it the square root of $24$ or the factorial of $2$?
-In \texttt{numerica} it produces the (perhaps rather odd) error 
-\begin{centred}
-\verb`\eval{$ \surd 4! $}` $\Longrightarrow$ \eval{$ \surd 4! $}
-\end{centred}
-The surd has seized the argument; there is nothing for the factorial
-to operate on. The same error arises if the $4$ is parenthesized,
-but parenthesizing like either \verb`(\surd 4)!` or \verb`\surd(4!)`
-repairs the situation. Because other unary functions (like the sine
-or logarithm) do not bind as tightly, this ambiguity does not arise
-for them.
-
-Exponents cause no problem because taking square roots and raising
-to a power are commutative operations -- the result is the same whichever
-is performed first. 
-\begin{centred}
-\verb`\eval{$ \surd 3^4 $}` $\Longrightarrow$ \eval{$ \surd 3^4 $}.
-\end{centred}
-
-\subsubsection{Parsing group II}
-
-In the default setup this category includes the trigonometric and
-hyperbolic functions, their inverses, the various logarithms and the
-exponential functions, the signum function \verb`\sgn`, and the denominators
-of slash fractions \verb`/`. Note however that there is a setting
-switch which enables trigonometric functions to handle parentheses
-in arguments more generally; see §\ref{subsec:parseTrigFns}. 
-\begin{itemize}
-\item In parsing group II we wish to accommodate usages like $\ln z^{n}=n\ln z$
-(\emph{HMF} 4.1.11), or $\gd z=2\arctan e^{z}-\frac{1}{2}\pi$ (\emph{HMF}
-4.3.117), defining the Gudermannian. The exponent is included in the
-argument. Considering $\ln(1+1/n)^{n}$ exponents must also be part
-of parenthesized arguments. 
-\item An approximation to Stirling's formula for the factorial is often
-written $\ln N!\approx N\ln N-N$ (widely used in texts on statistical
-mechanics). Hence the factorial sign should also be considered part
-of the argument. 
-\item $\ln xy=\ln x+\ln y$ means the argument must reach over a product
-of variables. Identities like $\sin2z=2\sin z\cos z$ mean the argument
-also reaches over numbers, and expressions like $\sin\tfrac{1}{2}\pi x$
-(\emph{HMF} 4.3.104) mean that it further reaches over \verb`\tfrac`-s
-and constants. 
-\item Essentially \emph{anything }can be in first position, and without
-parentheses; e.g. 
-\begin{itemize}
-\item unary functions: $\ln\ln z$ (\emph{HMF} 4.1.52), $\ln\tan\dfrac{z}{2}$
-(\emph{HMF} 4.3.116), 
-\item fractions: $\ln\dfrac{z_{1}}{z_{2}}$ (\emph{HMF} 4.1.9), $\arcsin\dfrac{(2ax+b)}{(b^{2}-4ac)^{1/2}}$
-(\emph{HMF} 3.3.36), $\ln\dfrac{\tan z}{z}$ (\emph{HMF} 4.3.73), 
-\item absolute values: $\ln\abs*{\dfrac{a+x}{a-x}}$ (\emph{HMF} 3.3.25), 
-\item square roots: $\arctan\sqrt{\dfrac{\nu_{1}}{\nu_{2}}F}$ (\emph{HMF
-}26.6.8) 
-\end{itemize}
-\end{itemize}
-With these examples in mind, for parsing group II 
-\begin{enumerate}
-\item if a left bracket is in first position, the mathematical argument
-ends with the matching right bracket and any attached exponent, or
-factorial or double factorial sign; otherwise 
-\item the mathematical argument includes the item in first position and
-any L- or M-args required by that item; 
-\begin{enumerate}
-\item if the item in first position is a number, variable, constant or \ \verb`\tfrac` 
-\begin{enumerate}
-\item the argument appends the next item if it is a number, variable, constant
-or \verb`\tfrac`, and so on recursively; or 
-\item the argument appends the next item if it is an exponent, or facorial
-or double factorial sign, and ends there; otherwise 
-\item the argument ends. 
-\end{enumerate}
-\item if the item in first position is not a number, variable, constant
-or \verb`\tfrac` 
-\begin{enumerate}
-\item the argument appends the next item if it is an exponent, or factorial
-or double factorial sign, and ends there; otherwise 
-\item the argument ends. 
-\end{enumerate}
-\end{enumerate}
-\end{enumerate}
-An argument may extend over (see 2(a)i) numbers, constants, variables
-and \verb`\tfrac`-s, as instanced with $\sin2\tfrac{p}{q}\pi x$
-which exhibits all elements.
-
-Illustrating 1, the exponent is included in the argument but not the
-following variable: 
-\begin{centred}
-\verb`\eval{$ \log_{10}(1+2+3+4)^3n $}[n=5]` $\Longrightarrow$ \eval{$ \log_{10}(1+2+3+4)^3n $}[n=5].
-\end{centred}
-For the sake of the reader, and as one naturally does in any case
-to avoid ambiguity, the formula should be written with the variable
-$n$ preceding the logarithm: $n\log_{10}(1+2+3+4)^{3}$. The way
-the example is written suggests that the writer wished the $n$ to
-be considered part of the argument of the logarithm. If that is the
-case, inserting a \verb`\q` command before \verb`n` would achieve
-this, but that would still be confusing for the reader of the pdf.
-Inserting parentheses is the only sensible thing to do.
-
-Illustrating 2(a)ii, again the exponent is included in the argument
-but not the following variable: 
-\begin{centred}
-\verb`\eval{$ \log_{10}m^3n $}[m=10,n=5]` $\Longrightarrow$ \eval{$ \log_{10}m^3n $}[m=10,n=5]
-\end{centred}
-Again, for the sake of the reader and as one naturally does to avoid
-ambiguity, the variable $n$ should precede the logarithm. If in fact
-the intention was for the $n$ to be included in the argument of the
-logarithm, then again the \verb`\q` command could be used or, better
-in this case, the $n$ could be shifted to precede the $m$, which
-illustrates 2(a)i: 
-\begin{centred}
-\verb`\eval{$ \log_{10}nm^3 $}[m=10,n=5]` $\Longrightarrow$ \eval{$ \log_{10}nm^3 $}[m=10,n=5]
-\end{centred}
-the logarithm of $5000$, or better still, $m^{3}n$ could (and should)
-be parenthesized for the sake of the reader.
-
-Why the difference between $nm^{3}$ where $n$ and $m^{3}$ are included
-in the argument, and $m^{3}n$ where $n$ is not? Any criterion is
-going to miss some instances where a different outcome might be desirable.
-Where an argument ends is affected by visual appearance in the pdf.
-It is simple and easy to remember if it is understood that anything
-that breaks the `visual flow' of juxtaposed numbers, variables, constants
-and \verb`\tfrac`-s ends the argument. An exponent does just that.
-If you feel there is ambiguity, parenthesize to clarify.
-
-Illustrating 2(b)ii, the argument stops with the \verb`\dfrac` and
-its arguments and does not extend to the following constant: 
-\begin{centred}
-\verb`\eval{$ \sin\dfrac12\pi $}` $\Longrightarrow$ \eval{$ \sin\dfrac12\pi $}.
-\end{centred}
-Obviously, someone writing an expression like this intends the $\pi$
-to be part of the argument. In that case, a \verb`\tfrac` should
-be used since the \verb`\dfrac` breaks the `visual flow' of the argument.
-\begin{description}
-\item [{Fractions}] ~
-
-But why not a plain \verb`\frac`? After all, for an inline expression
-it displays in the same way as a \verb`\tfrac`. I considered making
-the argument-behaviour of \verb`\frac` the same as \verb`\tfrac`
-for text-style contexts, and the same as \verb`\dfrac` for display-style
-contexts, but that would have meant the same expression evaluating
-to different results depending on whether it lay between \verb`$ $`
-or \verb`\[ \]` delimiters, which ruled it out. Because \verb`\frac`
-sometimes displays as \verb`\dfrac`, it is treated like \verb`\dfrac`
-(but see §\ref{subsec:parseTrigFns}, specifically \texttt{()=2}). 
-\item [{Slash~fractions}] ~
-
-It is easy to write ambiguous expressions using the slash $/$ to
-indicate fractions or division. How should $\pi/2n$ be interpreted?
-With from-the-left evaluation and calculator precedence rules which
-give equal precedence to {*} (multiplication) and / (division), this
-would be interpreted as $(\pi/2)\times n$, but most people will instinctively
-interpret it as $\pi/(2n)$. By placing \verb`/` in parsing group
-II, this is what \texttt{numerica} does. It treats the right-hand
-argument of the slash \emph{as if it were the argument of a named
-function}. This means that $1/2\sin(\pi/6)$ is parsed as $(1/2)\sin(\pi/6)$
-rather than as $1/(2\sin(\pi/6))$. It also means that $1/2\exp(1)$
-and $1/2e$ give different results, which (in the author's view) is
-acceptable since they display differently and are not instinctively
-read in the same way. 
-\end{description}
-
-\subsubsection{Parsing group III}
-
-\label{subsec:parseTrigFns}By default trigonometric functions are
-set to parsing group II. This accommodates many instances of how arguments
-are used with these functions, but Fourier series in particular require
-more. For them we need to take account of how \emph{parentheses} are
-used in arguments. I find $\tan\tfrac{1}{2}(A+B)$ (\emph{HMF }4.3.148),
-$\sec\pi(\tfrac{1}{4}+\tfrac{1}{2}az)$ (\emph{HMF }19.3.3), $\cos(2m+p)z$
-(\emph{HMF }20.2.3), $\sin(2n+1)v$ (\emph{HMF }16.38.1). Looking
-through various texts discussing Fourier series it is easy to find
-examples like 
-\[
-\cos\frac{2\pi}{T}nt,\quad\cos\frac{2\pi}{T}n(t+\tfrac{1}{2}T),
-\]
-and 
-\[
-\cos(N+\tfrac{1}{2})\frac{2\pi\tau}{T},\quad\sin2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right).
-\]
-In the last of these \verb`\left` and \verb`\right` have been used
-to enlarge the parentheses.
-
-All these usages can be accommodated by adjusting a setting in the
-settings option (§\ref{sec:settingsOption}) of the \verb`\eval`
-command: 
-\begin{lyxcode}
-()~=~<integer>
-\end{lyxcode}
-where \texttt{<integer>} is one of \texttt{0, 1, 2}.
-
-\noindent{}%
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-I remain unsure whether to persist with the \texttt{()} setting. A
-principal aim of \texttt{numerica} is to avoid having to modify a
-formula to bring it into a form that can be evaluated. The \texttt{()}
-setting arose in that context, but it complicates the code and may
-well confuse the user. Inserting cleave functions, \texttt{\textbackslash q}
-or \texttt{\textbackslash Q}, to achieve the same effects does mean
-modifying formulas, but is straightforward and easier to understand.
-(And \texttt{\textbackslash q} and \texttt{\textbackslash Q} have
-no visual effect.)\end{shaded}%
-\end{minipage}
-
-\noindent For convenience of statement in what follows call parentheses,
-square brackets or braces \emph{brackets}. If preceded by a \noindent\verb`\left`
-or \noindent\verb`\right` or \noindent\verb`\biggl` or \noindent\verb`\biggr`
-etc. modifier, call them \emph{Brackets}, with an uppercase `B'. Modifiers
-do not contribute to the position count, so that a left Bracket in
-first position means the modifier and left bracket are both considered
-to be in first position. When it is immaterial whether it is a bracket
-or a Bracket I write b/Bracket. The rules that follow do not prescribe
-what mathematicians \emph{ought} to do but are intended to be descriptive
-of certain patterns of mathematical practice as discerned in \emph{HMF}
-and a number of texts (about half a dozen) on Fourier series. 
-\begin{description}
-\item [{\texttt{()=0}}] is the \emph{default} setting, parsing group II
-behaviour; b/Brackets are included in the argument only if 
-\begin{itemize}
-\item the left b/Bracket is in first position; 
-\begin{itemize}
-\item if the first item beyond the matching right b/Bracket is an exponent,
-or factorial or double factorial sign, it is appended to the argument,
-which ends there, otherwise 
-\item the argument ends with the right b/Bracket. 
-\end{itemize}
-\end{itemize}
-\end{description}
-The default setting allows things like $\sin\tfrac{1}{2}a$, $\cos2\pi nt$
-and $\tan(A+B)$. It does \emph{not} encompass examples like $\tan\tfrac{1}{2}(A+B)$
-or $\cos2(n+\tfrac{1}{2})\pi$. For that we need the setting \verb`()=1`: 
-\begin{description}
-\item [{\texttt{()=1}}] includes a b/Bracketed expression in the argument,
-provided 
-\begin{itemize}
-\item the left Bracket is in first position; 
-\begin{itemize}
-\item if the first item beyond the matching right Bracket is an exponent,
-or factorial or double factorial sign, it is appended to the argument,
-which ends there, otherwise 
-\item the argument ends with the right Bracket. 
-\end{itemize}
-\item or the item in first position is a number, variable, constant or \verb`\tfrac`
-and the left bracket is in second position; 
-\begin{itemize}
-\item if the first item beyond the matching right bracket is an exponent,
-or factorial or double factorial sign, it is appended to the argument,
-which ends there, or 
-\item if the first item beyond the matching right bracket is a number, variable,
-constant, or \verb`\tfrac` it is appended to the argument, and so
-on recursively, until 
-\begin{itemize}
-\item an exponent, or factorial or double factorial sign is met, which is
-appended to the argument which ends there, or 
-\item an item is met which is \emph{not} an exponent, or factorial or double
-factorial sign, or a number, variable, constant or \verb`\tfrac`,
-at which point the argument ends, or 
-\item the end of the formula is reached. 
-\end{itemize}
-\end{itemize}
-\end{itemize}
-\end{description}
-With the \verb`()=1` setting, the arguments of $\tan\tfrac{1}{2}(A+B)$,
-$\sec\pi(\tfrac{1}{4}+\tfrac{1}{2}az)$, $\cos(2m+p)z$, $\sin(2n+1)v$
-are all accommodated, as is $\sin\tfrac{1}{2}(m+n)\pi$ with items
-on both sides of the parentheses. But, note, there must be at most
-\emph{one} item before the left parenthesis: 
-\begin{centred}
-\verb`\eval[()=1]{$ \sin\tfrac16(m+n)\pi $}[m=1,n=2]` $\Longrightarrow$
-\eval[()=1]{$ \sin\tfrac16(m+n)\pi $}[m=1,n=2].
-\end{centred}
-whereas, with two items before the left parenthesis, 
-\begin{centred}
-\verb`\eval[()=1]{$ \sin2\tfrac1{12}(m+n)\pi $}[m=1,n=2]`. $\Longrightarrow$
-\eval[()=1]{$ \sin2\tfrac1{12}(m+n)\pi $}[m=1,n=2].
-\end{centred}
-Whatever the \verb`()` setting, \texttt{numerica} does not check
-what is included between the parentheses (or brackets generally) --
-it could be anything. However inserting \verb`\left`, \verb`\right`
-or other modifiers before the parentheses restricts the argument of
-the sine in this example, despite the \verb`()=1` setting, to the
-\verb`\tfrac`: 
-\begin{centred}
-\verb`\eval[()=1]{$ \sin\tfrac16\left(m+n\right)\pi $}[m=1,n=2]`
-$\Longrightarrow$ \eval[()=1]{$ \sin\tfrac16\left(m+n\right)\pi $}[m=1,n=2].
-\end{centred}
-Although \verb`()=1` serves well for the kinds of expressions and
-identities involved in trigonometry, perusal of any text on Fourier
-series will show it does not cover the kinds of expressions met there.
-For that we need 
-\begin{description}
-\item [{\texttt{()=2}}] includes a b/Bracketed expression in the argument
-provided 
-\begin{itemize}
-\item the left b/Bracket is in first position, or the item in first position
-is a number, variable, constant, \verb`\dfrac`, \verb`\frac` or
-\verb`\tfrac` and the left b/Bracket is in second position, or the
-items in first and second positions are numbers, variables, constants,
-\verb`\dfrac`-s, \verb`\frac`-s or \verb`\tfrac`-s and the left
-b/Bracket is in third position; 
-\begin{itemize}
-\item if the first item beyond the matching right b/Bracket is an exponent,
-or factorial or double factorial sign, it is appended to the argument,
-which ends there, or 
-\item if the first item beyond the matching right b/Bracket is a number,
-variable, constant, \verb`\dfrac`, \verb`\frac` or \verb`\tfrac`
-it is appended to the argument, and so on recursively, until 
-\begin{itemize}
-\item an exponent, or factorial or double factorial sign is met, which is
-appended to the argument which ends there, or 
-\item an item is met which is \emph{not} an exponent, or factorial or double
-factorial sign, or a number, variable, constant, \verb`\dfrac`, \verb`\frac`
-or \verb`\tfrac`, at which point the argument ends, or 
-\item the end of the formula is reached. 
-\end{itemize}
-\end{itemize}
-\end{itemize}
-\end{description}
-\verb`()=2` draws no distinction between brackets and Brackets. It
-allows all \verb`()=1` possibilities but also \emph{two }items (of
-a suitable kind) before a left b/Bracket; it also treats \verb`\dfrac`-s
-and \verb`\frac`-s like \verb`\tfrac`-s for determining the scope
-of arguments.
-
-The following examples are taken from different texts on Fourier series.
-The first shows a \verb`\frac` being included in the argument, the
-second shows \emph{two} items -- including a \verb`\frac` -- preceding
-the left parenthesis, the third shows a \verb`\frac` to the right
-of the parentheses, and the fourth shows parentheses using \verb`\left`-\verb`\right`
-modifiers with two items preceding them: 
-\[
-\cos\frac{2\pi}{T}nt,\quad\cos\frac{2\pi}{T}n(t+\tfrac{1}{2}T),\quad\text{\ensuremath{\sin(N+\tfrac{1}{2})\frac{2\pi\tau}{T}}\ensuremath{\quad}and}\quad\sin2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right).
-\]
-All these usages are accommodated by the \verb`()=2` setting. For
-instance 
+\label{subsec:settingsEnvironments-=00005C=00007D}Some environments
+must lie within another math environment to be used. These environments
+– the AMS \verb`-ed` environments, the \verb`cases` and \verb`dcases`
+environments, and the \verb`array` environment – allow one to `collect'
+results of a multi-formula calculation within a large right delimiter
+– usually a right brace – and follow that with the vv-list. The setting
+for this is \verb`\}`:
 \begin{verbatim}
-    \eval[p,()=2]{ 
-        \[ \sin(N+\tfrac12)\frac{2\pi\tau}T \]
-      }[N=1,\tau=2,T=3]
+    \} = <space-spec><right-delimiter>
 \end{verbatim}
-$\Longrightarrow$     \eval[p,()=2]
-      { 
-        \[ \sin(N+\tfrac12)\frac{2\pi\tau}T \]
-      }[N=1,\tau=2,T=3]
-
-\noindent which is the sine of $2\pi=(\tfrac{3}{2})\times(\tfrac{4}{3}\pi)$
-where a \noindent\verb`\frac` trailing the parentheses has been included
-in the argument, and \emph{not }$(\sin\tfrac{3}{2})(\tfrac{4}{3}\pi)$.
-Or consider 
+Here \verb`<space-spec>` is either a single token or a brace group
+defining a space between the numerical results and the right delimiter.
+\verb`<right-delimiter>` is any right delimiter that responds to
+the command \verb`\right` of a \verb`\left` \verb`\right` pair;
+that includes a dot, \verb`.` , if you want no delimiter. The default
+specification is \verb`\}=\ \}`. In the following example an \verb`alignedat`
+environment is used to align numerical results containing a minus
+sign. The \verb`pp` and \verb`p` settings place commas after the
+ results, not after the vv-list. The full stop there is manually inserted
+after the number-format option (and before the \verb`\]`). The example
+shows how to suppress the needless repetition of the vv-list that
+otherwise accompanies display of a multi-formula result. If so wished,
+the three calculations could be collectively numbered by a single
+equation number.
 \begin{verbatim}
-    \eval[p,()=2]{\[ 
-         \sin2\pi\left(\frac{x}{\lambda}
-            -\frac{t}{T}\right) 
-      \]}[x=1,\lambda=2,t=3,T=4]
+   \[
+      \eval[env=alignedat,pp,p,\}=.,vv=\qquad(vv),ff] 
+        { \sin nx, \cos (n+1)x, \tan x }
+           [n=2,x=\pi/6][*].
+    \]
 \end{verbatim}
-$\Longrightarrow$     \eval[p,()=2]
-      {\[ 
-         \sin2\pi\left(\frac{x}{\lambda}
-            -\frac{t}{T}\right) 
-      \]}[x=1,\lambda=2,t=3,T=4]which is the sine of $-\tfrac{1}{2}\pi=2\pi\times(-\tfrac{1}{4})$
-where there are two items before the parentheses and \verb`\left`
-and \verb`\right` modifiers, and \emph{not} $\sin2\pi$ times the
-parenthesised expression.
+$\Longrightarrow$     \[
+      \eval[env=alignedat,pp,p,\}=.,vv=\qquad(vv),ff]
+        { \sin nx, \cos (n+1)x, \tan x }
+          [n=2,x=\pi/6][*].
+    \]
 
-However a usage like $\sin(n+\tfrac{1}{2})(x-t)$, noted in two different
-texts, is not available without explicit use of the \verb`\q` command
-between the parenthesized groups.
+\section{Deprecated and obsolete settings}
 
-\subsubsection{Parsing group IV}
+\label{sec:settinsDeprecatedObsoleteOptions}
+\begin{description}
+\item [{\texttt{vvi,~vvd}}] These settings have been superseded by the
+\verb`vv` setting as a result of the enhanced treatment of environments
+in version 3.0.0 of \texttt{numerica}; see immediately above. Both
+\verb`vvi` and \verb`vvd` settings are now treated as alternative
+(but deprecated) names for \verb`vv`.
+\item [{\texttt{{*}}}] In version $2$ of \texttt{numerica} this key was
+used to suppress equation numbering when the \verb`vvd` specification
+contained a newline character. If \verb`\\` was present in \verb`vvd`,
+it triggered replacement of whatever math delimiters were enclosed
+by the \verb`\eval` command with a \verb`multline` environment.
+The star {*} then converted the \verb`multline` into a \verb`multline*`.
+This is all now superseded by the enhanced treatment of environments.
+\item [{\texttt{()}}] Earlier versions of \texttt{numerica} used this setting
+to adjust how `expansively' the arguments of trigonometric functions
+were read, with the arguments of such functions in Fourier series
+in mind. Version 3.0.0 of \texttt{numerica} has dispensed with the
+setting and now recommends using \LaTeX{} braces to delimit such arguments.
+See the general discussion at §\ref{subsec:evalBraced-groups}, and
+more specific discussion at §\ref{subsec:calcComplicated-arguments}.
+\item [{\texttt{reuse}}] In earlier versions of \texttt{numerica} this
+setting determined exactly what was saved with the next \verb`\reuse`
+command. Now only the `naked' numerical result is saved, although
+it may be in scientific notation or fraction form; see §\ref{subsec:supplReuseEvalSetting}.
+\end{description}
 
-The only members of this group are \verb`\sum` and \verb`\prod`.
-
-For parsing group IV 
-\begin{enumerate}
-\item the argument ends 
-\begin{enumerate}
-\item at the first naked plus or minus sign encountered, or 
-\item at the first comparison sign or comparison command encountered, or 
-\item at the first logical And or logical Or sign encountered, or 
-\item at the end of the formula. 
-\end{enumerate}
-\end{enumerate}
-In practice this means mainly (a) and (d), and seems to be the instinctive
-practice. \emph{HMF} has multiple examples in multiple chapters of
-the argument to a sum ending at a naked plus sign: 7.3.12 \& 7.3.14,
-9.1.11 \& 9.1.77, 9.6.35 \& 9.6.43, 11.1.9, \ldots{} (at that point
-I stopped looking). They were all of the form 
-\[
-\sum\text{argument}+\ldots
-\]
-A minus sign serving the same purpose was harder to find but \emph{HMF}
-10.4.65 \& 10.4.67 are two instances. I considered whether a \verb`\times`
-or slash fraction sign \verb`/` might end the argument of a sum,
-but surely we need to allow things like $\sum1/n^{2}$ which rules
-out the slash and \emph{HMF} 9.9.11 provides two of a number of instances
-in \emph{HMF} of sum arguments continuing past explicit \verb`\times`
-signs (at line breaks when a summand spills onto a second line).
-
-Because they are evaluated using the same code as sums I (unthinkingly)
-placed products with sums but doubts later intruded. In \emph{HMF}
-products occur only occasionally and are almost all of the form 
-\[
-\prod\left(\text{argument}\right)
-\]
-where the argument is bracketed (often with \verb`\left \right` modifiers)
-and the multiplicand ends with the right bracket. At least twice (\emph{HMF
-}6.1.25 and 24.2.2.1) an exponent ($-1$) is attached to the right
-bracket and the argument ends there. Looking further afield, a text
-on number theory has examples where the argument of the product extends
-to \emph{three} parenthesised factors, $\prod\left(\text{arg}1\right)\left(\text{arg2}\right)\left(\text{arg3}\right)$
-and a number of others where it extends to two. A text on theory of
-functions has 
-\[
-\prod_{n=1}^{\infty}\left(1+\frac{z}{n}\right)e^{z/n}
-\]
-although \emph{HMF}, for the same expression, encloses the two factors
-within (large) square brackets, as if some ambiguity existed as to
-how far the reach of the \verb`\prod` extended.
-
-\emph{Tentatively} I retain products here in the same group as sums.
-
-\subsubsection{Parsing group V}
-
-Comparison symbols compose this group: \texttt{=}, \texttt{<}, \texttt{>},
-\verb`\ne`, \verb`\le`, \verb`\ge`, \verb`\leq`, \verb`\geq`,
-and the various comparison commands from the \texttt{amssymb} package
-listed in §\ref{subsec:evalAmssymb-comparisons}. Because of the way
-\texttt{numerica} handles comparisons, it is the argument on the right-hand
-side of the relation that needs determining.
-
-For parsing group V 
-\begin{enumerate}
-\item the argument ends at 
-\begin{enumerate}
-\item the first logical And or logical Or encountered, or 
-\item the first comparison sign or command encountered, or 
-\item the end of the formula. 
-\end{enumerate}
-\end{enumerate}
-
-\subsubsection{Parsing group VI}
-
-Logical And and logical Or are the sole members of this group. It
-is the right-hand side of the And or Or command that needs determining.
-
-For parsing group VI 
-\begin{enumerate}
-\item the argument ends at 
-\begin{enumerate}
-\item the first logical And or logical Or encountered, or 
-\item the end of the formula. 
-\end{enumerate}
-\end{enumerate}
-
-\subsubsection{Disclaimer}
-
-The parsing rules of the different groups are not normative; they
-are not statements of how mathematical formulas should be written.
-Rather they are attempts to discern regularities in how mathematicians
-often do write formulas. It is \emph{how things look in the pdf},
-not \LaTeX , that is the guide. You are always free to parenthesize
-as you see fit and to insert cleave commands (\verb`\q` or \verb`\Q`)
-to force outcomes.
-
-(But note that parenthesizing has its limits. For sums, writing 
-\[
-\sum\left(\mathtt{<stuff>}\right)\mathtt{<more\ stuff>}
-\]
-does not necessarily end the summand at the right parenthesis: it
-ends at the first naked $+$ or $-$ sign, or \verb`\Q` command,
-encountered.)
-
-The rule should always be to write expressions that are clear to the
-reader of the pdf. An expression that is ambiguous to the reader,
-even if it fits within the parsing rules, is to be deprecated. The
-\emph{intent} is that \verb`\eval` can parse unambiguous expressions
-correctly.
-
 \chapter{Supplementary commands}
 
 \label{chap:Supplementary-commands}This chapter introduces four commands,
-\verb`\nmcInfo` (which we have already met), \verb`\nmcMacros`,
+\verb`\nmcInfo` (met already in relation to infinite sums), \verb`\nmcMacros`,
 \verb`\nmcConstants` and \verb`\nmcReuse`, supplementary to the
 principal command \verb`\nmcEvaluate`. They use the same machinery
 as \verb`\nmcEvaluate` and so have the same syntax. If all arguments
-are present it is 
+are present it is
 \begin{centred}
-\verb`\nmc<cmd>*[settings]{main arg}[vv-list][rounding]`
+\noindent\verb`\nmc<cmd>*[settings]{main arg}[vv-list][rounding]`
 \end{centred}
 where \verb`<cmd>` is one of \verb`Info`, \verb`Macros`, \verb`Constants`
 and \verb`Reuse`. All four commands have short-name forms: \verb`\info`,
@@ -4207,45 +4810,41 @@
 
 Generally the final two optional arguments will not be used. The user
 should be aware of this if following a command with a square bracketed
-expression -- the expression will be absorbed without trace unless
-it is preceded by, for example, an empty brace pair.
+expression – the expression will be absorbed without trace unless
+it is preceded by, for example, an empty brace pair. Because the commands
+share the machinery of \verb`\nmcEvaluate`, the \verb`dbg`, \verb`view`
+and functional settings discussed in the previous chapter (Chapter~\ref{chap:settingsSettings})
+for the \verb`\eval` command are also available for these commands,
+although many will be without effect. 
 
-Because the commands share the machinery of \verb`\nmcEvaluate`,
-the settings discussed earlier (Chapter~\ref{chap:Settings}) for
-the \verb`\eval` command are also available for these commands, although
-they will, in the main, be irrelevant. The `debug' code has been used
-by the \verb`view` setting of some of these supplementary commands
-to produce its effects.
-
 The starred form of command is available in all four cases and in
-all cases produces a pure number. If both star and \verb`view` are
-used at the same time, the \verb`view` setting prevails over starring.
+all cases produces a pure number. If both star ( \verb`*` ) and \verb`view`
+are used at the same time, the \verb`view` setting prevails over
+starring.
 
 \section{Feedback on \textquoteleft infinite\textquoteright{} processes:\texttt{ \textbackslash nmcInfo}}
 
-\label{sec:supplInfo}Used after the evaluation of an `infinite' process,
-the \verb`\nmcInfo` command, or its short-name form \verb`\info`
+\label{sec:supplInfo}Used after the evaluation of an `infinite'
+process, the \verb`\nmcInfo` command, or its short-name form \verb`\info`,
 will tell you how many terms or factors or other operations\footnote{It also applies to the commands \texttt{\textbackslash nmcIterate
 }and \texttt{\textbackslash nmcSolve} from the \texttt{numerica-plus
-}package and to derivatives and integrals from the \texttt{numerica-calculus}
-package.} were needed to arrive at the result.The main argument contains an
+}package.} were needed to arrive at the result.The main argument contains an
 identifier for the `infinite' process: 
-\begin{lyxcode}
-\textbackslash nmcInfo\{<arg>\}~
-\end{lyxcode}
-(or \verb`\info{<arg>}`) where, at this stage, \verb`<arg>` is either
-\verb`sum` or \verb`prod`. The display, as we have seen in earlier
-examples, is a number followed by a space then a descriptor. For \verb`sum`
-and \verb`prod` the descriptors are \verb`terms` and \verb`factors`.
-Starring \verb`\nmcInfo` -- \verb`\nmcInfo*{arg}` or \verb`\info*{arg}`
--- suppresses the descriptor and leaves only the number. This allows
-the starred form to be nested in an \verb`\eval` command, which might
-sometimes be convenient.
+\begin{verbatim}
+    \nmcInfo{<arg>} 
+\end{verbatim}
+(or, using the short-name form, \verb`\info{<arg>}`) where, at this
+stage, \verb`<arg>` is either \verb`sum` or \verb`prod`. The display,
+as we have seen in earlier examples, is a number followed by a space
+then a descriptor. For \verb`sum` and \verb`prod` the descriptors
+are \verb`terms` and \verb`factors` respectively. Starring \verb`\nmcInfo`
+– \verb`\nmcInfo*{arg}` or \verb`\info*{arg}` – suppresses the descriptor
+and leaves only the number. 
 
 As an example, let's test `the hard way' a standard identity, $\cosh^{2}x-\sinh^{2}x=1$.
 We know that $\cosh x=\sum_{n=0}^{\infty}\frac{x^{2n}}{(2n)!}$ and
 $\sinh x=x\prod_{k=1}^{\infty}\left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)$.
-The difference of their squares should be $1$: 
+The difference of their squares should be $1$:
 \begin{verbatim}
     \eval{\[  
       \left[\sum_{n=0}^{\infty}
@@ -4254,100 +4853,93 @@
         \left[x\prod_{k=1}^{\infty}
           \left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)
         \right]^2
-      \]}[x=1][3] \info{sum},\quad \info{prod}
+      \]}[x=1][3] \info{sum},\quad \info{prod}.
 \end{verbatim}
 $\Longrightarrow$     \eval{\[  
       \left[\sum_{n=0}^{\infty}
-        \frac{x^{2n}}{(2n)!}
-      \right]^2-
-        \left[x\prod_{k=1}^{\infty}
-          \left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)
-        \right]^2
-      \]}[x=1][3] \info{sum},\quad \info{prod}.
+        \frac{x^{2n}}{(2n)!}\right]^2-
+      \left[x\prod_{k=1}^{\infty}
+        \left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)
+    \right]^2
+        \]}[x=1][3] \info{sum},\quad\info{prod}.
 
 Nearly right. Obviously the product converges only slowly which is
-where the error comes from (see the discussion in §\ref{sec:settingsInfiniteSumsProds},
+where the error comes from (see the discussion in §\ref{sec:calcStoppingCriterion},
 where we needed the extra rounding setting \texttt{P+=3} and $350$
 factors to get a correct 3-figure value). The point of the example
 is to show the information command being used for both sum and product
-in the one evaluation. One does not exclude the other.
+in the one evaluation. One does not exclude the other. 
 
-\subsection{Suppressing the descriptor: \texttt{\textbackslash nmcInfo{*}}}
-
 The starred form of the \verb`\info` command suppresses the descriptor
-(`terms', `factors') and gives a purely numerical result: 
+(`terms' or `factors') and gives a purely numerical result: 
 \begin{verbatim}
     \eval{$
       \sum_{k=0}^{\infty}\binom \alpha k x^k
-        $}[x=1/2,\alpha=3], 
-    requiring $ \info*{sum}-1 $ additions. 
+        $}[x=1/2,\alpha=3],\\ \\ 
+    requiring \eval{$ \info*{sum}-1 $}\  additions. 
 \end{verbatim}
 $\Longrightarrow$     \eval{$
       \sum_{k=0}^{\infty}\binom \alpha k x^k
-        $}[x=1/2,\alpha=3], 
-    requiring $ \info*{sum}-1 $ additions.  (Four terms summed, therefore $3$ additions.)
+         $}[x=1/2,\alpha=3],\\ \\
+requiring \eval{$ \info*{sum}-1 $}\ additions. In fact the starring is unnecessary in this example since all nested
+commands are now treated as if they were starred.
 
 \subsection{Errors}
 
 Should the \emph{wrong} argument be used in the \verb`\nmcInfo` command,
-no harm is done: 
+no harm is done:
 \begin{verbatim}
-    \eval{$
-      \sum_{k=0}^{\infty}\binom \alpha k x^k
-         $}[x=1/2,\alpha=3], \ \info{prod}
+    \eval{$ \sum_{k=0}^{\infty}\binom \alpha k x^k $}
+         [x=1/2,\alpha=3], \ \info{prod} 
 \end{verbatim}
-$\Longrightarrow$     \eval{$
-      \sum_{k=0}^{\infty}\binom \alpha k x^k
-         $}[x=1/2,\alpha=3], \ \info{prod}.\medskip{}
+$\Longrightarrow$  \eval{$ \sum_{k=0}^{\infty}\binom \alpha k x^k $}[x=1/2,\alpha=3],\ \info{prod}.\medskip{}
 
-$119$ \emph{factors}? The information command is remembering a previous
+$119$ \emph{factors}? We were evaluating a sum but used \verb`prod`
+as the argument of the \verb`\info` command which remembers a previous
 result, the last time \verb`prod` was used as its argument. Changing
 the argument from \verb`prod` to \verb`sum` reveals the correct
 number of \emph{terms}.
 
-Should a non-existent argument be used, an error message is generated: 
+Should a non-existent argument be used, an error message is generated:
 \begin{verbatim}
     \eval{$ 
       \sum_{k=0}^{\infty}\binom \alpha k x^k 
          $}[x=1/2,\alpha=3], \\ \info{Fred} 
 \end{verbatim}
-$\Longrightarrow$     \eval{$ 
-      \sum_{k=0}^{\infty}\binom \alpha k x^k 
-         $}[x=1/2,\alpha=3], \\ \info{Fred} 
+$\Longrightarrow$  \eval{$ \sum_{k=0}^{\infty}\binom \alpha k x^k $}[x=1/2,\alpha=3],\\ \\ \info{Fred}
 
 \subsection{\texttt{view} setting}
 
-As noted at the start of this chapter, \verb`\nmcInfo` uses the `machinery'
-of \verb`\nmcEvaluate`. Most of the settings available for \verb`\eval`
-are also available for \verb`\info` but of these only one seems relevant:
-the \verb`dbg` setting. However, rather than use the obscure \verb`dbg=<integer>`
-(which is possible), it suffices to enter \verb`view` in this argument: 
+Only two settings seem relevant for \verb`\info`: the \verb`dbg`
+and \verb`view` settings. Rather than use the obscure \verb`dbg=<integer>`
+(which is possible), it suffices to enter \verb`view` in the settings
+option:
 \begin{centred}
-\verb`\info[view]{}` $\Longrightarrow$ \info[view]{}
+\verb`\info[view]{}` $\Longrightarrow$ \info[view] {}
 \end{centred}
 The result is a display of all the current values of all the `infinite'
-processes available. All such values are initialized to $0$. (Further
-processes \verb`iter` and \verb`solve` become relevant if the \texttt{numerica-plus}
-package is used.)
+processes available. (Further processes become available if the \texttt{numerica-plus}
+package is used.) The mandatory but empty braces can be filled with
+\verb`sum`, \verb`prod` or even \verb`Fred` but it makes no difference;
+the display is always of the current values of all `infinite' processes
+\texttt{numerica} knows about. If there has been no sum or product
+evaluated, the displayed value is conventionally shown as zero.
 
 \section{User-defined macros: \texttt{\textbackslash nmcMacros}}
 
-\label{sec:supplMacros}The \verb`\nmcMacros` and \verb`\nmcConstants`
-commands were prompted by a question on \TeX{} Stack Exchange.\cprotect\footnote{A question from Giacomo Petrillo on \TeX{} Stack Exchange and a response
-by `egreg' prompted the introduction of the \cprotect\texttt{\textbackslash nmcMacros}
-and \cprotect\texttt{\textbackslash nmcConstants} commands. See \url{https://tex.stackexchange.com/questions/602993/use-macros-in-numerica-vv-list/602998#602998}} Some time later the maintainer of the \verb`mandi` package\footnote{The maintainer is Joe Heafner, who explains that `mandi' is an abbreviation
-of `matter and interactions' after a physics textbook of that name
-(by different authors). Among other things, the package defines a
-long list of macros, each containing the value of a physical constant.} approached me with a similar problem. Suppose one has defined a macro
-to contain a value, say 
+\label{sec:supplMacros}The \verb`\nmcMacros` command was prompted
+by a question on \TeX{} Stack Exchange.\cprotect\footnote{See \url{https://tex.stackexchange.com/questions/602993/use-macros-in-numerica-vv-list/602998#602998}}
+Some time later the maintainer of the \verb`mandi` package approached
+me with a similar problem. Suppose one has defined a macro to contain
+a value, say 
 \begin{itemize}
-\item \verb`\def\myvalue{0.35}`, or 
-\item \verb`\newcommand\myvalue{0.35}`, or 
-\item \verb`\NewDocumentCommand\myvalue{}{0.35}`, if you're using \verb`xparse`. 
+\item \verb`\def\myvalue{0.35}`, or
+\item \verb`\newcommand\myvalue{0.35}`, or
+\item \verb`\NewDocumentCommand\myvalue{}{ 0.35 }`.
 \end{itemize}
 (If you're using the document processor \LyX{} then there is good reason
 to prefer \verb`\gdef` to define your macro, \verb`\gdef\myvalue{0.35}`;
-see Chapter~\ref{chap:LyX}). After one of these commands, \verb`\myvalue`
+see Chapter~\ref{sec:miscLyX}). After one of these commands, \verb`\myvalue`
 is now known to \LaTeX , but it is not known to \texttt{numerica}.
 The quantities \texttt{numerica} \emph{does }know about are variables
 in the vv-list of an \verb`\eval` command, and those \LaTeX{} (and
@@ -4354,68 +4946,94 @@
 \texttt{amsmath} and \texttt{mathtools}) commands used for writing
 mathematical expressions. These quantities are stored in \texttt{numerica}
 in structures called property lists. Since \verb`\myvalue` is not
-recorded in these lists yet, putting \verb`x=\myvalue` in the formula
-or vv-list of an \verb`\eval` command will produce an `Unknown token'
-error message: 
+– yet – recorded in these lists putting \verb`x=\myvalue` in the
+formula or vv-list of an \verb`\eval` command will produce an `Unknown
+token' error message:
 \begin{verbatim}
-    \NewDocumentCommand \myvalue {} {0.35}
+    \NewDocumentCommand \myvalue {} { 0.35 }
     \eval{ \myvalue }
 \end{verbatim}
 $\Longrightarrow$     \NewDocumentCommand \myvalue {} {0.35}
     \eval{ \myvalue }
 
-With version 2 of \texttt{numerica} a command is now available, \verb`\nmcMacros`,
-to register macros and their values with the property lists used internally
-by \texttt{numerica}. (This command was not available in version 1.)
-The macro must have been defined earlier in the document or in a supporting
-package.
+From version 2 of \texttt{numerica}, a command \verb`\nmcMacros`
+is available to register macros and their values with the property
+lists used internally by \texttt{numerica}. The macro must have been
+defined earlier in the document or in a supporting package. Using
+\verb`\nmcMacros` (or \verb`\macros` in its short-name form) is
+simple.
 
-The basic usage is simple. If you have a list of macros you wish to
-make available to \verb`\nmcEvaluate`, enter them in a comma list
-in the mandatory argument of \verb`\nmcMacros`: 
-\begin{lyxcode}
-\textbackslash nmcMacros\{~\textbackslash macro1,~\textbackslash macro2,~\ldots ~\}
-\end{lyxcode}
-There is an equivalent short-name form of the command, \verb`\macros`.
+If you have a list of macros you wish to use in \texttt{numerica},
+enter them in a comma (or a semicolon list if the decimal comma is
+being used) in the mandatory argument of the command. The \verb`ff`
+setting necessary for a multi-formula calculation in \verb`\eval`
+is implicit for \verb`\nmcMacros` – it does not need to be added:
+\begin{verbatim}
+    \nmcMacros{ \macro1, \macro2, … }
+    \nmcMacros{ \macro1; \macro2; … }
+\end{verbatim}
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+Since no decimal numbers are involved, no ambiguity would arise from
+using a comma separator even when the \verb`comma` package option
+is used but consistency with multi-formula calculations in \verb`\eval`
+suggests that a semicolon should be – and is – insisted upon unless
+explicitly countermanded by entering \verb`ff=<char>` in the settings
+option of the \verb`\macros` command.\end{shaded}%
+\end{minipage}\medskip{}
 
-Multiple \verb`\nmcMacros` commands can be used in a document. If
-the command is placed in the preamble (\emph{after} the definition
+\noindent Multiple \verb`\macros` commands can be used in a document.
+If the command is placed in the preamble (\emph{after} the definition
 of the macros)\emph{ }then the user-defined macros and their values
 are available throughout the document, otherwise they are available
-from the position of the \verb`\macros` statement. However, macros
-do not need to be defined in your current document provided they are
-defined and accessible from elsewhere -- for example from a loaded
-\LaTeX{} package. But always an \verb`\nmcMacros` command is required
-to `register' them with \texttt{numerica} for use in an \verb`\eval`
-command.
+from the position of the \verb`\macros` statement. However, it is
+not necessary for macros to be defined in the \emph{current} document
+provided they are defined and accessible from some other loaded \LaTeX{}
+package. But always an \verb`\nmcMacros` (or \verb`\macros`) command
+is required to register them with \texttt{numerica} for use in \verb`\eval`. 
 
 \subsection{What can be stored in a macro?}
 
 Generally a user-defined macro will store a number. This macro might
-well be defined in an external package -- for example the \texttt{mandi}
+well be defined in an external package – for example the \verb`mandi`
 package defines a large number of macros containing the values of
 physical constants, some fundamental like the speed of light, others
-contingent like the earth--moon distance. If the \texttt{mandi} package
-is loaded then writing, for instance, 
+contingent like the earth–moon distance. If the \verb`mandi` package
+is loaded\footnote{Maintainer Joe Heafner explains that `mandi' abbreviates `matter
+and interactions' after a physics textbook of that name.} then writing, for instance, 
 \begin{verbatim}
     \macros{ \electronmassprecisevalue,
              \protonmassprecisevalue }
 \end{verbatim}
 will make these two macros available for use in \texttt{numerica}.
-One could then write in the vv-list of an \verb`\eval` command 
+One could then write in the vv-list of an \verb`\eval` command
 \begin{verbatim}
-    m_e=\electronmassprecisevalue,m_p=\protonmassprecisevalue
+    m_e=\electronmassprecisevalue,
+    m_p=\protonmassprecisevalue
 \end{verbatim}
 which would allow (among other things) calculation of the mass ratio
 $m_{p}/m_{e}$ of proton to electron. (The length of name of some
-of the macros in the \texttt{mandi} package has a pedagogical purpose,
-but makes them unwieldy for direct use in mathematical expressions.)
+of the macros in the \verb`mandi` package has a pedagogical purpose,
+but makes them unwieldy for direct use in mathematical calculations.)
 
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+\noindent In version 2 of \texttt{numerica}, where the \verb`\macros`
+command was introduced, if the first token in a macro definition was
+expandable (like \verb`\sin` expanding to $\sin$ or \verb`\sum`
+expanding to $\sum$) it was necessary to ensure there was a preceding
+space. If the first token was a digit, there was no problem. From
+version 3.0.0 this is no longer the case. A leading space may or may
+not be included; it doesn't matter. I thank \noun{David Carlisle}
+for the routine that solved this irritant.\footnote{\url{https://tex.stackexchange.com/questions/683578/storing-the-unknown-contents-of-a-macro-in-a-clist}}\end{shaded}%
+\end{minipage}
+
 \subsubsection{Macros containing formulas }
 
 Numbers are not the only quantities that can be stored in a macro
 for use in \texttt{numerica}. In fact any mathematical expression
-that can be \verb`\eval`-uated can be stored in a macro: 
+that can be \verb`\eval`-uated can be stored in a macro:
 \begin{verbatim}
     \NewDocumentCommand \mysumC {}
         { \sum_{n=1}^{100}1/n - \ln 100 }
@@ -4422,43 +5040,22 @@
     \macros{ \mysumC }
     \eval{$ \mysumC $}[4]
 \end{verbatim}
-$\Longrightarrow$     \NewDocumentCommand \mysumC {}
-        { \sum_{n=1}^{100}1/n - \ln 100 }
+$\Longrightarrow$     \NewDocumentCommand \mysumC {} 
+       { \sum_{n=1}^{100}1/n - \ln 100 }
     \macros{ \mysumC }
     \eval{$ \mysumC $}[4], \medskip{}
 
-\noindent (to be compared with Euler's constant $\eval{\gamma}[4]$
--- obviously many more terms are needed). The \noindent\verb`\eval`
-command wraps around math delimiters in the example. Hence the result
-is presented in the form \emph{formula=result}. In that presentation,
-note how \noindent\verb`\mysumC` displays as the formula it contains.
+\noindent (to be compared with Euler's constant \eval{$ \gamma $}[4]
+– obviously many more terms are needed). The \verb`\eval` command
+wraps around math delimiters in the example. Hence the result is presented
+in the form \emph{formula=result}. In that presentation, note how
+\verb`\mysumC` displays as the formula it contains.
 
-\paragraph{The essential space: }
+\subsubsection{vv-list}
 
-But the critical thing to notice in the example is \emph{the space
-preceding }\verb`\sum`\emph{ in the definition of }\verb`\mysumC`.
-When a formula starts with an expandable token, \emph{this space is
-essential}. For macros to register successfully with \texttt{numerica},
-the first character in their definition must be \emph{un}expandable.
-Thus a digit is fine: storing a number in a macro is straightforward
-and you don't need to fuss about such niceties. But a control sequence
-like \verb`\sum` does expand (to $\sum$ ). If it is the initial
-token of the formula, then it will cause a possibly obscure error
--- see §\ref{subsec:supplMacrosErrors} -- unless preceded by an
-unexpandable token. Hence the space before \verb`\sum` in the \verb`\NewDocumentCommand`
-statement. (On the other hand the spacing in the \verb`\macros` statement
-is purely aesthetic.)
-
-When using macros from another package, this is a matter to be aware
-of. If the macros contain only numbers, there should be no problem,
-but if they contain more complicated expressions, the absence of an
-initial space could make them unusable in \texttt{numerica}.
-
-\subsubsection{Vv-list}
-
 In the example it would be nice to be able to vary the number of terms
 summed. This is easily done by using a vv-list in the \verb`\macros`
-statement: 
+statement:
 \begin{verbatim}
     \NewDocumentCommand \mysumN {}
         { \sum_{n=1}^{N}1/n - \ln N }
@@ -4466,18 +5063,17 @@
     \eval{$ \mysumN $}
 \end{verbatim}
 $\Longrightarrow$     \NewDocumentCommand \mysumN {}
-        { \sum_{n=1}^{N}1/n - \ln N }
+       { \sum_{n=1}^{N}1/n - \ln N }
     \macros{ \mysumN }[N=150]
     \eval{$ \mysumN $}.\medskip{}
 
 \noindent\texttt{numerica} needs a definite value to store; it does
-not store the formula as such. To give \noindent\verb`\mysumN` a
-definite value, give the variable \noindent\verb`N` a value. This
-is done in the vv-list added to the \noindent\verb`\macros` statement:
-\noindent\verb`N=150`. In this way a definite value is stored in
-\texttt{numerica} against the macro \noindent\verb`\mysumN`. The
-definition of the macro is unaffected. If a new value is given to
-\noindent\verb`N` in the \noindent\verb`\macros` statement (which
+not store the formula as such. To give \verb`\mysumN` a definite
+value, give the variable \verb`N` a value. This is done in the vv-list
+added to the \verb`\macros` statement: \verb`N=150`. In this way
+a definite value is stored in \texttt{numerica} against the macro
+\verb`\mysumN`. The definition of the macro is unaffected. If a new
+value is given to \verb`N` in the \verb`\macros` statement (which
 is the point of using a variable), the old value is overwritten and
 the new value is used in subsequent calculations.
 
@@ -4486,14 +5082,14 @@
 Perhaps your document has a number of \verb`\nmcMacros` statements
 scattered through it and you want to remind yourself of what exactly
 has been stored. \verb`\nmcMacros` has the \verb`view` setting for
-this purpose. Writing 
+this purpose. Writing
 \begin{centred}
-\verb`\macros[view]{}` $\Longrightarrow$\macros[view]{}
+\verb`\macros[view]{}` $\Longrightarrow$ \macros[view]{}
 \end{centred}
 produces a list of all macros registered with \texttt{numerica} and
-their values, as you can see.
+their values, as you can see. 
 
-If the braced argument is not empty, the display is slightly modified: 
+If the braced argument is not empty, the display is slightly modified:
 \begin{verbatim}
     \def\mydef{ \sin(m\pi/n) }
     \newcommand\mynewcmd{ \cos(m\pi/n) }
@@ -4500,18 +5096,18 @@
     \macros[view]{ \mydef,\mynewcmd }[m=3,n=18]
 \end{verbatim}
 $\Longrightarrow$     \def\mydef{ \sin(m\pi/n) }
-    \newcommand\mynewcmd{ \cos(m\pi/n) }
+    \newcommand\mynewcmd{ \cos(m\pi/n)}
     \macros[view]{ \mydef,\mynewcmd }[m=3,n=18]
 
-\noindent\noindent\verb`\mydef` and \noindent\verb`\mynewcmd` have
-been added to those available for use in \texttt{numerica}.
+\noindent\verb`\mydef` and \verb`\mynewcmd` have been added to
+those available for use in \texttt{numerica}. 
 
-\subsubsection{Freeing macros from storage}
+\subsection{Freeing macros from storage}
 
 Rather than cluttering \texttt{numerica}'s property lists with no-longer-needed
 macros, it is possible to remove them from there with the \verb`free`
 setting. This has no effect on the \LaTeX{} definition of the macro.
-It merely `de-registers' the macro with \texttt{numerica}. 
+It merely `de-registers' the macro with \texttt{numerica}.
 \begin{centred}
 \verb`\macros[free,view]{ \mysumC }` $\Longrightarrow$ \macros[free,view]{ \mysumC }
 \end{centred}
@@ -4519,12 +5115,12 @@
 use an empty main argument with the \verb`free` setting. For an example,
 see just below.
 
-\subsubsection{Counting how many macros are available}
+\subsection{Counting how many macros are available}
 
 You can count how many macros are currently registered with \texttt{numerica}
-by starring the \verb`\nmcMacros`~command: 
+by starring the \verb`\nmcMacros`~command:
 \begin{centred}
-\verb`\macros*{}` $\Longrightarrow$ \macros*{}
+\verb`\macros*{}` $\Longrightarrow$ \macros*{}.
 \end{centred}
 If the braced argument is not empty, the list of macros it contains
 will be added to those registered with \texttt{numerica} and included
@@ -4531,65 +5127,42 @@
 in the overall count.
 
 Note that the \verb`view` setting prevails over starring if both
-are used.
+are used. 
 
 The star can also be used with the \verb`free` setting. As mentioned
-above, if the main argument is empty, then \emph{all} macros are freed: 
+above, if the main argument is empty, then \emph{all} macros are freed:
 \begin{centred}
-\verb`\macros*[free]{}` $\Longrightarrow$\macros*[free]{}
+\verb`\macros*[free]{}` $\Longrightarrow$ \macros* [free]{}.
 \end{centred}
 
 \subsection{Errors}
 
 \label{subsec:supplMacrosErrors}If a macro is used in a \verb`\macros`
-statement and the macro has not been defined in the document or a
-supporting package it will cause an error: 
+statement but has not been defined earlier in the document or a supporting
+package it will cause an error:
 \begin{centred}
-\verb`\macros{ \mymacro }` $\Longrightarrow$ \macros{ \mymacro }
+\verb`\macros{ \mymacro }` $\Longrightarrow$ \macros{\mymacro }
 \end{centred}
-\noindent As noted in the introduction to this section, an undefined
-macro used in an \noindent\verb`\eval`-uation will cause an `Unknown
-token' message in \texttt{numerica}. The solution in this and the
-preceding case is (obviously) to define the macro.
+\noindent An undefined macro used in an \verb`\eval`-uation will
+cause an `Unknown token' message in \texttt{numerica}. The solution
+in both these cases is (obviously) to define the macro.
 
-If a macro contains a formula which begins with an expandable token
-and a preceding space is omitted (see above), then entering that macro
-in a \verb`\macros` statement to register it with \texttt{numerica}
-will generally cause a puzzling error: 
+If a macro is defined but the \verb`\macros` statement overlooked
+and the macro used in an \verb`\eval`-uation, it will generate an
+`Unknown token' message. If your macro stores a formula with variables,
+and you forget to give those variables values in the \verb`\macros`
+statement that will produce a message, for instance:
 \begin{verbatim}
-    \newcommand\mysin{\sin(\pi/7)}
-    \macros{ \mysin }
-\end{verbatim}
-$\Longrightarrow$    \newcommand\mysin{\sin(\pi/7)}
-    \macros{ \mysin }
-
-\noindent The \noindent\verb`\protect` seems to be plucked from nowhere.
-In fact it comes from the expansion of \noindent\verb`\sin`. If \noindent\verb`\sum`
-had been the first token in the macro definition, again with no preceding
-space, then \noindent\verb`\protect` would have been replaced by
-the even more puzzling \noindent\verb`\DOTSB`. The solution is to
-insert a space as the first token in the macro definition.
-
-If a macro is defined but the \verb`\macros` statement is overlooked,
-and the macro is used in an \verb`\eval`-uation, it will generate
-an `Unknown token' message.
-
-If your macro stores a formula with variables, and you forget to give
-those variables values in the \verb`\macros` statement that will
-produce a message: 
-\begin{verbatim}
     \def\mysumk{ \sum_{n=1}^k n }
     \macros{ \mysumk }
 \end{verbatim}
-$\Longrightarrow$     \def\mysumk{ \sum_{n=1}^k n }
+$\Longrightarrow$     \def\mysumk{ \sum_{n=1}^k n } 
     \macros{ \mysumk }
 
-\noindent The `where' part of the message is specific in this case,
-but is generally `\noindent\verb`\nmcMacros` command'.
+\noindent In this case the `where' part of the message is specific,
+but more usually will be \verb`macros command`. And of course there
+can be `all the usual suspects' discussed in Chapter~\ref{chap:errorsErrors}.
 
-And of course there can be `all the usual suspects' discussed at §\ref{sec:evalErrors}
-in the evaluation of the vv-list or the formula.
-
 \noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
@@ -4596,34 +5169,33 @@
 
 \subsubsection{Display of macros}
 
-\label{subsec:supplMacrosDisplay}As shown in earlier examples, macros
-display as their content. Thus \verb`\mysumC` displayed as $\sum_{n=1}^{100}1/n-\ln100$.
-But once a macro is known to \LaTeX{} (not necessarily to \cprotect\texttt{numerica})
-it can be used as a variable name. This has the same potential for
-abuse as noted earler for multi-token variables (§\ref{subsec:evalDon't-do-this!}).
-In the following example note that there is no \verb`\macros` statement.
-It suffices for the macro to be known to \LaTeX .
+\label{subsec:supplMacrosDisplay}Once a macro is known to \LaTeX{}
+it can be used as a variable name. If it is entered as such on the
+left of an equals sign in the vv-list, \verb`\eval` will treat it
+as a variable name. As with multi-token variables (§\ref{subsec:evalDon't-do-this!}),
+this fact can be abused. In the following example the macro is defined
+in \LaTeX{} but there is no \verb`\macros` statement.
 \begin{verbatim}
     \def\mymac{1}
-    \eval[vvi=\,???]{$ \mymac+\mymac $}[\mymac=2]
+    \eval[vv=\,???]{$ \mymac+\mymac $}[\mymac=2]
 \end{verbatim}
 $\Longrightarrow$     \def\mymac{1}
-    \eval[vvi=\,???]{$ \mymac+\mymac $}[\mymac=2]
+    \eval[vv=\,???]{$ \mymac+\mymac $}[\mymac=2]
 
-The value assigned to a variable name -- in this case \verb`\mymac`
--- by \cprotect\texttt{numerica} for \cprotect\emph{calculational}
-purposes and how that variable name \cprotect\emph{displays} in \LaTeX{}
-are two separate things. One relies on the user not to do something
-deliberately deceptive.\end{shaded}%
+Do not define a macro containing some value and then use it as a variable
+name for a different value. Macros display as their content. The value
+($2$) assigned to a variable name (\verb`\mymac`) for calculational
+purposes in \verb`\eval` and how that variable name displays in \LaTeX{}
+are separate things. It is up to the user not to abuse this fact.\end{shaded}%
 \end{minipage}
 
 \subsection{Rounding value}
 
-\noindent\label{subsec:supplMacrosRounding}Values are stored to
-$16$ significant figures (if available). In most cases appending
-a rounding value to a \noindent\verb`\macros` statement has no effect
-on the value stored. In the following example note the \noindent\verb`o`
-setting, meaning the sine reads angles in degrees: 
+\label{subsec:supplMacrosRounding}Values are stored to $16$ significant
+figures (if available). In most cases appending a rounding value to
+a \verb`\macros` statement has no effect on the value stored. In
+the following example note the \verb`o` setting, meaning the sine
+reads angles in degrees:
 \begin{verbatim}
     \NewDocumentCommand\testi{}{ \sin 60 }
     \NewDocumentCommand\testii{}{ \sin 60 }
@@ -4633,24 +5205,27 @@
 \end{verbatim}
 $\Longrightarrow$     \NewDocumentCommand\testi{}{ \sin 60 }
     \NewDocumentCommand\testii{}{ \sin 60 }
-    \macros[o]{ \testi }[10]
+     \macros[o]{ \testi }[10]
     \macros[o]{ \testii }[3]
     \macros[view]{}
 
-\noindent Despite the different rounding values the same $16$ figures
-are stored in both \noindent\verb`\testi` and \noindent\verb`\testii`.
+\noindent Despite the different rounding values in the \verb`\macros`
+statements the same $16$ figures are stored in both \verb`\testi`
+and \verb`\testii`. 
 
 For the \verb`\eval` command, rounding values specify how results
-are \emph{displayed}. The rounding value matters only \emph{after},
+are \emph{displayed}. In general the rounding value matters \emph{after},
 not during, the calculation. Only for infinite sums or products is
-this otherwise. There the rounding value is used to determine when
-to stop adding further terms or factors. The same is true of the \verb`\macros`
-command. Only if a macro contains an infinite sum or product does
-the rounding value become relevant. Sixteen figures are still stored,
-but most of them will be `wrong' since the infinite sum or product
-has stopped early, after only a finite number of terms or factors.
-Exactly how many of the first few figures are correct depends on the
-rounding value. An example may clarify the matter. 
+this otherwise. (Although fraction-form output from \verb`\eval`
+also depends on the rounding value, that is not relevant here.) For
+infinite sums or products the rounding value is used to determine
+when to stop adding further terms or factors. The same is true of
+the \verb`\macros` command. Only if a macro contains an infinite
+sum or product does the rounding value become relevant. Sixteen figures
+are still stored, but most of them will be `wrong' since the infinite
+sum or product has stopped early, after only a finite number of terms
+or factors. Exactly how many of the first few figures are correct
+depends on the rounding value. An example may clarify the matter.
 \begin{verbatim}
     \macros[free]{}
     \def\zetaiii{ \sum_{n=1}^\infty 1/n^3 }
@@ -4659,7 +5234,7 @@
     \macros[view]{ \zetaiii }[6]
     \info{sum}
 \end{verbatim}
-$\Longrightarrow$     \macros[free]{}
+$\Longrightarrow$     \macros[free]{} 
     \def\zetaiii{ \sum_{n=1}^\infty 1/n^3 }
     \macros[view]{ \zetaiii }[3]
     \info{sum}
@@ -4669,14 +5244,13 @@
 \emph{HMF }Table 23.3 tells me that $\zeta(3)=1.202056903159594\dots$
 The different rounding numbers have restricted the infinite sums to
 the very finite $47$ and $468$ terms respectively. Although $16$
-figures are stored, only the first few are correct. Just how many
-depends on the number of terms summed which depends on when the stopping
-criterion is met which depends on the rounding value.
+figures are stored, only the first few are correct, three more for
+rounding value $6$ than for rounding value $3$. 
 
 \section{User-defined constants:\texttt{ \textbackslash nmcConstants}}
 
 \label{sec:supplConstants}As noted much earlier in this document
-(§\ref{subsec:Built-in-Constants}), there are five built-in constants:
+(§\ref{subsec:evalBuilt-in-Constants}), there are five built-in constants:
 \verb`\pi`, \verb`e`, \verb`\phi`, \verb`\gamma` and \verb`\deg`,
 but a user may well want to define their own constant or constants.
 There are contexts where it would make sense to permanently record
@@ -4685,50 +5259,62 @@
 or the viscosity of water, rather than having to enter them in the
 vv-list for each calculation. Or a parameter might be held constant
 for a particular problem or class of problems where other variables
-change -- for example triangles of constant perimeter but varying
-sides. This is the purpose of the \verb`\nmcConstants` command.
+change – for example triangles of constant perimeter but varying sides.
+This is the purpose of the \verb`\nmcConstants` command.
 
 The symbols used to denote constants are subject to exactly the same
 constraints and freedoms as the symbols used to denote variables.
-They might be single latin letters like \verb`c` (e.g. $c=3\times10^{8}$),
-or greek letters like \verb`\alpha` (e.g. $\alpha=1/137)$, or multitoken
-combinations like the Rydberg constants \verb`R_\infty` or \verb`R_{\mathrm{H}}`
-from atomic physics, or \verb`\mu_0` and \verb`\epsilon_0` used
-to denote the permeability and permittivity of free space, or personal
-constants like \verb`total` of no wider significance. \texttt{numerica}
-handles all these different forms of constant with the command \verb`\nmcConstants`: 
+They might be single latin letters like \verb`c` (e.g.\ $c=3\times10^{8}$),
+or greek letters like \verb`\alpha` (e.g.\ $\alpha=1/137)$, or
+multi-token combinations like the Rydberg constants \verb`R_\infty`
+or \verb`R_{\mathrm{H}}` from atomic physics, or \verb`\mu_0` and
+\verb`\epsilon_0` used to denote the permeability and permitivity
+of free space, or personal constants like \verb`total` of no wider
+significance. \texttt{numerica} handles all these different forms
+of constant with the command \verb`\nmcConstants`, where the main
+argument is a comma-list of \emph{const=value} statements:
 \begin{verbatim}
-    \nmcConstants{  const-n=value-n, ... ,
-                    const2=value2, const1=value1 }
+    \nmcConstants{  const1=value1, const2=value2, ... ,
+                     const-n=value-n }
 \end{verbatim}
-This is the simplest use -- each constant is assigned a (numerical)
-value. But it is easy to envisage situations where it would be convenient
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+When the \verb`comma` package option is used and the decimal point
+is a comma, the default item separator in \verb`\nmcConstants` is
+the semicolon. Alternatively and irrespective of the choice of decimal
+point, a user can specify a separator with the setting \verb`ff=<char>`,
+e.g. \verb`ff=|`, and use that.\end{shaded}%
+\end{minipage}\medskip{}
+
+This is the simplest use – each constant is assigned a numerical value.
+But it is easy to envisage situations where it would be convenient
 to have a constant with value $1/\sqrt{2\pi}$ say, or another with
 value $e^{\tfrac{\pi}{2}}$, and so on. That is easy: simply put the
-expession for the value on the right: 
+expession for the value on the right:
 \begin{verbatim}
     \constants{ a=1/\sqrt{2\pi},b=e^{\tfrac\pi2} } 
 \end{verbatim}
-Or the values could be expressions depending on parameters: 
+where the short(er)-name form \verb`\constants` has been used. Or
+the values could be expressions depending on parameters:
 \begin{verbatim}
     \constants{ s=\tfrac12(a+b+c) }[a=3,b=5,c=7]
 \end{verbatim}
-Some constants might depend on earlier constants in the list: 
+Some constants might depend on earlier constants in the list:
 \begin{verbatim}
-    \constants{ A=\sqrt{s(s-a)(s-b)(s-c),
+    \constants{ A=\sqrt{s(s-a)(s-b)(s-c)},
                 s=\tfrac12(a+b+c) }[a=3,b=5,c=7]
 \end{verbatim}
 Or the values could involve an `infinite' process, requiring a rounding
-number: 
+value:
 \begin{verbatim}
     \constants{ \zeta=\sum_{n=1}^\infty(1/n^k) }[k=4][5]
 \end{verbatim}
 In this, although $16$ figures will be stored, only the first few
 will be accurate, the precise number depending on the value of \verb`k`
-and the rounding number (\verb`5` in the example); see the discussion
-on this issue for user-defined macros, §\ref{subsec:supplMacrosRounding}.
+and the rounding value (\verb`5` in the example); see the discussion
+on this issue for user-defined macros above.
 
-\subsection{New list replaces old by default}
+\subsection{New list \emph{replaces} old}
 
 A particular group of constants may be relevant only to a particular
 part of a document. Another part of the document may use other constants.
@@ -4736,25 +5322,26 @@
 Thus each of the \verb`\constants` statements above would replace
 the previous one.
 
-There is a technical reason why replacing rather than appending is
-the default. For each calculation all \emph{multi-token} constants
-(e.g. \verb`R_\infty`, \verb`N_0`, \ldots ) are added internally
-to the start of the vv-list of the \verb`\eval` command. Even if
-the vv-list is empty, this is still the case since the formula might
-well use constants. Like multi-token variables and for the same reason
-(see §\ref{subsec:evalVariableNames}), multi-token constants are
-mapped internally to single tokens. This occurs afresh for each calculation.
-If there are a lot of multi-token constants then each calculation
-is going to involve not only this mapping from multi- to single tokens
-but the evaluation of a long vv-list. In that case it seems better
-to make the default behaviour replacement of one constant list by
-another, rather than appending them.
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+There is a technical reason for this. For each calculation all \emph{multi-token}
+constants are added internally to the start of the vv-list of the
+\verb`\eval` command. Even if the vv-list is empty, this is still
+the case since the formula might well use constants. As for multi-token
+variables (see §\ref{subsec:evalVariableNames}), multi-token constants
+are mapped internally to single tokens. This occurs afresh for each
+calculation which will require not only this mapping from multi- to
+single tokens but the evaluation of a vv-list that includes the multi-token
+constants. It seems safer to make the default behaviour replacement
+of one constant list by another, rather than cumulating them. \end{shaded}%
+\end{minipage}
 
 \subsection{Adding constants to a list}
 
-Despite the default behaviour, there will be occasions when you want
-to add a new constant or constants to the current list. This is easily
-done with the \verb`add` setting. For instance, 
+Despite which there will be occasions when adding new constants to
+an existing list is desired. This is easily done with the \verb`add`
+setting. For instance,
 \begin{verbatim}
     \nmcConstants[add]{ \sigma=5.67\times10^{-8},
                           k_B = 1.381\times10^{-23} }
@@ -4777,7 +5364,7 @@
 in the vv-list of the \verb`\eval` command, and its well-known reciprocal
 (close to $137)$ in the main argument. Note that the constants do
 not need to be entered in the vv-list of the \verb`\eval` command.
-Their values are available from the \verb`\constants` statements. 
+Their values are available from the \verb`\constants` statements.
 \begin{verbatim}
     \constants{ c=2.99792458\times10^{8},
                 h=6.62607015\times10^{-34},
@@ -4786,18 +5373,18 @@
       { \epsilon_0=8.854187817\times10^{-12} }
     \eval{$ 1/\alpha $}[\alpha=e^2/2\epsilon_0hc]
 \end{verbatim}
-$\Longrightarrow$    \constants{ c=2.99792458\times10^{8},
+$\Longrightarrow$     \constants{ c=2.99792458\times10^{8},
                 h=6.62607015\times10^{-34},
                 e=1.602176634\times10^{-19} }
     \constants[view,add]
-      { \epsilon_0=8.854187817\times10^{-12} }
+ {\epsilon_0=8.854187817\times10^{-12} }
     \eval{$ 1/\alpha $}[\alpha=e^2/2\epsilon_0hc].
 
 The \verb`view` setting produces a now familiar kind of display.
 It shows that the three-token \verb`\epsilon_0` (the control sequence
 \verb`\epsilon`, the underscore \verb`_` and the digit \verb`0`)
-has been replaced by \verb`\nmc_q` -- which may look as if it is
-also three tokens but is in fact a single control sequence.
+has been replaced by \verb`\nmc_p` – which may look as if it is also
+three tokens but is in fact a single control sequence.
 
 \subsubsection{Example 2: local constants}
 
@@ -4817,7 +5404,7 @@
 The question was really about understanding these laws and how to
 think with them. Here, $s$ is the distance travelled in time $t,$
 with initial speed $u$ at $t=0$, speed $v$ at time $t$, and constant
-acceleration $a$ -- a deceleration in this case.
+acceleration $a$ – a deceleration in this case. 
 
 The given data provide our constants: distance $x=1$ metre, initial
 speed $u=1000*50/(60*60)=(10/36)*50$ metres per second, final speed
@@ -4828,7 +5415,7 @@
 kilograms, and a test mass, $M$ say, which we will leave as a variable.
 But dealing with weight, we will need the acceleration due to gravity.
 For the kind of rough estimating we are doing, $g=10$ metres per
-second per second will be an adequate approximation. 
+second per second will be an adequate approximation.
 \begin{verbatim}
     \constants{ x=1,v=0,u=(10/36)50,m=5,g=10 }
 \end{verbatim}
@@ -4844,7 +5431,7 @@
 western adult male (but is doubtless a considerable underestimate
 now). Hence the test force is $Mg$. Let's do the calculations. (I
 have altered the \verb`\constants` statement to allow for a later
-comparison with the effect of a small increase in speed.) 
+comparison with the effect of a small increase in speed.)
 \begin{verbatim}
     \constants{ x=1,u=(10/36)U,m=5,g=10 }[U=50]
     \eval{$ mu^2/2x $}[0], \par
@@ -4855,14 +5442,14 @@
     \eval{$ Mg $}[M=70].
 
 The force required to hold on to the baby is noticeably less than
-that required to lift a $70$~kg person -- in fact about the same
+that required to lift a $70$~kg person – in fact about the same
 as that needed to lift a $50$~kg person. But we have ignored the
-force experienced by the mothers forearms -- perhaps doubling $m$
+force experienced by the mothers forearms – perhaps doubling $m$
 (baby plus forearms) would give a better estimate of the force she
 experiences. In that case $mu^{2}/2x$ obviously doubles and the total
-force required by the woman to retain her baby -- now $964$ newtons
--- is significantly more than that required to lift a $70$~kg person.
-I think it almost certain that the baby is torn from her arms.
+force required by the woman to retain her baby – now $964$ newtons
+– is significantly more than that required to lift a $70$~kg person.
+I think it almost certain that the baby is torn from her arms. 
 
 What difference does increasing the speed to 60 km/hr make? 
 \begin{verbatim}
@@ -4871,19 +5458,19 @@
     \eval{$ Mg $}[M=70].
 \end{verbatim}
 $\Longrightarrow$     \constants{ x=1,u=(10/36)U,m=5,g=10 }[U=60]
-    \eval{$ mu^2/2x $}[1], \par
+    \eval{$ mu^2/2x $}[0], \par
     \eval{$ Mg $}[M=70].
 
 Now the force of baby alone is comparable to that required to lift
 a $70$ kg person. Including the woman's forearms in $m$, doubling
-$m$ say, will result in a force twice as great -- like that required
+$m$ say, will result in a force twice as great – like that required
 to lift two $70$~kg people or one $140$~kg person. There is no
-chance of the woman holding on to her baby. The force is too great.
+chance of the woman holding on to her baby. The force is too great. 
 
 \subsubsection{Example 3: macros and constants}
 
 Constants can depend on previously defined and registered user macros.
-Suppose I have defined two macros 
+Suppose I have defined two macros
 \begin{verbatim}
     \NewDocumentCommand\electronmassprecisevalue {}
                        {9.1093837015\times10^{-31}}
@@ -4890,17 +5477,17 @@
     \NewDocumentCommand\protonmassprecisevalue {}
                        {1.672621898\times10^{-27}}
 \end{verbatim}
-(I have taken both the names and the values from the \texttt{mandi}
+(I have taken both the names and the values from the \verb`mandi`
 package.) The long explicit names of the macros has a pedagogic purpose,
 but they are too cumbersome to use in calculations. For that purpose
 we need, first, a \verb`\macros` statement registering the two macros
-with \texttt{numerica}, and then a \verb`\constants` statement like 
+with \texttt{numerica}, and then a \verb`\constants` statement like
 \begin{verbatim}
     \nmcConstants{ m_e=\electronmassprecisevalue,
                    m_p=\protonmassprecisevalue }
 \end{verbatim}
 With that \verb`m_e` and \verb`m_p` could be entered in formulas,
-taking the values contained in the macros. Let's do it: 
+taking the values contained in the macros. Let's do it:
 \begin{verbatim}
     \NewDocumentCommand\electronmassprecisevalue {}
                        {9.1093837015\times10^{-31}}
@@ -4912,15 +5499,15 @@
                    m_p=\protonmassprecisevalue }
     \eval{$ m_p/m_e $}
 \end{verbatim}
-$\Longrightarrow$     \NewDocumentCommand\electronmassprecisevalue {}
+$\Longrightarrow$ \NewDocumentCommand\electronmassprecisevalue {}
                        {9.1093837015\times10^{-31}}
-    \NewDocumentCommand\protonmassprecisevalue {}
+\NewDocumentCommand\protonmassprecisevalue {}
                        {1.672621898\times10^{-27}}
-    \nmcMacros{ \electronmassprecisevalue,
+\nmcMacros{ \electronmassprecisevalue,
                 \protonmassprecisevalue }
-    \nmcConstants{ m_e=\electronmassprecisevalue,
+\nmcConstants{ m_e=\electronmassprecisevalue,
                    m_p=\protonmassprecisevalue }
-    \eval{$ m_p/m_e $},
+\eval{$ m_p/m_e $},
 
 \noindent the familiar mass ratio of proton and electron.
 
@@ -4927,7 +5514,7 @@
 \subsection{Viewing, counting constants}
 
 To see all constants currently `in play', use the \verb`view` setting
-in the \verb`\constants` command. The main argument can be empty, 
+in the \verb`\constants` command. The main argument can be empty,
 \begin{centred}
 \verb`\constants[view]{}` $\Longrightarrow$ \constants[view]{}
 \end{centred}
@@ -4934,13 +5521,13 @@
 or contain a list of constants. In the latter case, the display is
 of the above form but featuring the constants of the new list or,
 if the \verb`add` setting is used, featuring the joined lists, old
-and new: 
+and new:
 \begin{centred}
 \verb`\constants[view,add]{X=42}` $\Longrightarrow$ \constants[view,add]{X=42}
 \end{centred}
 To count how many constants are currently in play, star the \verb`\constants`
 command. The number will depend on whether the main argument is empty
-or not, and whether the \verb`add` setting is active: 
+or not, and whether the \verb`add` setting is active:
 \begin{centred}
 \verb`\constants*{}` $\Longrightarrow$ \constants*{}.
 \end{centred}
@@ -4953,7 +5540,7 @@
 to be remembered that \emph{multi-token} constants are added to the
 vv-list for every calculation. Hence an error may not be in the vv-list
 as indicated in the message but in the \verb`\constants` statement,
-specifically, the multi-token constants.
+specifically, the multi-token constants. 
 
 \section{Saving and reusing results: \texttt{\textbackslash nmcReuse}}
 
@@ -4961,1386 +5548,1918 @@
 a result calculated earlier. It would be good to be able to do so
 without having to do the calculation again at the new location. \texttt{numerica}
 offers a command \verb`\nmcReuse` (short-name form, \verb`\reuse`)
-which saves a result to a control sequence that can then be used elsewhere
-in the document, expanding to the saved result. The control sequence
+which saves the numerical result of the most recent \verb`\eval`-uation
+to a control sequence (a macro) that can then be used elsewhere in
+the document, expanding to the saved result. The control sequence
 and its content are also saved to file, allowing the possibility of
-using the result in other documents.
+using the result in other documents. 
 
 \noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
-The \texttt{\textbackslash nmcReuse} command in version 2 of \texttt{numerica
-}has been completely rewritten. Its use is not compatible with how
-the command was used in version 1. I found that I could bring \texttt{\textbackslash nmcReuse}
-along with \texttt{\textbackslash nmcMacros} and \texttt{\textbackslash nmcConstants}
-into the coding scheme used for \texttt{\textbackslash nmcEvaluate}
-and the reasons for doing so were too compelling.\end{shaded}%
+For those familiar with earlier usage, in version 2 of \texttt{numerica
+}the \verb`\nmcReuse` command was completely rewritten and was no
+longer compatible with how the command was used in version 1. In version
+3 of \texttt{numerica} the command has, again, been reworked with
+an eye to greater consistency in its use (and simplifying the code).
+The command created difficulties for itself by mixing two functions:
+(i) saving and retrieving a result, and (ii) making the retrieved
+result usable within another calculation (an \verb`\eval`-uation).
+That latter function is the purpose of the \verb`\macros` command
+and in version 3 of \texttt{numerica} has been removed from \verb`\recur`.
+For a saved result to be used within an \verb`\eval` command it must
+first be `registered' by means of the \verb`\macros` command –
+like any other \LaTeX{} macro. Further, \emph{only the numerical result}
+is now saved, although that can be saved as a decimal or in scientific
+notation or fraction form, but saving associated elements like the
+vv-list or math delimiters with the numerical result has been discontinued.\end{shaded}%
 \end{minipage}
 
 \subsection{Use of \texttt{\textbackslash nmcReuse}}
 
-\noindent As noted, all the supplementary commands share the syntax
-of the \noindent\verb`\eval` command, so that \noindent\verb`\nmcReuse`
-has an optional settings argument preceding a mandatory main argument,
-followed by two trailing optional arguments. \noindent\verb`\nmcReuse`
-does not use the last two. The command is used mainly in two ways: 
-\begin{enumerate}
-\item {\small{\small\verb`\nmcReuse{}`}}{\small , which loads the
-saved control sequences from file, if not already loaded; and}{\small\par}
-\item {\small{\small\verb`\nmcReuse{csname}`}}{\small , which loads
-the saved control sequences from file, if not already loaded, assigns
-the latest result from }{\small{\small\verb`\eval`}}{\small{}
-to the control sequence }{\small{\small\verb`\csname`}}{\small ,
-and saves }{\small{\small\verb`\csname`}}{\small{} to file.}{\small\par}
-\end{enumerate}
-You may wish to put \verb`\nmcReuse{}` in the preamble of your document
-(\emph{after} \verb`\usepackage{numerica}` of course). In that way,
-saved control sequences are available from the start. Indeed, control
-sequences saved from later in the document can be used in earlier
-sections in a later \LaTeX{} run.
+As noted, all the supplementary commands share the syntax of the \verb`\eval`
+command, so that \verb`\nmcReuse` has an optional settings argument
+preceding a mandatory main argument, followed by two trailing optional
+arguments. \verb`\nmcReuse` does not use the last two. The command
+is used to save the numerical result of the last \verb`\eval` command
+to file and to load saved results from file. The results are saved
+as pairs, \verb`\foo {<result>}`, where \verb`foo` is a control
+sequence name (or macro name) chosen by the user. When loaded from
+file, \verb`\foo` is globally defined to expand to \verb`<result>`.
+The file that is used to store control sequences and their values
+is named \verb`<\jobname>.nmc` where \verb`\jobname` is the \LaTeX{}
+macro that expands to the filename of the current document. The file
+is organized as a comma list.
 
-Note that only the \emph{name}, \verb`csname`, of the control sequence
-is supplied to \verb`\reuse`, not the control sequence (\verb`\csname`).
-The name should be composed of letters only. If the name has already
-been defined in \LaTeX{} a \texttt{numerica} error is produced, see
-below §\ref{subsec:reuseDeletingOverwriting:}, although if you want
-to save a \emph{new} value in a previously saved control sequence,
-that can be done without invoking a message; see §\ref{subsec:reuseDeletingOverwriting:}.
+Because of past practice,
+\begin{itemize}
+\item \verb`\nmcReuse{}`, or \verb`\reuse{}`, loads all saved macros and
+globally defines them to expand to their saved values;
+\item \verb`\nmcReuse{foo}`, or \verb`\reuse{foo}`, saves the numerical
+result from the most recent \verb`\eval`-uation to file in the form
+\verb`\foo {<result>}` and globally defines \verb`\foo` to expand
+to \verb`<result>`.
+\end{itemize}
+In light of the first of these you may want to put \verb`\reuse{}`
+in the preamble of your document (\emph{after} \verb`\usepackage{numerica}`
+of course). In that way, saved control sequences are available from
+the start. 
 
-Once defined {\small with a }{\small{\small\verb`\nmcReuse{csname}`}}
-command, \verb`\csname` becomes available for use elsewhere in the
-document.
+But these are somewhat inconsistent default behaviours. Version 3
+of \texttt{numerica} offers options to make more explicit what is
+being done:
+\begin{itemize}
+\item \verb`save`
+\begin{itemize}
+\item \verb`\reuse[save]{foo}` saves the numerical result from the latest
+\verb`\eval` command to file \verb`<\jobname>.nmc` as the pair \verb`\foo {<result>}`;\verb`\foo`
+is globally defined to expand to \verb`<result>`; if \verb`\foo`
+is defined elsewhere in \LaTeX{} or already exists in \verb`<\jobname>.nmc`
+with a \emph{different} value then the save fails and a message is
+generated; 
+\item \verb`\reuse[save]{}` is equivalent to \verb`\reuse{}`, see above;
+\end{itemize}
+\item \verb`renew` 
+\begin{itemize}
+\item \verb`\reuse[renew]{foo}` saves the numerical result from the latest
+\verb`\eval` command to file \verb`<\jobname>.nmc` as the pair \verb`\foo {<result>}`,
+if necessary overwriting any previously saved value for \verb`\foo`;
+\verb`\foo` is globally defined to expand to \verb`<result>`; if
+\verb`\foo` already exists elsewhere in \LaTeX{} then the save fails
+and a message is generated; 
+\item \verb`\reuse[renew]{}` is equivalent to \verb`\reuse{}`, see above;
+\end{itemize}
+\item \verb`load` 
+\begin{itemize}
+\item \verb`\reuse[load]{foo}` loads \verb`\foo` from file \verb`<\jobname>.nmc`
+and defines it globally to expand to its saved value; if \verb`\foo`
+is defined elsewhere in \LaTeX{} or if it does not exist in file \verb`<\jobname>.nmc`
+nothing happens;
+\item \verb`\reuse[load]{}` is equivalent to \verb`\reuse{}`, see above;
+\end{itemize}
+\item \verb`delete`
+\begin{itemize}
+\item \verb`\reuse[delete]{foo}` undefines \verb`\foo` in the current
+\LaTeX{} session and deletes \verb`\foo` and its value from file \verb`<\jobname>.nmc`
+should it be there;
+\item \verb`\reuse[delete]{}` deletes all contents from the file \verb`<\jobname>.nmc`
+and undefines all macros previously saved there from the current \LaTeX{}
+session;
+\end{itemize}
+\end{itemize}
+Only one of the options should be used at a time; if more than one
+is, it is the rightmost (in the settings option of the \verb`\reuse`
+command) which prevails. 
 
-\subsubsection{What is saved?}
+As examples of use, the following illustrate first the default behaviour
+and then the explicit use of the \verb`save` option.
+\begin{verbatim}
+    \eval{$ x+y $}[x=-1,y=3] \par
+    \reuse{two} >> \two \ <<
+\end{verbatim}
+$\Longrightarrow$     \eval{$ x+y $}[x=-1,y=3] \par
+    \reuse{two} >> \two \ <<
 
-What is saved is the most recent result of an \verb`\eval`-uation.
-This is the \emph{full} result. It may include the vv-list; it may
-include formatting elements; it may include math delimiters. Thus,
-using \verb`\csname` in your document (after the command \verb`\nmcReuse{csname}`)
-may not be straightforward -- simply writing \verb`\csname` where
-you want the value it expands to, may produce a \LaTeX{} error and
-halt compilation. You may have to write \verb`$ \csname $` or provide
-some other math environment in order for the control sequence to display
-correctly.
+\noindent Only the numerical result is saved, not the math environment,
+so that if you want a minus sign to display correctly (rather than
+as a hyphen) when you use a saved control sequence you will need to
+ensure it is used in a math environment:
+\begin{verbatim}
+    \eval{$ -1-1 $}. \reuse[save]{negtwo} 
+    Now use the control sequence: $\negtwo$.
+\end{verbatim}
+$\Longrightarrow$     \eval{$ -1-1 $}.\reuse{negtwo} 
+    Now use the control sequence: $\negtwo$.
 
-It can be helpful to see \emph{exactly} what has been saved; to do
-that see §\ref{subsec:reuseSeeingSaved}.
+There may be occasions when you wish to change a previously saved
+value and yet, irritatingly, the control sequence name will now be
+known to \LaTeX{} and so will generate an `already defined' message.
+And if you choose a different name for the control sequence to save
+the new value to, do you want the old name cluttering the \verb`.nmc`
+file? The settings \verb`delete` and \verb`renew` provide for such
+situations. 
 
-\paragraph{Use of \texttt{\textbackslash eval{*}}}
+The following example shows the use of these options. In the example
+a control sequence \verb`\testing` is defined in the first line.
+Being unable to recall what is in the \verb`.nmc` file, I try deleting
+it from there in the second line. In the third line the sum of the
+first ten integers is evaluated. In the fourth line I try to save
+the sum to the control sequence \verb`\testing`. That generates a
+message: \verb`\testing` is defined elsewhere (in \LaTeX ) and therefore
+was \emph{not} deleted. Okay, I resort to a new control sequence \verb`\test`.
+In the fifth line, in case it is present in the \texttt{.nmc} file,
+I try deleting \verb`\test` from there. The lack of a message means
+that either it was successfully deleted or was not present in the
+\texttt{.nmc} file in the first place. In the following lines, I calculate
+the sum of the first 20 integers and save the result to \verb`\test`.
+The final line shows that this was successful. 
+\begin{verbatim}
+    \NewDocumentCommand\testing{}{1}
+    \reuse[delete]{testing}
+    \eval[env=\[ ]{\sum_{n=1}^{10}n}
+    \reuse{testing}\par
+    \reuse[delete]{test}\par
+    \eval[env=\[ ]{\sum_{n=1}^{20}n} 
+    \reuse{test} Now testing
+    \textbackslash test: \test.
+\end{verbatim}
+$\Longrightarrow$     \NewDocumentCommand\testing{}{1}
+    \reuse[delete]{testing}
+    \eval[env=\[ ]{\sum_{n=1}^{10}n}
+    \reuse{testing}\par
+    \reuse[delete]{test}\par
+    \eval[env=\[ ]{\sum_{n=1}^{20}n} 
+    \reuse[renew]{ test}  Now testing \textbackslash test: \test.
 
-Users will make life simpler for themselves if they make a habit of
-using the starred form \verb`\eval*` to produce the results to save.
-\verb`\eval*` produces solely a number with no formatting or delimiters;
-even a negative result uses a hyphen for the minus sign, just as one
-would type it. In this case \verb`\csname` can be used freely in
-both text and math environments.
+If a control sequence \verb`\foo` is already known to \LaTeX{} from
+elsewhere (perhaps it is a \LaTeX{} command) then writing \verb`\reuse{foo}`
+or \verb`\reuse[save]{foo}` or even \verb`\reuse[renew]{foo}` will
+produce a message and the result of the latest \verb`\eval`-uation
+will \emph{not} be saved :
+\begin{verbatim}
+    \eval*{\sum_{n=1}^{10}n}\par
+    \reuse[renew]{sigma} \par 
+    >> $\sigma$ <<
+\end{verbatim}
+$\Longrightarrow$ \eval*{\sum_{n=1}^{10}n} \par
+\reuse[renew]{sigma}\par 
+>> $\sigma$ <<
 
-\subsubsection{The \texttt{.nmc} file}
+\noindent As you can see, \verb`\sigma` is unchanged. 
 
-\label{subsec:suppleReuse.nmc-file}The file that control sequences
-are saved to has a filename composed of the document name with the
-extension \verb`.nmc`. If your document is \verb`mydoc.tex` (so
-that the \LaTeX{} command {\small{\small\verb`\jobname  expands to \verb`}}{\small{}
-mydoc`) then the file to which results are saved is }{\small{\small\verb`mydoc.nmc`}}{\small ,
-located in the document directory.}{\small\par}
-
-{\small{\small\verb`mydoc.nmc`}}{\small{} is a comma list of
-pairs of the form }{\small{\small\verb`\csname {value}`}}{\small .
-Thus, the contents of }{\small{\small\verb`mydoc.nmc`}}{\small{}
-might be }{\small\texttt{\textbackslash csname1 \{value1\},\textbackslash csname2
-\{value2\},..., \textbackslash csname$n$ \{value$n$\}}}{\small .
-If }{\small{\small\verb`mydoc.nmc`}}{\small{} does not already
-exist then it is created in the document directory, and }{\small{\small\verb`\csname {value}`}}{\small{}
-becomes its first element.}{\small\par}
-
-\paragraph{Editing the \texttt{.nmc} file externally}
-
-{\small The }{\small{\small\verb`.nmc`}}{\small{} file is a text
-file and can be edited in a text editor. Thus it is possible to externally
-add control sequences and values to it provided the structure of the
-file is strictly adhered to. It is also possible to delete items from
-it or rename control sequences or edit values by the same mechanism.
-Editing the file externally like this, or renaming it, or transferring
-items from one }{\small{\small\verb`.nmc`}}{\small{} file to
-another, provides a way of using saved values in multiple documents.}{\small\par}
-
-\subsubsection{Messages}
-
-{\small If a control sequence }{\small{\small\verb`\csname`}}{\small{}
-is already known to \LaTeX , then writing }{\small{\small\verb`\reuse`}}{\small{}
-}{\small{\small\verb`{csname}`}}{\small{} will produce a }\texttt{numerica}{\small{}
-message and the result of the latest }{\small{\small\verb`\eval`}}{\small -uation
-will }{\small\emph{not}}{\small{} be saved: }{\small\par}
+If a control sequence is already saved to file from a previous \verb`\reuse`
+command trying to save a different value to it produces a message: 
 \begin{verbatim}
-    \eval*{\sum_{n=1}^{10}n}\par
-    \reuse{sigma}
+    \eval{$-1-1-1$} \par \reuse{negtwo} 
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \eval*{\sum_{n=1}^{10}n}\par
-    \reuse{sigma}}{\small\par}
+$\Longrightarrow$     \eval{$-1-1-1$} \par \reuse{negtwo}\medskip{}
 
-{\small If there is no result to save -- perhaps an }{\small{\small\verb`\eval`}}{\small -uation
-produces an error message instead -- then another message is generated: }{\small\par}
+\noindent If you really do want to change the stored value, use the
+\verb`renew` option. 
+
+Empty results (from an \verb`\eval`-uation) are \emph{not} saved.
+A following \verb`\reuse` command which attempts to do so generates
+another message: 
 \begin{verbatim}
-    \eval*{1/0}\par
-    \reuse{oops}
+    \eval{1/0} \par \reuse{oops}
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}   \eval*{1/0}\par
-    \reuse{oops}}{\small\par}
+$\Longrightarrow$ \reuse[delete]{oops}\eval{1/0}\par\reuse{oops}\medskip{}
 
-\subsubsection{Deleting and renewing}
+\noindent The \verb`\eval`-uative error has produced an error message
+and an empty result which generates the \verb`\reuse` message.\emph{
+}However, if \verb`\oops` had already existed in \verb`<\jobname>.nmc`
+the stored macro and its value would have been loaded to prevent \LaTeX{}
+later complaining about an undefined control sequence, should \verb`\oops`
+have been used later in the document, and halting compilation.
 
-{\small\label{subsec:reuseDeletingOverwriting:}There may be occasions
-when you wish to change a previously saved value and yet, irritatingly,
-the control sequence name will now be known to \LaTeX{} and so will
-generate an `already known' message. If you choose a different name
-for the control sequence to save the new value to, do you want the
-old name cluttering the }{\small{\small\verb`.nmc`}}{\small{}
-file? Deleting and renewing the values of saved control sequences
-are controlled by the settings }{\small{\small\verb`delete`}}{\small{}
-and }{\small{\small\verb`renew`}}{\small .}{\small\par}
+\subsubsection{Seeing what is saved}
 
-{\small Entering }{\small{\small\verb`delete`}}{\small{} in the
-settings option }{\small\emph{deletes}}{\small{} a control sequence
-and its value from the }{\small{\small\verb`.nmc`}}{\small{}
-file and undefines it in \LaTeX{} terms. Thus }{\small{\small\verb`\reuse[delete]`}}{\small{}
-}{\small{\small\verb`{csname}`}}{\small{} would delete }{\small{\small\verb`\csname`}}{\small{}
-and its value from the }{\small{\small\verb`.nmc`}}{\small{}
-file and undefine }{\small{\small\verb`\csname`}}{\small .
-If }{\small{\small\verb`\csname`}}{\small{} is not present in
-the file, nothing happens. Entering }{\small{\small\verb`renew`}}{\small{}
-replaces the value of a saved control sequence with a new value. If
-there is no such }{\small\emph{saved}}{\small{} control sequence but
-the control sequence is otherwise known to \LaTeX{} the `already defined'
-message will still be generated. This prevents giving control sequences
-like }{\small{\small\verb`\sin`}}{\small{} or }{\small{\small\verb`\frac`}}{\small{}
-new meanings with the }{\small{\small\verb`renew`}}{\small{}
-setting. }{\small\par}
+The \verb`view` setting is available for \verb`\reuse`, as for other
+commands. 
 \begin{itemize}
-\item {\small{\small\verb`\reuse[delete]{csname}`}}{\small{} deletes
-}{\small{\small\verb`\csname`}}{\small{} and its value from
-the }{\small{\small\verb`.nmc`}}{\small{} file and from memory
-if present; otherwise has no effect; }{\small\par}
-\item {\small{\small\verb`\reuse{csname}`}}{\small{} (the default)
-saves the result of the latest }{\small{\small\verb`\eval`}}{\small{}
-command to }{\small{\small\verb`\csname`}}{\small , provided
-}{\small{\small\verb`\csname`}}{\small{} is not already defined;
-in that case a warning message is presented and the result is not
-saved; }{\small\par}
-\item {\small{\small\verb`\reuse[renew]{csname}`}}{\small{} behaves
-like the default mode unless }{\small{\small\verb`\csname`}}{\small{}
-is already a saved control sequence in the }{\small{\small\verb`.nmc`}}{\small{}
-file, in which case its previous value is replaced by the result of
-the latest }{\small{\small\verb`\eval`}}{\small{} command; }{\small\par}
-\item {\small if }{\small{\small\verb`delete`}}{\small{} and }{\small{\small\verb`renew`}}{\small{}
-are used together, whichever occurs second prevails. }{\small\par}
+\item \verb`\reuse[view]{}` displays all saved commands and their values;
+\item \verb`\reuse[view]{foo}` displays only \verb`\foo` and its contents.
 \end{itemize}
-{\small In the following example, the first }{\small{\small\verb`\reuse`}}{\small{}
-deletes }{\small{\small\verb`\suma`}}{\small{} should it be
-present in the }{\small{\small\verb`.nmc`}}{\small{} file, the
-second saves the result, $55$, of the latest }{\small{\small\verb`\eval`}}{\small -uation
-(in fact an }{\small{\small\verb`\eval*`}}{\small -uation)
-and the third overwrites that saved value with the new value, $210$. }{\small\par}
-\begin{verbatim}
-    \reuse[delete]{suma}
-    \eval*{\sum_{n=1}^{10}n} \qquad
-    \reuse{suma}
-    \eval*{\sum_{n=1}^{20}n}  
-    \reuse[renew]{suma}
-\end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \reuse[delete]{suma}
-    \eval*{\sum_{n=1}^{10}n} \qquad
-    \reuse{suma}
-    \eval*{\sum_{n=1}^{20}n}  
-    \reuse[renew]{suma}}{\small\par}
+\verb`view` is independent of the other \verb`\reuse` options and
+can be used freely with them: they do their thing, and \verb`view`
+shows what results. For instance, the option combination \verb`[view,delete]`
+results \emph{first} in the deletion and only after in the viewing.
+Note that because \verb`\reuse{foo}` is equivalent to \verb`\reuse[save]{foo}`,
+so \verb`\reuse[view]{foo}` is equivalent to \verb`\reuse[save,view]{foo}`.
 
-\subsubsection{Viewing what has been saved}
+\subsubsection{Saving in other number formats}
 
-{\small\label{subsec:reuseSeeingSaved}It would be good in this example
-to see that the new value $210$ has in fact been saved. That is easy.
-Simply enter }{\small{\small\verb`view`}}{\small{} in the settings
-option of }{\small{\small\verb`\nmcReuse`}}{\small{} (I've removed
-the now unnecessary }{\small{\small\verb`\par`}}{\small{} tokens
-from the example.) }{\small\par}
+\label{subsec:reuseOtherFormats}\texttt{numerica} can output numbers
+in scientific notation and in fraction form and save them in that
+form. In the example, to check that both results have indeed been
+saved, I use the \verb`view` option:
 \begin{verbatim}
-    \reuse[delete]{suma}
-    \eval*{\sum_{n=1}^{10}n}
-    \reuse[view]{suma}
-    \eval*{\sum_{n=1}^{20}n} 
-    \reuse[renew,view]{suma}
+    \eval{ \pi }[//t6],  \reuse[renew]{fracpi} \quad
+    \eval{ \pi }[xx]. \reuse[renew]{scipi}
+    \reuse[view]{}
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \reuse[delete]{suma}
-    \eval*{\sum_{n=1}^{10}n}
-    \reuse[view]{suma}
-    \eval*{\sum_{n=1}^{20}n} 
-    \reuse[renew,view]{suma}}{\small\par}
+$\Longrightarrow$     \eval{ \pi }[//t6],  \reuse[renew]{fracpi}
+    \quad \eval{ \pi }[xx]. \reuse[renew,view]{scipi}
 
-\noindent{\small First the original value $55$ was saved to }{\small\noindent{\small\verb`\suma`}}{\small{}
-but then the value was overwritten by the new value $210$.}{\small\par}
+\subsection{Using saved macros in calculations}
 
-{\small The }{\small{\small\verb`view`}}{\small{} setting allows
-us to see how formatting is stored if the }{\small\emph{un}}{\small starred
-form of the }{\small{\small\verb`\eval`}}{\small{} command is
-used. In the following example, \verb`\eval` wraps around math delimiters: }{\small\par}
-\begin{centred}
-{\small{\small\verb`\eval{$ 1+1 $} \reuse[view,renew]{two}`}}{\small{}
-$\Longrightarrow$ }{\small\eval{$ 1+1 $} \reuse[view,renew]{two}}{\small\par}
-\end{centred}
-{\small The full }{\small\emph{formula=result}}{\small{} display has
-been captured in }{\small{\small\verb`\two`}}{\small{} along
-with the math delimiters. If a vv-list is also involved, things become
-messy (but informative): }{\small\par}
+To use a saved value in an \verb`\eval`-uation requires first `registering'
+the control sequence (the macro) containing the value with \texttt{numerica}.
+This is hardly surprising: saved control sequences are macros and
+\texttt{numerica} needs to be alerted to their presence as with other
+macros. The macros \verb`\two` and \verb`\negtwo` are active in
+the current document but, in the following example, the initial attempt
+to use them in an \verb`\eval` command fails; the second time, after
+registering with the \verb`\macros` command, it succeeds:
 \begin{verbatim}
-    \eval{$ x+y $}[x=1,y=2]
-    \reuse[view,renew]{three}
+    \eval{ \two \times \negtwo }\par
+    \macros{ \two, \negtwo }
+    \eval{ \two \times \negtwo }
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \eval{$ x+y $}[x=1,y=2]
-    \reuse[view,renew]{three}}{\small\par}
+$\Longrightarrow$     \eval{ \two \times \negtwo }\par
+    \macros{ \two, \negtwo }
+    \eval{$ \two \times \negtwo $}
 
-{\small You may want to see }{\small\emph{all}}{\small{} saved control
-sequences. In that case use an }{\small\emph{empty}}{\small{} main argument:
-}{\small{\small\verb`\nmcReuse[view]{}`}}{\small . We now have
-enough saved control sequences to make this worthwhile: }{\small\par}
-\begin{verbatim}
-    \reuse[view]{}
-\end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \reuse[view]{}}{\small\par}
+\subsection{The \texttt{.nmc} file}
 
-\noindent{\small (The }{\small\noindent{\small\verb`\seven`}}{\small{}
-that appears here is defined shortly. Its appearance }{\small\emph{before}}{\small{}
-definition is presumably due to \LaTeX{} making a number of passes
-when compiling this document.)}{\small\par}
+\label{subsec:suppleReuse.nmc-file}The file that control sequences
+are saved to has a filename composed of the document name with the
+extension \texttt{.nmc}. If your document is \texttt{mydoc.tex} (so
+that the \LaTeX{} command {\small\verb`\jobname`} expands to
+\texttt{mydoc}) then the file to which results are saved is \texttt{mydoc.nmc},
+located in the document directory. 
 
-\subsubsection{Counting saved control sequences: \texttt{\textbackslash nmcReuse{*}}}
+The \texttt{.nmc} file is a comma list of pairs of the form \verb`\csname {value}`.
+Thus, the contents of \verb`mydoc.nmc` might be \verb`\csname1`
+{\ttfamily\verb`{value1}`},\verb`\csname2` {\ttfamily\verb`{value2}`},...,
+\verb`\csname-n` \verb`{value-n}`. If \texttt{mydoc.nmc} does not
+already exist then \verb`\reuse{csname}` will create it in the document
+directory, and \verb`\csname {value}` will becomes its first element.
 
-{\small Because }{\small{\small\verb`\nmcReuse`}}{\small{} uses
-the same machinery as }{\small{\small\verb`\nmcEvaluate`}}{\small ,
-it has a starred form, }{\small{\small\verb`\nmcReuse*`}}{\small ,
-which produces a purely numerical result (just like }{\small{\small\verb`\eval*`}}{\small ,
-}{\small{\small\verb`info*`}}{\small , }{\small{\small\verb`\macros*`}}{\small{}
-and }{\small{\small\verb`\constants*`}}{\small ). In this case,
-the number is the count of how many control sequences have been saved: }{\small\par}
+\subsubsection{Editing the \texttt{.nmc} file externally}
 
-{\small{\small\verb`\reuse*{}`}}{\small{} $\Longrightarrow$
-}{\small\reuse*{}}{\small\par}
+\label{subsec:supplEditing-the-.nmc}The \texttt{.nmc} file is a text
+file and can be edited in a text editor. Thus it is possible to externally
+add control sequences and values to it provided the (simple) structure
+of the file is strictly adhered to: pairs like \verb`\csname {value}`
+separated by commas. It is also possible to delete items from it or
+rename control sequences or edit values by the same mechanism. Editing
+the file externally like this, or renaming it, or transferring items
+from one \texttt{.nmc} file to another, provides a way of using saved
+values in multiple documents.
 
-\subsection{\texttt{reuse} setting of \texttt{\textbackslash eval} command}
+\subsection{Counting, viewing all saved control sequences}
 
-{\small\label{subsec:supplReuseEvalSetting}Using }{\small{\small\verb`\eval*`}}{\small{}
-for a calculation ensures a purely numerical result, with no vv-list
-or formatting in the display of the result. But sometimes we might
-want the full display yet wish to save only the numerical result.
-This is the point of the }{\small{\small\verb`reuse`}}{\small{}
-setting of the }{\small{\small\verb`\eval`}}{\small{} command.}{\small\par}
+The \verb`\reuse` command has a starred form, \verb`\reuse*` (or
+\verb`\nmcReuse*`) which, like other starred commands, produces a
+purely numerical result. The number is the count of how many control
+sequences have been saved:
+\begin{centred}
+\verb`\reuse*{}` $\Longrightarrow$ \reuse*{ }
+\end{centred}
+The star does not interfere with the other functions of \verb`\reuse`;
+the main argument does not need to be empty. 
 
-{\small For the }{\small\emph{starred}}{\small{} form of the }{\small{\small\verb`\eval`}}{\small{}
-command it is always }{\small\emph{only the numerical result}}{\small{}
-that is saved, whatever the value of the }{\small\texttt{reuse}}{\small{}
-key in the settings option of the }{\small{\small\verb`\eval`}}{\small{}
-command.}{\small\par}
+\subsection{Obsolete \texttt{reuse} setting of \texttt{\textbackslash eval}
+command}
 
-{\small For the }{\small\emph{unstarred}}{\small{} form of the }{\small{\small\verb`\eval`}}{\small{}
-command exactly what is saved with }{\small{\small\verb`\nmcReuse`}}{\small{}
-depends on the }{\small\texttt{reuse}}{\small{} setting: }{\small\par}
-\begin{lyxcode}
-{\small reuse~=~<integer>}{\small\par}
-\end{lyxcode}
-{\small where }{\small{\small\verb`<integer>`}}{\small{} can
-take one of two values, }{\small\par}
-\begin{itemize}
-\item {\small\texttt{reuse=0}}{\small{} (the default) saves}{\small\emph{
-the form that is displayed}}{\small{} including the vv-list if there
-is one and possibly a formatting component (like math delimiters).
-Note that if the vv-list is empty, a formatting component (math delimiters)
-may still be present in the saved result; }{\small\par}
-\item {\small\texttt{reuse=1}}{\small{} (or, indeed, any non-zero integer)
-saves only the numerical result with no other elements of the display
-(no vv-list, no formatting component, no math delimiters). }{\small\par}
-\end{itemize}
-{\small As we saw earlier, saving the result from }{\small{\small\verb`\eval{$ x+y $}[x=1,y=2]`}}{\small ,
-corresponding to }{\small{\small\verb`reuse=0`}}{\small , means
-the full display is saved. Check by writing }{\small{\small\verb`\three`}}{\small{}
-$\Longrightarrow$ }{\small{\small\three}}{\small . The full
-display was saved (including math delimiters).}{\small\par}
+\noindent\label{subsec:supplReuseEvalSetting}In version 2 of \texttt{numerica
+}the \verb`\eval` command had a setting \verb`reuse` that gave some
+choice as to what was saved. That has been discontinued. \texttt{numerica}
+evaluates mathematical expressions; the numerical result is what is
+important; the rest is cosmetics. Adding the extra capability was
+confusing both as to what was saved and where and how it could be
+used – and complicated the code. For the added complexity there was
+little gain. 
 
-{\small On the other hand, with }{\small{\small\verb`reuse=1`}}{\small{}
-only the numerical value is saved: }{\small\par}
-\begin{centred}
-{\small{\small\verb`\eval[reuse=1]{$ x + y $}[x=3,y=4] \reuse[renew]{seven}`}}{\small{}
-$\Longrightarrow$ }{\small\eval[reuse=1]{$ x + y $}[x=3,y=4] \reuse[renew]{seven}}{\small .}{\small\par}
-\end{centred}
-{\small The numerical result only of the calculation should be saved,
-although the formula and vv-list are displayed as the result of the
-}{\small{\small\verb`\eval`}}{\small -uation. We can easily
-check: }{\small{\small\verb`\seven`}}{\small{} $\Longrightarrow$
-}{\small{\small\seven}}{\small . Indeed, only the numerical
-result was saved.}{\small\par}
+\chapter{Miscellaneous matters}
 
-\chapter{Nesting commands}
+In this chapter I consider the nesting of commands, the parsing of
+mathematical arguments, the use of different mathematical environments
+and the use of \texttt{numerica} in the document processor \LyX .
 
-{\small\label{chap:Nesting} The }{\small{\small\verb`\eval`}}{\small{}
-command and the supplementary commands of the previous chapter can
-be }{\small\emph{nested}}{\small{} --}{\small\emph{ }}{\small used within
-other }{\small{\small\verb`\eval`}}{\small{} or supplementary
-commands. Nesting may occur in the main argument, or the vv-list,
-or the settings option, or some combination of all three. With the
-commands currently introduced, nesting is unlikely to be a major concern,
-but it becomes significant for the commands defined in the associated
-package }{\small\texttt{numerica-plus}}{\small{} (see §\ref{subsec:Related-packages}).
-Since those additional commands are not available for this document,
-the examples below use the commands introduced earlier: }{\small{\small\verb`\eval`}}{\small ,
-}{\small{\small\verb`\info`}}{\small , }{\small{\small\verb`\macros`}}{\small ,
-}{\small{\small\verb`\constants`}}{\small{} and }{\small{\small\verb`\reuse`}}{\small .}{\small\par}
+\section{Nesting commands}
 
-\section{Nesting in the formula}
+\label{sec:miscNesting} The \verb`\eval` command and the supplementary
+commands of the previous chapter can be \emph{nested} –\emph{ }used
+within other \verb`\eval` or supplementary commands. Nesting may
+occur in the main argument, or the vv-list, or the settings option,
+or some combination of all three. With the commands currently introduced,
+nesting is unlikely to be a major concern, but it becomes significant
+for the commands defined in the associated package \texttt{numerica-plus}
+(see §\ref{subsec:introPackagesOptions}). Since those additional
+commands are not available for this document, the examples below use
+the commands introduced earlier: \verb`\eval`, \verb`\info`, \verb`\macros`,
+\verb`\constants` and \verb`\reuse`.
 
-{\small Consider a statement like }{\small{\small\verb`\eval{...\eval...}`}}{\small .
-There is an inner }{\small{\small\verb`\eval`}}{\small{} and
-an outer }{\small{\small\verb`\eval`}}{\small . The inner }{\small{\small\verb`\eval`}}{\small{}
-`digests' }{\small\emph{its}}{\small{} \LaTeX{} formula to produce an
-}\texttt{l3fp}{\small -readable expression which is fed to }{\small{\small\verb`l3fp`}}{\small{}
-to evaluate. The result is then returned to (the inner) }{\small{\small\verb`\eval`}}{\small{}
-to display. In version 1 of }\texttt{numerica}{\small{} that meant the
-inner command }{\small\emph{had}}{\small{} to be starred, }{\small{\small\verb`\eval*`}}{\small ,
+\subsection{In the formula}
+
+Consider a statement like \verb`\eval{...\eval...}`. There is an
+inner \verb`\eval` and an outer \verb`\eval`. The inner \verb`\eval`
+`digests' \emph{its} \LaTeX{} formula to produce an \texttt{l3fp}-readable
+expression which is fed to \texttt{l3fp} to evaluate. The result is
+then fed to the outer \verb`\eval` to be inserted into the outer
+formula to be evaluated and then displayed. In version 1 of \texttt{numerica}
+that meant the inner command \emph{had} to be starred, \verb`\eval*`,
 so that no display formatting was fed to the outer command to try
-to digest (and cause an error).}{\small\emph{ }}{\small In version
-2 of }\texttt{numerica}{\small{} this is no longer the case. }\texttt{numerica}{\small{}
-detects whether a command is inner or outer, and if inner, suppresses
-all display formatting, producing only a number, as if the command
-had been starred: }{\small\par}
+to digest (and cause an error).\emph{ }From version 2 of \texttt{numerica}
+this is no longer the case. \texttt{numerica} detects whether a command
+is inner or outer, and if inner, suppresses all display formatting,
+producing only a number, as if the command had been starred: 
 \begin{centred}
-{\small{\small\verb`\eval{$ \sin(\eval{\sin x}[x=\pi/6]\pi) + 1 $}`}}{\small{}
-$\Longrightarrow$ }{\small\eval{$ \sin(\eval{\sin x}[x=\pi/6]\pi) + 1 $}}{\small .}{\small\par}
+\verb`\eval{$ \sin(\eval{\sin x}[x=\pi/6]\pi) + 1 $}` $\Longrightarrow$
+\eval{ $\sin(\eval{\sin x}[x=\pi/6]\pi) + 1 $}.
 \end{centred}
-{\small In the presentation of the overall result, the inner }{\small{\small\verb`\eval`}}{\small{}
-command is evaluated, displaying as a number.}{\small\par}
+In the presentation of the overall result, the inner \verb`\eval`
+command is evaluated, displaying as a number.
 
-{\small In this example, the }{\small{\small\verb`x=\pi/6`}}{\small{}
-could be removed from the inner }{\small{\small\verb`\eval`}}{\small{}
-and placed in the vv-list of the outer command since outer variables
-are available to the inner command: }{\small\par}
+In the example, the inner vv-list could be attached to the outer \verb`\eval`
+\verb`x=\pi/6` since outer variables are available to the inner command
+– and it aids clarity:
 \begin{centred}
-{\small{\small\verb`\eval{$ \sin(\eval{\sin x}\pi) + 1 $}[x=\pi/6]`}}{\small{}
-$\Longrightarrow$ }{\small\eval{$ \sin(\eval{\sin x}\pi) + 1 $}[x=\pi/6]}{\small .}{\small\par}
+\verb`\eval{$ \sin(\eval{\sin x}\pi) + 1 $}[x=\pi/6]` $\Longrightarrow$
+\eval{$ \sin(\eval{\sin x}\pi)+ 1$}[x=\pi/6].
 \end{centred}
-{\small Just to show that it is possible, the next example shows }{\small{\small\verb`\eval`}}{\small{}
-being used in a }{\small{\small\verb`\constants`}}{\small{}
-command. The }{\small{\small\verb`o`}}{\small{} setting in the
-}{\small{\small\verb`\constants`}}{\small{} command pervades
-its argument; hence it needs to be explicitly turned off for the }{\small{\small\verb`\eval`}}{\small{}
-if }{\small{\small\verb`\sin(\pi/6)`}}{\small{} is to evaluate
-as expected. }{\small\par}
+Or both inner and outer commands could have their own vv-lists – indeed,
+the same variable could appear in both and be assigned different values
+in each, without conflict:
+\begin{centred}
+\verb`\eval{$ \sin(\eval{\sin x}[x=\pi/6]\pi) + x $}[x=1]` $\Longrightarrow$
+\eval{$ \sin(\eval{\sin x}[x=\pi/6]\pi) + x $}[x=1].
+\end{centred}
+Just to show that it is possible, the next example shows \verb`\eval`
+being used in a \verb`\constants` command. The \verb`o` setting
+in the \verb`\constants` command pervades its argument; hence it
+needs to be explicitly turned off for the \verb`\eval` if \verb`\sin(\pi/6)`
+is to evaluate as expected.
 \begin{verbatim}
-    \constants[o]{ y=\sin 30,x=\eval[o=0]{\sin(\pi/6)} }
+    \constants[o]{ y=\sin 30, x=\eval[o=0]{\sin(\pi/6)} }
     \eval{$ x+y $}
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \constants[o]{ y=\sin 30,x=\eval[o=0]{\sin(\pi/6)} }
-    \eval{$ x+y $}}{\small .}{\small\par}
+$\Longrightarrow$     \constants[o]{ y=\sin 30, x=\eval[o=0]{\sin(\pi/6)}}
+    \eval{$ x+y $}.
 
-\subsection{Math delimiters and double evaluations}
+\subsubsection{Math delimiters and double evaluations}
 
-{\small Any math delimiters in the inner }{\small{\small\verb`\eval`}}{\small{}
-are ignored. (This also differs from version 1 of }\texttt{numerica}{\small{}
-where they caused an error.) Obviously it is simpler to omit them
-as I have done in the examples.}{\small\par}
+Any math delimiters in the inner \verb`\eval` are ignored. (This
+also differs from version 1 of \texttt{numerica} where they caused
+an error.) Obviously it is simpler to omit them as I have done in
+the examples. 
 
-{\small However, math delimiters in the }{\small\emph{outer}}{\small{}
-}{\small{\small\verb`\eval`}}{\small{} command still have their
-normal effect and produce a }{\small\emph{formula = result, (vv-list)}}{\small{}
+However, math delimiters in the outer \verb`\eval` command still
+have their normal effect and produce a \emph{formula = result, (vv-list)}
 display. One consequence of such a display is that the formula in
-the }{\small\emph{inner}}{\small{} }{\small{\small\verb`\eval`}}{\small{}
-command is evaluated }{\small\emph{twice}}{\small{} -- once when the
-overall result is being calculated (i.e. the formula of the }{\small\emph{outer}}{\small{}
-}{\small{\small\verb`\eval`}}{\small ) and later when the overall
-display of the result is created. In the }{\small\emph{formula}}{\small{}
-part of the }{\small\emph{formula = result, {[}vv-list{]}}}{\small{}
-display, the tokens in the }{\small\emph{formula}}{\small{} are expanded
-to their display form. For example, }{\small{\small\verb`\sin`}}{\small{}
-is expanded to $\sin$, }{\small{\small\verb`\pi`}}{\small{}
-is expanded to $\pi$ -- and the inner }{\small{\small\verb`\eval`}}{\small{}
-is expanded to the numerical result of its evaluation -- a second
-evaluation. If the inner formula is simple, this will be of little
-moment, but should the inner formula contain, say, a slowly converging
-infinite series, then evaluating it twice is a bad idea and it would
-be better to remove the delimiters from the outer }{\small{\small\verb`\eval`}}{\small .
-That prevents the second evaluation.}{\small\par}
+the inner \verb`\eval` command is evaluated \emph{twice} – once when
+the overall result is being calculated (i.e.\ the formula of the
+outer \verb`\eval`) and later when the overall display of the result
+is created. In the \emph{formula} part of the \emph{formula = result,
+{[}vv-list{]}} display, the tokens in the \emph{formula} are expanded
+to their display form. For example, \verb`\sin` is expanded to $\sin$,
+\verb`\pi` is expanded to $\pi$ – and the inner \verb`\eval` is
+expanded to the numerical result of its evaluation – which means a
+second evaluation. If the inner formula is simple, this will be of
+little moment, but should the inner formula contain, say, a slowly
+converging infinite series, then evaluating it twice is a bad idea
+and it would be better to remove the delimiters from the outer \verb`\eval`.
+That prevents the second evaluation. 
 
-{\small The problem does not arise if the outer }{\small{\small\verb`\eval`}}{\small{}
-lies within a math environment (e.g. }{\small{\small\verb`$ \eval{...} $`}}{\small )
-since that produces a display of the form }{\small\emph{result, {[}vv-list{]}.}}{\small{}
-The formula is not displayed and so the second evaluation does not
-occur. The inner }{\small{\small\verb`\eval`}}{\small{} is evaluated
-once only to calculate the result.}{\small\par}
+The problem does not arise if the outer \verb`\eval` lies within
+a math environment (e.g.\  \verb`$ \eval{...} $`) since that produces
+a display of the form \emph{result, (vv-list).} The formula is not
+displayed and so the second evaluation does not occur. The inner \verb`\eval`
+is evaluated once only  to calculate the result.
 
-\section{Nesting in the vv-list}
+\subsection{In the vv-list}
 
-{\small The inner }{\small{\small\verb`\eval`}}{\small{} can
-be placed in the vv-list of the outer command. If the vv-list of the
-inner }{\small{\small\verb`\eval`}}{\small{} contains a comma
-(meaning there are at least two variables), then the entire inner
-}{\small{\small\verb`\eval`}}{\small{} and its \LaTeX{} arguments
-needs to be wrapped in braces to hide the comma or commas of its vv-list
-from the outer }{\small{\small\verb`\eval`}}{\small . To show
-the effect of not doing so, I have slightly complicated the previous
-example by adding a second (unnecessary) variable. The first example
-is with braces, the second without: }{\small\par}
+The inner \verb`\eval` can be placed in the vv-list of the outer
+command. If the vv-list of the inner \verb`\eval` contains a comma
+then the entire inner \verb`\eval` and its \LaTeX{} arguments needs
+to be wrapped in braces to hide \emph{its} comma from the vv-list
+of the outer \verb`\eval`. To show the effect of not doing so, I
+have slightly complicated a previous example by adding a second (unnecessary)
+variable. The first example is with braces, the second without:
 \begin{centred}
-{\small{\small\verb`\eval{$ \sin k\pi + 1 $}[k={\eval{y\sin x}[x=\pi/6,y=1]}]`}}{\small{}
-$\Longrightarrow$ }{\small\eval{$ \sin k\pi + 1 $}[k={\eval{y\sin x}[x=\pi/6,y=1]}]}{\small .}{\small\par}
+\verb`\eval{$ \sin k\pi + 1 $}[k={\eval{y\sin x}[x=\pi/6,y=1]}]`
+$\Longrightarrow$ \eval{$ \sin k\pi + 1 $} [k={\eval{y\sin x}[x=\pi/6,y=1]}].
 
-{\small{\small\verb`\eval{$ \sin k\pi + 1 $}[k=\eval{y\sin x}[x=\pi/6,y=1]]`}}{\small{}
-$\Longrightarrow$ }{\small\eval{$ \sin k\pi + 1 $}[k=\eval{y\sin x}[x=\pi/6,y=1]]}{\small\par}
+\verb`\eval{$ \sin k\pi + 1 $}[k=\eval{y\sin x}[x=\pi/6,y=1]]` $\Longrightarrow$
+\eval{$ \sin k\pi +1 $}[k=\eval{y\sin x}[x=\pi/6,y=1]].
 \end{centred}
-{\small The vv-list of the outer }{\small{\small\verb`\eval`}}{\small{}
-is parsed as containing two entries, }{\small{\small\verb`k=\eval`}}{\small{}
-}{\small{\small\verb`{y\sin x}[x=\pi/6`}}{\small{} and }{\small{\small\verb`y=1]`}}{\small .
-Both will cause errors but since the vv-list is evaluated from the
-right, it is }{\small{\small\verb`y=1]`}}{\small{} which actually
-does so.}{\small\par}
+The vv-list of the outer \verb`\eval` is parsed as containing two
+entries, first \verb`k=\eval` \verb`{y\sin x}[x=\pi/6` and second
+\verb`y=1]` (containing the right bracket). Both will cause errors
+but since the vv-list is evaluated from the right, it is \verb`y=1]`
+which actually does so. 
 
-\section{Nesting in the settings option}
+\subsection{In the settings option}
 
-{\small This will be rare, but commands can occur in the settings option
-of the outer command. The \verb`\info` command provides a good example.
-I have included it in the punctuation setting of an \verb`\eval`-uation. }{\small\par}
+This will be rare, but commands can occur in the settings option of
+the outer command. The \verb`\info` command provides a good example.
+I have included it in the punctuation setting of an \verb`\eval`-uation. 
 \begin{verbatim}
     \eval[p=\mbox{,\qquad\info{sum} terms.}]
-      {\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3]
+      {\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3] 
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \eval[p=\mbox{,\qquad\info{sum} terms.}]
-      {\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3]}{\small\par}
+$\Longrightarrow$ \eval[p=\mbox{,\qquad\info{sum} terms.}]{\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!}\]}[3]
 
-{\small Because of the }{\small{\small\verb`\[ \]`}}{\small{}
-math delimiters, if the }{\small{\small\verb`\info`}}{\small{}
-command had been placed }{\small\emph{after}}{\small{} the }{\small\texttt{\textbackslash eval}}{\small{}
+Because of the \verb`\[ \]` math delimiters, if the \verb`\info`
+command had been placed \emph{after} the \texttt{\textbackslash eval}
 command, it would have slid down to the next line. Used in the settings,
-as here, the display is }{\small\emph{inside}}{\small{} the }{\small{\small\verb`\[ \]`}}{\small{}
-delimiters, on the same line as the expression. This may be significant
-for adjusting vertical spacing of later parts of the document --
-widow and orphan control for instance.}{\small\par}
+as here, the display is \emph{inside} the \verb`\[ \]` delimiters,
+on the same line as the expression. This may be significant for adjusting
+vertical spacing of later parts of the document – widow and orphan
+control for instance.
 
-{\small A point to note is the explicit writing of the `terms' descriptor.
-Normally }{\small{\small\verb`\info{sum}`}}{\small{} would automatically
-supply the descriptor, but as noted earlier, nesting of one command
-in another suppresses all elements of display of the inner command
-beyond the numerical result. It is as if the inner command is starred.
-Because the }{\small{\small\verb`\info`}}{\small{} command is
-nested in the }{\small{\small\verb`\eval`}}{\small{} command,
-the `terms' descriptor is suppressed and has had to be explicitly
-supplied by hand.}{\small\par}
+A point to note is the explicit writing of the `terms' descriptor.
+Normally \verb`\info{sum}` would automatically supply the descriptor,
+but as noted earlier, nesting of one command in another suppresses
+all elements of display of the inner command beyond the numerical
+result. It is as if the inner command is starred. Because the \verb`\info`
+command is nested in the \verb`\eval` command, the `terms' descriptor
+is suppressed and has had to be explicitly supplied by hand.
 
-\section{Rounding and display}
+\subsection{Rounding and display}
 
-{\small In the display of the overall result, it is the result of the
-inner command which is shown, not the formula that the inner command
-acts on. How that number is displayed is determined by the number-format
-specification of the }{\small\emph{inner}}{\small{} command. Note however
-that this specification affects only how the result of the inner command
-is shown. Always 16 figures are passed from the inner command to the
-outer, as you can see in this example: }{\small\par}
+In the display of the overall result, it is the numerical outcome
+of the inner command which is shown, not the formula that the inner
+command acts on. In previous versions of \texttt{numerica} that result
+was \emph{always} evaluated to $16$ figures which were then fed into
+the formula of the outer command. From version 3.0.0, the number-format
+option of the inner command is heeded, \emph{if it is present}, and
+only the specified number of decimal digits of the floating point
+result are fed to the the outer command. In its absence, the inner
+command feeds $16$ significant figures to the the outer command.
+For example,
 \begin{verbatim}
-    \eval{$ \pi - \eval{ \pi }[4] $}[15]
+    \eval[env=alignat*,ff]{ \pi - \eval{ \pi },
+                       \pi - \eval{ \pi }[4] }[15*]
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \eval{$ \pi - \eval{ \pi }[4] $}[15]}{\small .}{\small\par}
+$\Longrightarrow$ \eval[env=alignat*,ff]{ \pi - \eval{ \pi },
+                     \pi - \eval{ \pi }[4] }[15*]
 
-\noindent{\small The outer result would not be zero to $15$ places
-of decimals if the inner result were restricted to $4$ decimal places.
-It is only the }{\small\emph{display}}{\small{} of the inner result
-which is so restricted.}{\small\par}
+\noindent In the first instance, with no explicit number-format specification
+for the inner \verb`\eval`, the outer result is zero because all
+$16$ significant figures of the inner result have been passed to
+the outer \verb`\eval`; in the second instance, with an explicit
+rounding number specified, only $4$ decimal digits have been passed
+to the outer \verb`\eval` and as a consequence the overall result
+does not vanish. 
 
-{\small For infinite sums and products (and for }{\small{\small\verb`\nmcIterate`}}{\small{}
-and }{\small{\small\verb`\nmcSolve`}}{\small{} of the }\texttt{numerica}{\small{}
-package), the rounding value is not just for display purposes but
-is also used to determine the result. This may require judicious use
-of the extra rounding setting to get a sensible display. In the first
-instance below, the second sum stops at an effective rounding value
-of $5+2=7$, since the default extra rounding is $+2$, and the first
-sum (the inner one) also stops at $7=4+3$. No surprise then that
-the overall result is $0$. In the second instance, the inner sum
-stops at a rounding value of $4+2=6$. Although the left-hand side
-of the display is unaltered, the result is no longer $0$. }{\small\par}
+\subsubsection{\textquoteleft\texttt{-ed}\textquoteright{} environments}
+
+With `inner' environments like \verb`cases` and \verb`dcases`,
+\verb`array` and the AMS `\verb`-ed`' environments which are used
+\emph{within} a math environment, there can be a conflict between
+display and result when commands are nested. Consider the example
 \begin{verbatim}
-     \eval{$ \eval[S+=3]{\sum_{n=1}^\infty 1/n^3}[4*]
-       - \sum_{n=1}^\infty 1/n^3$}[5]
+    \[ \eval[env=array,pp,p=.,ff]{ \pi - \eval{ \pi },
+                             \pi - \eval{ \pi }[15] }[15*] \]
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}     \eval{$ \eval[S+=3]{\sum_{n=1}^\infty 1/n^3}[4*]
-       - \sum_{n=1}^\infty 1/n^3$}[5]}{\small\par}
+$\Longrightarrow$ \[ \eval[env=array,pp,p=.,ff]{\pi - \eval{ \pi },
+                             \pi - \eval{ \pi }[15] }[15*] \]In both instances the result is zero to all $16$ significant figures,
+but only the second instance, where an explicit rounding number is
+specified, displays correctly. The \emph{implicit} rounding number
+in the first instance is used in the display but not in the calculation. 
 
-\noindent{\small whereas }{\small\par}
+To see what is going on in this case, put \verb`dbg=7*11` in the
+settings option. This will display both the fp-form and the \LaTeX{}
+form of the result:
 \begin{verbatim}
-    \eval{$ \eval[S+=2]{\sum_{n=1}^\infty 1/n^3}[4*]
-       - \sum_{n=1}^\infty 1/n^3$}[5]
+\[ \eval[env=array,dbg=7*11]{ \pi - \eval{ \pi } }[15*] \]
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \eval{$ \eval[S+=2]{\sum_{n=1}^\infty 1/n^3}[4*]
-       - \sum_{n=1}^\infty 1/n^3$}[5]}{\small .}{\small\par}
+$\Longrightarrow$ \[ \eval[env=array,dbg=7*11]{ \pi - \eval{ \pi } }[15*] \]
 
-\section{Error messages}
+\noindent In the \emph{formula} part of the \emph{formula=result}
+display, the \emph{formula} contains the unevaluated \verb`\eval{ \pi }`,
+whereas the \emph{result} has long since been evaluated. When \LaTeX{}
+comes to display the whole thing, the \verb`\eval` in the \emph{formula
+}is finally expanded, which means evaluated. The rounding value is
+the implicitly specified $6$ decimal places of \emph{this} \verb`\eval`,
+not the explicitly specified $15$ of the outer \verb`\eval`. This
+is a problem for this group of `inner' environments. The solution
+is to explicitly specify rounding numbers for inner \verb`\eval`
+commands.
 
-{\small Errors in an inner command create a small change in error message
-display. }{\small\par}
+\subsection{Error messages}
+
+Errors in an inner command create a small change in error message
+display.
 \begin{centred}
-{\small{\small\verb`\eval{ 1 + \eval{ 1 + \eval{ k } } }`}}{\small{}
-$\Longrightarrow$ }{\small\eval{ 1 + \eval{ 1 + \eval{ k } } }}{\small\par}
+\verb`\eval{ 1 + \eval{ 1 + \eval{ k } } }` $\Longrightarrow$\\
+ \eval{ 1 + \eval{ 1 + \eval{ k } } }
 
-{\small{\small\verb`\eval{ x + \eval{ k }[k=\arcsin 2] }[x=1]`}}{\small{}
-$\Longrightarrow$ }{\small\eval{ x + \eval{ k }[k=\arcsin 2] }[x=1]}{\small\par}
+\verb`\eval{ x + \eval{ k }[k=\arcsin 2] }[x=1]` $\Longrightarrow$\\
+ \eval{ x + \eval{ k }[k=\arcsin 2] }[x=1]
 \end{centred}
-{\small An integer is added to the `where' part of the error message.
-The integer indicates the }{\small\emph{level of nesting}}{\small{}
-where the error occurs.}{\small\par}
+An integer is added to the `where' part of the error message. The
+integer indicates the \emph{depth} (or \emph{level}) where the error
+occurs.
 
-{\small If there is no nesting where the error occurs, the integer
-is suppressed, even though there may be nesting elsewhere in the overall
-expression. This is in the interests of straightforwardness when nesting
-is absent, which will be overwhelmingly the most common situation. }{\small\par}
+For an error at the top level the integer is suppressed, even though
+there may be nesting elsewhere in the overall expression. This is
+in the interests of straightforwardness when nesting is absent, which
+will be overwhelmingly the most common situation.
 \begin{centred}
-{\small{\small\verb`\eval{ k + \eval{ x }[x=1] }[k=\arcsin 2]`}}{\small{}
-$\Longrightarrow$ }{\small\eval{ k + \eval{ x }[x=1] }[k=\arcsin 2]}{\small\par}
+\verb`\eval{ k + \eval{ x }[x=1] }[k=\arcsin 2]` $\Longrightarrow$\\
+ \eval{ k + \eval{ x }[x=1] }[k=\arcsin 2]
 \end{centred}
 
-\section{Debugging}
+\subsection{Debugging}
 
-{\small\label{subsec:nestDebugging}It is worth looking at the debug
-display when }{\small{\small\verb`\eval`}}{\small{} commands
-are nested. For the outer }{\small{\small\verb`\eval`}}{\small{}
-command: }{\small\par}
+\label{subsec:miscNestingDebugging}It is worth looking at the debug
+display when \verb`\eval` commands are nested. For the outer \verb`\eval`
+command:
 \begin{centred}
-{\small{\small\verb`\eval[dbg=1]{$ \sin \eval*{\sin x}[x=\pi/6]\pi + 1 $}`}}{\small{}
-$\Longrightarrow$ }{\small\eval[dbg=1]{$ \sin \eval*{\sin x}[x=\pi/6]\pi + 1 $}}{\small\par}
+\verb`\eval[dbg=1]{$ \sin \eval{\sin x}[x=\pi/6]\pi + 1 $}` $\Longrightarrow$
+\eval[dbg=210]{$ \sin \eval{\sin x}[x=\pi/6]\pi + 1$}
 \end{centred}
-{\small There is no vv-list for the outer command whence the two empty
-slots in the display but when the inner }{\small{\small\verb`\eval`}}{\small{}
-is in the vv-list, they are filled: }{\small\par}
+There is no vv-list for the outer command whence the two empty slots
+in the display but when the inner \verb`\eval` is in the vv-list,
+they are filled:
 \begin{centred}
-{\small{\small\verb`\eval[dbg=1]{$ \sin k\pi + 1 $}[k=\eval*{\sin x}[x=\pi/6]]`}}{\small{}
-$\Longrightarrow$ }{\small\eval[dbg=1]{$ \sin k\pi + 1 $}[k=\eval*{\sin x}[x=\pi/6]]}{\small\par}
+\verb`\eval[dbg=1]{$ \sin k\pi + 1 $}[k={\eval{\sin x}[x=\pi/6]}]`
+$\Longrightarrow$ \eval[dbg=1]{$ \sin k\pi + 1$} [k={\eval{\sin x}[x=\pi/6]}]
 \end{centred}
-{\small For the inner }{\small{\small\verb`\eval`}}{\small{}
-command debugging may still work but in an idiosyncratic way. To clarify
-exactly what is going on I have added a }{\small{\small\verb`\left( \right)`}}{\small{}
-pair around the entire inner }{\small{\small\verb`\eval`}}{\small{}
-command. Note that I have also used a }{\small\emph{negative}}{\small{}
-}{\small\texttt{dbg}}{\small{} value. With a positive value, the right
-parenthesis is pressed toward the right margin of the page. The negative
-value limits the display to the text width and gives the much neater
-result shown. }{\small\par}
+Contrary to their behaviour (which was accidental) in earlier versions
+of \texttt{numerica} debug numbers have no effect when used with an
+inner \verb`\eval` command:
 \begin{verbatim}
-    \eval[()=2]{$
-      \sin\left( 
-            \eval*[dbg=-1]{ \sin x }[x=\pi/6]
-          \right)\pi + 1 $}
+    \eval{$ \sin{\left( 
+            \eval[dbg=1]{ \sin x }[x=\pi/6]
+            \right)\pi} + 1 $}
 \end{verbatim}
-{\small$\Longrightarrow$ }{\small{}    \eval[()=2]{$
-      \sin\left( 
-            \eval*[dbg=-1]{ \sin x }[x=\pi/6]
-          \right)\pi + 1 $}}{\small\par}
+$\Longrightarrow$     \eval{$
+      \sin{\left( 
+            \eval[dbg=-1]{ \sin x }[x=\pi/6]
+          \right)\pi} + 1 $}
 
-{\small\medskip{}
- The debug display from the inner }{\small{\small\verb`\eval`}}{\small{}
-command has been inserted into the formula of the outer }{\small{\small\verb`\eval`}}{\small{}
-in the position occupied by the inner }{\small{\small\verb`\eval`}}{\small .
-I did not deliberately code for this, but have decided to leave it
-as is despite the potential for some rather odd displays, since there
-can be no confusion about which }{\small{\small\verb`\eval`}}{\small{}
-command is being `debugged'. In this last example, in order to both
-use }{\small{\small\verb`\left(...\right)`}}{\small{} and have
-the calculation give the previous result I have employed the setting
-}{\small{\small\verb`()=2`}}{\small{} in the outer }{\small{\small\verb`\eval`}}{\small ;
-see §\ref{subsec:parseTrigFns}.}{\small\par}
+In the example, note the use of braces to define the argument of the
+outer \verb`\sin` function; see §§\ref{subsec:evalBraced-groups},
+\ref{subsec:calcComplicated-arguments}.
 
-\chapter{Using \texttt{numerica} with \protect\LyX}
+\section{Parsing mathematical arguments}
 
-{\small\label{chap:LyX}The document processor \LyX{} has a facility
-that enables snippets from a document to be compiled separately and
-the results presented to the user without having to compile the entire
-document. The present document was written in \LyX . The demonstration
-calculations were evaluated using this }{\small\emph{instant preview}}{\small{}
-facility.}{\small\par}
+\label{sec:miscArgument-parsing} A main aim of the \texttt{numerica}
+package is to require minimal, preferably no, adjustment to the \LaTeX{}
+form in which an expression is typeset in order to evaluate it. But
+when writing formulas mathematicians do not follow codified rules
+of the kind programming languages insist on – like parenthesizing
+the arguments of functions, or inserting explicit multiplication signs
+({*}) between juxtaposed terms. For the package to attain its aim,
+the question of where the arguments of mathematical functions end
+is acute. 
 
-{\small To use }{\small\texttt{numerica}}{\small{} in \LyX{} go to }{\small\textsf{Document
-\lyxarrow{} Settings \lyxarrow{} LaTeX Preamble}}{\small{} and enter }{\small\par}
-\begin{lyxcode}
-{\small\textbackslash usepackage\{numerica\}}{\small\par}
-\end{lyxcode}
-{\small then click }{\small\textsf{OK}}{\small . You may wish to follow
-the above line in the preamble with }{\small{\small\verb`\nmcReuse{}`}}{\small : }{\small\par}
-\begin{lyxcode}
-{\small\textbackslash usepackage{[}lyx{]}\{numerica\}}{\small\par}
+Before discussing the rules \texttt{numerica} uses to answer this
+question, I discuss the tools the package provides to handle exceptions
+to those rules, when an author \emph{does} need to make some adjustment
+to a formula for it to be evaluated correctly. 
 
-{\small\textbackslash nmcReuse\{\}}{\small\par}
-\end{lyxcode}
-{\small In that case, type the extra line and }{\small\emph{then}}{\small{}
-click }{\small\textsf{OK}}{\small . The additional line ensures all
-saved values are available in your document from the outset.}{\small\par}
+\subsection{\protect\LaTeX{} braces}
 
-\section{Instant~preview}
+\label{subsec:settingsBraces}So, one has a complicated argument to
+a mathematical function. It is clear to a person reading the compiled
+expression in the \texttt{pdf} where the argument ends. The simplest
+way to make it clear to \texttt{numerica} also is by enclosing the
+argument in \LaTeX{} braces. This is the recommended practice from
+version 3.0.0 of \texttt{numerica}, both because braces do not alter
+the visual appearance of the formula in the \texttt{pdf} and because
+it is consonant with general \LaTeX{} practice. 
 
-{\small The instant preview facility of \LyX{} performs mini-\LaTeX{}
-runs on selected parts of a document (for instance, the mathematical
-parts) and displays the results in \LyX{} while the user continues
-to work on the surrounding document.}{\small\texttt{ numerica}}{\small{}
-uses these mini-\LaTeX{} runs to do its evaluations and display their
-results. That means you get feedback on your calculations almost immediately.}{\small\par}
+The following expression, $\sin(n+\tfrac{1}{2})(x-t)$, or one like
+it, occurs in multiple texts on Fourier series. The human reader understands
+that the argument of the sine includes \emph{both} parenthesized factors.
+But asking \texttt{numerica} to evaluate it `as is' produces
+\begin{centred}
+\verb`\eval{$ \sin(n+\tfrac12)(x-t) $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
+\eval{$ \sin(n+\tfrac12)(x-t) $}[n=3,x=t+\pi,t=1.234],
+\end{centred}
+which is $(\sin\tfrac{7}{2})\times\pi$ and not what was intended.
+Enclosing the whole argument – both factors – in braces rescues the
+situation,
+\begin{centred}
+\verb`\eval{$ \sin{(n+\tfrac12)(x-t)} $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
+\eval{$ \sin{(n+\tfrac12)(x-t)} $}[n=3,x=t+\pi,t=1.234],
+\end{centred}
+which is $\sin(\tfrac{7}{2}\pi)$, as intended. Another example is
+\begin{centred}
+\verb`\eval{\[\cos{\frac{2\pi}T n(t+\tfrac12T)}\]}[T=2,t=1,n=3]`
 
-{\small To use this facility first ensure that instant preview is turned
-on. This means selecting }{\small\textsf{Tools \lyxarrow Preferences
-\lyxarrow Look \& Feel \lyxarrow{} Display}}{\small , ensuring that
-the }{\small\textsf{Display graphics}}{\small{} checkbox is checked,
-and against }{\small\textsf{Instant preview}}{\small{} selecting }{\small\textsf{On}}{\small ,
-then clicking }{\small\textsf{OK}}{\small .}{\small\par}
+$\Longrightarrow$ \eval{\[ \cos{\frac{2\pi}{T}n(t+\tfrac12T)}
+        \]}[T=2,t=1,n=3]
+\end{centred}
+which otherwise evaluates to $-6$.
 
-\subsection{Document location}
+See §\ref{subsec:calcComplicated-arguments} for further examples.
+The point is that the braces do not alter the visual appearance in
+the \texttt{pdf} but do delimit the whole argument for the \verb`\eval`
+command.
 
-{\small It also matters where your document is located. You may have
-your own local or personal texmf tree (see §\ref{subsec:settingsPersonal-texmf-tree}).
-If your document is located there, perhaps in the }{\small{\small\verb`doc`}}{\small{}
-folder, then not all features of preview will work as expected. Presumably
-this is because both \LyX{} and your \LaTeX{} distribution (e.g. \TeX Live
-or MiK\TeX ) are interacting with the location and interfere. Move
-your document to another location which your \LaTeX{} distribution
-has no interest in, and open it in \LyX{} there.}{\small\par}
+\subsection{The cleave commands \texttt{\textbackslash q} and \texttt{\textbackslash Q}}
 
-\subsection{Global vs local previewing}
+\label{subsec:miscCleave}An alternative to using braces is to use
+\texttt{numerica}'s `cleave' commands. The word \emph{cleave} has
+two opposed meanings: to adhere or cling to, and to split apart or
+separate. \texttt{numerica} defines two commands, \verb`\q` and \verb`\Q`
+to achieve these opposite effects. When a mathematical argument is
+being parsed, the \verb`\q` command joins the next token to the argument
+(cleaves\emph{ to}); the \verb`\Q` command severs the next token
+from the argument (cleaves\emph{ apart}). Neither command leaves a
+visible trace in the output or has any other effect on the calculation
+beyond joining or severing the tokens on either side. 
 
-{\small\label{subsec:LyXGlobal-vs-local}Compilation of previews occurs
-in two distinct modes.}{\small\par}
+Repeating the penultimate example with \verb`\q` between the bracketed
+factors rather than enclosing all in braces, 
+\begin{centred}
+\verb`\eval{$ \sin(n+\tfrac12)\q(x-t) $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
+\eval{$ \sin(n+\tfrac12)\q(x-t) $}[n=3,x=t+\pi,t=1.234].
+\end{centred}
+which again is $\sin(\tfrac{7}{2}\pi)$. 
 
-\paragraph{Global preview generation:}
+The \verb`\Q` command splits an argument. Without it, we have
+\begin{centred}
+\verb`\eval{$ \ln n\,X $}[n=2,X=e^2]` $\Longrightarrow$ \eval{$ \ln n\,X $}[n=2,X=e^2]; 
+\end{centred}
+with \verb`\Q` inserted before the fraction,
+\begin{centred}
+\verb`\eval{$ \ln n\Q\,X $}[n=2,X=e^2]` $\Longrightarrow$ \eval{$ \ln n\Q\,X $}[n=2,X=e^2]. 
+\end{centred}
+However, an author could be kinder to the reader by not using a thin
+space (\verb`\,`) to indicate separation of the terms but rather
+parentheses, ($(\ln n)X$, or rearrangement, $X\ln n$, and avoid
+the need for \verb`\Q` entirely. 
 
-{\small When a document is opened (and preview is }{\small\emph{on}}{\small ),
-all previews in the document are formed in sequence in the one \LaTeX{}
-run. This is the global mode. The mini-\LaTeX{} run may well be substantial.
-It compiles a }{\small{\small\verb`.tex`}}{\small{} file that
-begins with the document's preamble with some additions then comes
-}{\small{\small\verb`\begin{document}`}}{\small . That is followed
-by a sequence of preview environments, }{\small\par}
-\begin{lyxcode}
-{\small\textbackslash begin\{preview\}}{\small\par}
+\subsubsection{Mnemonic}
 
-{\small <stuff>}{\small\par}
+As mnemonic, best seen in sans serif for the Latin Modern fonts used
+in this document, think of the letter \textsf{q} as a circle cleaving\emph{
+to} a vertical descender; think of the letter \textsf{Q} as a circle
+cleaved\emph{ asunder} by the diagonal stroke.
 
-{\small\textbackslash end\{preview\}}{\small\par}
-\end{lyxcode}
-{\small one for each preview in the document. Finally there is an }{\small{\small\verb`\end{document}`}}{\small{}
-statement. The critical point is that all previews are between the
-same }{\small{\small\verb`\begin{document}`}}{\small , }{\small{\small\verb`\end{document}`}}{\small{}
-statements, and so earlier previews in the sequence can communicate
-with later ones.}{\small\par}
+\subsection{Parsing groups}
 
-\paragraph{Local preview generation:}
+A formula is a sequence of tokens and brace groups. When evaluating
+a formula, \verb`\eval` digests the formula from the left, \LaTeX{}
+argument by \LaTeX{} argument, where \emph{argument} here means either
+a token (an N-type argument in \verb`expl3`-speak) or a brace group
+(an n-type argument). Some mathematical functions have arguments which
+correspond to \LaTeX{} arguments – think \verb`\sqrt`, \verb`\frac`,
+\verb`\binom`; also \verb`^`. But for mathematical functions like
+\verb`\surd` or \verb`\sin` or \verb`\ln`, this is not so; nor
+is it for sums and products, nor for comparisons. There need be no
+direct translation of \LaTeX{} argument (an `L-arg') to mathematical
+argument (an `M-arg').
 
-{\small The other mode in which preview operates is local. Suppose
-you have your document open and want to add to it, for instance with
-a simple evaluation, }{\small{\small\verb`\eval{x+y}[x=1,y=2]`}}{\small{}
-in an ERT inset in a preview inset. The resulting mini-\LaTeX{} run
-is of the form }{\small\par}
-\begin{lyxcode}
-{\small <preamble>}{\small\par}
+\begin{wraptable}{o}{0.5\columnwidth}%
+\caption{ Parsing groups}\label{tab:miscShadingGroups}
 
-{\small\textbackslash begin\{document\}}{\small\par}
+\begin{centering}
+\begin{center}
+\begin{tabular}{ll}
+\toprule 
+group & function/operation\tabularnewline
+\midrule
+I & surd, \verb`Not`\tabularnewline
+II & unary functions, \verb`/`\tabularnewline
+III & sums, products\tabularnewline
+IV & comparisons\tabularnewline
+V & \verb`And`, \verb`Or`\tabularnewline
+\bottomrule
+\end{tabular}
+\par\end{center}
+\par\end{centering}
+\end{wraptable}%
+Different mathematical functions, operations, relations – for convenience
+call them collectively \emph{functions} – have different reaches when
+it comes to how we read subsequent tokens. We might think of a function
+as casting a shadow over subsequent tokens; what lies in the shadow
+is part of its argument; what lies beyond the shadow is not. Table
+§\ref{tab:miscShadingGroups} lists the different \emph{parsing groups
+}(alternatively \emph{shading groups}) that \texttt{numerica} takes
+account of. Those functions with the lowest group number have the
+shortest reach, cast the shortest shadows which progressively lengthen
+as the group number increases. 
 
-{\small\textbackslash begin\{preview\}}{\small\par}
+To justify the groupings in Table~\ref{tab:miscShadingGroups}, I
+look at examples, particularly from \emph{HMF} but also from G. H.
+Hardy, \emph{A course of pure mathematics}, and other sources and
+use the following terminology. A mathematical argument may end \emph{at}
+an L-arg, meaning immediately before the L-arg, or end \emph{with}
+the L-arg, meaning immediately after the L-arg. Ending or not will
+in general depend on whether the argument is in \emph{first position}
+– the position immediately following a function token like \verb`\sin`
+or \verb`\surd` – or in \emph{general position} – any later position.
+Formatting elements do not change the position count. This applies
+to things like spaces or phantoms (and their arguments) or modifiers
+like \verb`\left` or \verb`\biggl`. Multi-token numbers (in decimal
+or scientific formats) are treated as single items; they advance the
+position count by exactly one. Finally, a \emph{naked} sign (like
+a plus or minus sign) is one that is \emph{not} enclosed in brackets
+lying wholly to the right of the function whose argument is being
+determined.
 
-{\small\textbackslash eval\{x+y\}{[}x=1,y=2{]}}{\small\par}
+\subsubsection{Parsing group I}
 
-{\small\textbackslash end\{preview\}}{\small\par}
+The only functions in this category are the surd and logical \verb`Not`. 
 
-{\small\textbackslash end\{document\}}{\small\par}
-\end{lyxcode}
-{\small The preamble is as before but there is only }{\small\emph{one}}{\small{}
-preview between the }{\small{\small\verb`\begin{document}`}}{\small ,
-}{\small{\small\verb`\end{document}`}}{\small{} statements.
+Why distinguish the surd from other unary functions? Hardy writes
+(§13) $\surd(pq)$ but (§206) $\log xy=\log x+\log y$ – the surd
+does not have the reach of the logarithm. The logarithm extends to
+both members of a product; the surd does not and the factors need
+to be parenthesized if the surd is to apply to both.\emph{ }Surely
+we all agree that \verb`\sin2\pi`, displaying as $\sin2\pi$, vanishes?
+The argument of the sine extends beyond the $2$ to include the $\pi$.
+But \verb`\surd2\pi`, displaying as $\surd2\pi$, we understand to
+be $\surd2\times\pi$. The argument of the surd ends with the $2$.
+The surd binds more tightly to its argument than is true of unary
+functions generally. 
+
+For parsing group I
+\begin{enumerate}
+\item if a left bracket is in first position, the mathematical argument
+ends with the matching right bracket; otherwise
+\item the argument ends with the item in first position and any L- or M-args
+required by that item.
+\end{enumerate}
+If the factorial sign \verb`!` \emph{preceded} its argument, it too
+would belong in this parsing group, for it also binds tightly like
+the surd. This means that an expression like $\surd4!$ is intrinsically
+ambiguous. Is it the square root of $24$ or the factorial of $2$?
+In \texttt{numerica} it produces the (perhaps rather odd) error
+\begin{centred}
+\verb`\eval{$ \surd 4! $}` $\Longrightarrow$ \eval{$ \surd4! $}
+\end{centred}
+Since \verb`\eval` digests a formula from the left, the surd seizes
+the argument \verb`4`; there is then nothing for the factorial to
+operate on. Parenthesizing like either \verb`(\surd 4)!` or \verb`\surd(4!)`
+repairs the situation. Because other unary functions (like the sine
+or logarithm) do not bind as tightly, this ambiguity does not arise
+for them.
+
+Exponents cause no problem because taking square roots and raising
+to a power are commutative operations – the result is the same whichever
+is performed first. 
+\begin{centred}
+\verb`\eval[pp,ff]{$ \surd 3^4, \surd(3^4), (\surd3)^4 $}` $\Longrightarrow$
+\eval[pp,ff]{$ \surd 3^4, \surd(3^4), (\surd3)^4 $}.
+\end{centred}
+
+\subsubsection{Parsing group II}
+
+This category includes the trigonometric and hyperbolic functions,
+their inverses, the various logarithms and the exponential functions,
+and the signum function \verb`\sgn`. It also includes the denominators
+of slash fractions \verb`/`. 
+\begin{itemize}
+\item In parsing group II we wish to accommodate usages like $\ln z^{n}=n\ln z$
+(\emph{HMF} 4.1.11), or $2\arctan e^{z}$ (\emph{HMF} 4.3.117), meaning
+an exponent is included in the argument. This must include exponents
+of parenthesized arguments to accommodate 
+\[
+\ln\left(1+\frac{x}{n}\right)^{n}=n\ln\left(1+\frac{x}{n}\right).
+\]
+\item An approximation to Stirling's formula for the factorial is often
+written $\ln N!\approx N\ln N-N$ (widely used in texts on statistical
+mechanics). Hence the factorial sign should also be considered part
+of the argument.
+\item $\ln xy=\ln x+\ln y$ means the argument must reach over a product
+of variables. Identities like $\sin2z=2\sin z\cos z$ mean the argument
+also reaches over numbers, and expressions like $\sin\tfrac{1}{2}\pi x$
+(\emph{HMF} 4.3.104) mean that it further reaches over \verb`\tfrac`-s
+and constants.
+\item Essentially \emph{anything }can be in first position, and without
+parentheses; e.g.
+\begin{itemize}
+\item unary functions: $\ln\ln z$ (\emph{HMF} 4.1.52), $\ln\tan\dfrac{z}{2}$
+(\emph{HMF} 4.3.116),
+\item fractions: $\ln\dfrac{z_{1}}{z_{2}}$ (\emph{HMF} 4.1.9), $\arcsin\dfrac{(2ax+b)}{(b^{2}-4ac)^{1/2}}$
+(\emph{HMF} 3.3.36), $\ln\dfrac{\tan z}{z}$ (\emph{HMF} 4.3.73),
+\item absolute values: $\ln\abs*{\dfrac{a+x}{a-x}}$ (\emph{HMF} 3.3.25),
+\item square roots: $\arctan\sqrt{\dfrac{\nu_{1}}{\nu_{2}}F}$ (\emph{HMF
+}26.6.8)
+\end{itemize}
+\end{itemize}
+With these examples in mind, for parsing group II
+\begin{enumerate}
+\item if a left bracket is in first position, the mathematical argument
+ends with the matching right bracket and any attached exponent, or
+factorial or double factorial sign; otherwise
+\item the mathematical argument includes the item in first position and
+any L- or M-args required by that item; 
+\begin{enumerate}
+\item if the item in first position is a number, variable, constant or \verb`\tfrac` 
+\begin{enumerate}
+\item the argument appends the next item if it is a number, variable, constant
+or \verb`\tfrac`, and so on recursively; or
+\item the argument appends the next item if it is an exponent, or facorial
+or double factorial sign, and ends there; otherwise
+\item the argument ends.
+\end{enumerate}
+\item if the item in first position is not a number, variable, constant
+or \verb`\tfrac`
+\begin{enumerate}
+\item the argument appends the next item if it is an exponent, or factorial
+or double factorial sign, and ends there; otherwise
+\item the argument ends.
+\end{enumerate}
+\end{enumerate}
+\end{enumerate}
+Thus an argument may extend over numbers, constants, variables and
+\verb`\tfrac`-s, as instanced by $\sin2\tfrac{p}{q}\pi x$ which
+exhibits all elements.
+
+There are still areas of ambiguity. Consider the different outcomes
+here (the logarithms are to base $10$):
+\begin{centred}
+\verb`\eval[pp,ff]{$ \log m^3n, \log nm^3 $}[m=10,n=5]` $\Longrightarrow$
+\eval[pp,ff]{$ \log m^3n, \log nm^3 $}[m=10,n=5].
+\end{centred}
+In both instances the argument stops with the exponent, which means
+$n$ is \emph{not} part of the argument in the first. Any criterion
+is going to miss some instances where a different outcome might be
+anticipated. Where an argument ends is affected by visual appearance
+in the \texttt{pdf}. Anything that breaks the `visual flow' of juxtaposed
+numbers, variables, constants and \verb`\tfrac`-s is considered by
+\texttt{numerica} to end the argument. An exponent does that. If you
+feel ambiguity is possible, parenthesize or rearrange to clarify.
+
+Similarly, a \verb`\dfrac` breaks the visual flow in the following:
+\begin{centred}
+\verb`\eval[pp,ff]{$ \sin\dfrac12\pi, \sin\tfrac12\pi $}` $\Longrightarrow$
+\eval[pp,ff]{$ \sin\dfrac12\pi, \sin\tfrac12\pi $}.
+\end{centred}
+Nearly always, someone writing an expression like this intends the
+$\pi$ to be part of the argument. In that case, a \verb`\tfrac`
+should be used since the \verb`\dfrac` breaks the `visual flow'
+of the argument. 
+
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+
+\paragraph{\texttt{\textbackslash frac}}
+
+The problem comes with \verb`\frac` which in an inline environment
+displays like \verb`\tfrac`. I considered making the argument behaviour
+of \verb`\frac` the same as \verb`\tfrac` for textstyle contexts,
+and the same as \verb`\dfrac` for displaystyle contexts, but that
+would have meant the same expression evaluating to different results
+depending on whether it lay in an inline or displaystyle environment.
+That was unacceptable and for argument determination \verb`\frac`
+is treated like \verb`\dfrac` in \emph{all} environments.\end{shaded}%
+\end{minipage}
+
+\paragraph{Slash~fraction denominators}
+
+When using \verb`/` to write fractions or indicate division, it is
+easy to write ambiguous expressions. How should $\pi/2n$ be interpreted?
+With from-the-left evaluation and calculator precedence rules (which
+give equal precedence to multiplication and division), this would
+be interpreted as $(\pi/2)\times n$, but most people will instinctively
+interpret it as $\pi/(2n)$ and this is what \texttt{numerica} does.
+It places \verb`/` in parsing group II and treats the denominator
+of the slash \emph{as if it were the argument of a unary function}.
+This means that $1/2\sin(\pi/6)$ is parsed as $(1/2)\sin x$ rather
+than as $1/(2\sin x)$. It also means that $1/2\exp(1)$ and $1/2e$
+give different results. In the author's view this is acceptable since
+they display differently and are not instinctively read in the same
+way. (But again authors should paranthesize or rearrange to avoid
+ambiguity.)
+
+\paragraph{Trigonometric functions}
+
+\label{subsec:miscTrigFns}Trigonometric functions are set to parsing
+group II. This accommodates many instances of how arguments are used
+with these functions, but trigonometrical identities and Fourier series
+in particular make a nonsense of the restrictions. I find $\tan\tfrac{1}{2}(A+B)$
+(\emph{HMF }4.3.148) and $\sec\pi(\tfrac{1}{4}+\tfrac{1}{2}az)$ (\emph{HMF
+}19.3.3), $\cos(2m+p)z$ (\emph{HMF }20.2.3) and $\sin(2n+1)v$ (\emph{HMF
+}16.38.1), and, on looking through various texts on Fourier series,
+\[
+\cos\frac{2\pi}{T}nt,\quad\cos\frac{2\pi}{T}n(t+\tfrac{1}{2}T),
+\]
+\[
+\cos(N+\tfrac{1}{2})\frac{2\pi\tau}{T},\quad\sin2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right).
+\]
+Previous versions of \texttt{numerica} employed a setting \verb`()=0,1,2`
+to parse these outliers from usual practice. From version 3.0.0, this
+setting has been removed and authors are advised to enclose such arguments
+in \LaTeX{} braces. The braces do not affect the visual appearance
+in the \texttt{pdf} but unambiguously tell \texttt{numerica} where
+the argument begins and ends.
+
+\subsubsection{Parsing group III}
+
+The only members of this group are \verb`\sum` and \verb`\prod`.
+A `naked' plus or minus sign is one that is not enclosed by brackets.
+For parsing group III
+\begin{enumerate}
+\item the argument ends 
+\begin{enumerate}
+\item at the first naked plus or minus sign encountered, or 
+\begin{enumerate}
+\item first naked comparison sign (or command) encountered, or
+\item first naked \verb`And` or \verb`Or` sign encountered, or
+\end{enumerate}
+\item at the end of the formula.
+\end{enumerate}
+\end{enumerate}
+Almost always this means (a) or (b), and seems to be the instinctive
+practice. \emph{HMF} has multiple examples in multiple chapters of
+the argument to a sum ending at a naked plus sign: 7.3.12 \& 7.3.14,
+9.1.11 \& 9.1.77, 9.6.35 \& 9.6.43, 11.1.9, \ldots{} (at that point
+I stopped looking). They were all of the form
+\[
+\sum\text{argument}+\ldots
+\]
+ A minus sign serving the same purpose was harder to find but \emph{HMF}
+10.4.65 \& 10.4.67 are two instances. I considered whether a \verb`\times`
+or slash fraction sign \verb`/` might end the argument of a sum,
+but surely we need to allow things like $\sum1/n^{2}$ which rules
+out the slash and \emph{HMF} 9.9.11 provides two of a number of instances
+of sum arguments continuing past explicit \verb`\times` signs (at
+line breaks when a summand spills onto a second line).
+
+\noindent{}%
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+Please note that parenthesizing to clarify the argument of a sum has
+limitations. Writing 
+\[
+\sum\left(\mathtt{<stuff>}\right)\mathtt{<more\ stuff>}
+\]
+ does not necessarily end the summand at the right parenthesis: it
+ends at the first naked $+$ or $-$ sign encountered (if it is not
+forced by a \verb`\Q` command or \LaTeX{} braces). Sums \emph{have
+to} include brackets to cope with factors like $(-1)^{n}$.\end{shaded}%
+\end{minipage}\medskip{}
+
+Because they are evaluated using the same code as sums I (at first
+unthinkingly) placed products with sums but doubts later intruded.
+In \emph{HMF} products occur only occasionally and are almost all
+of the form
+\[
+\prod\left(\text{argument}\right)
+\]
+where the argument is bracketed (often with \verb`\left \right` modifiers)
+and the multiplicand ends with the right bracket. At least twice (\emph{HMF
+}6.1.25 and 24.2.2.1) an exponent ($-1$) is attached to the right
+bracket and the argument ends there. Looking further afield, a text
+on number theory has examples where the argument of the product extends
+to \emph{three} parenthesised factors, $\prod\left(\text{arg}1\right)\left(\text{arg2}\right)\left(\text{arg3}\right)$
+and a number of others where it extends to two. A text on theory of
+functions has 
+\[
+\prod_{n=1}^{\infty}\left(1+\frac{z}{n}\right)e^{z/n}
+\]
+although \emph{HMF}, for the same expression, encloses the two factors
+within (large) square brackets, as if some ambiguity existed as to
+how far the reach of the \verb`\prod` extended. 
+
+\emph{Tentatively} I retain products here in the same group as sums.
+
+\subsubsection{Parsing group IV}
+
+Comparison symbols form this group: \verb`=`, \verb`<`, \verb`>`,
+\verb`\ne`, \verb`\le`, \verb`\ge`, \verb`\leq`, \verb`\geq`,
+and the various comparison commands from the \texttt{amssymb} package
+listed in §\ref{subsec:evalAmssymb-comparisons}. It is the argument
+on the right-hand side of the relation that needs determining (the
+argument on the left ends at the comparison). For parsing group IV
+\begin{enumerate}
+\item the argument ends at
+\begin{enumerate}
+\item the first naked \verb`And` or \verb`Or` encountered, or
+\item the first naked comparison sign or command encountered, or
+\item the end of the formula.
+\end{enumerate}
+\end{enumerate}
+
+\subsubsection{Parsing group V}
+
+Logical \verb`And` and logical \verb`Or` are the sole members of
+this group. It is the right-hand side of the \verb`And` or \verb`Or`
+command that needs determining. For parsing group V
+\begin{enumerate}
+\item the argument ends at
+\begin{enumerate}
+\item the first naked \verb`And` or \verb`Or` encountered, or
+\item the end of the formula.
+\end{enumerate}
+\end{enumerate}
+
+\subsubsection{Disclaimer}
+
+The parsing rules of the different groups are not normative; they
+are not statements of how mathematical formulas should be written.
+Rather they attempt to capture regularities in how mathematicians
+write formulas. It is \emph{how things look and are read in the }\texttt{pdf},
+not \LaTeX , that is the guide. You are always free to parenthesize
+as you see fit, to insert cleave commands (\verb`\q` or \verb`\Q`)
+or to use \LaTeX{} braces to force outcomes. 
+
+The rule should always be to write expressions that are clear to the
+reader of the \texttt{pdf}. An expression that is ambiguous to the
+reader, even if it fits within the parsing rules, is to be deprecated.
+The \emph{intent} is that \verb`\eval` can parse unambiguous expressions
+of the kind that mathematicians, scientists, engineers \emph{do} write,
+rather than falter over `corner cases'. 
+
+\section{Using \texttt{numerica} with \protect\LyX}
+
+\label{sec:miscLyX}The document processor \LyX{} has a facility that
+enables snippets from a document to be compiled separately and the
+results presented to the user without having to compile the entire
+document. The present document was written in \LyX . The demonstration
+calculations were evaluated using this \emph{instant preview} facility. 
+
+To use \texttt{numerica} in \LyX{} go to \textsf{Document \lyxarrow{}
+Settings \lyxarrow{} LaTeX Preamble} and enter
+\begin{verbatim}
+    \usepackage{numerica}
+\end{verbatim}
+then click \textsf{OK}. You may wish to follow the above line in the
+preamble with \verb`\nmcReuse{}`:
+\begin{verbatim}
+    \nmcReuse{}
+\end{verbatim}
+In that case, type the extra line and \emph{then} click \textsf{OK}.
+The additional line ensures all saved values are available in your
+document from the outset.
+
+\subsection{Instant~preview}
+
+The instant preview facility of \LyX{} performs mini-\LaTeX{} runs on
+selected parts of a document (for instance, the mathematical parts)
+and displays the results in \LyX{} while the user continues to work
+on the surrounding document.\texttt{ numerica} uses these mini-\LaTeX{}
+runs to do its evaluations and display their results. That means you
+get feedback on your calculations almost immediately.
+
+To use this facility first ensure that instant preview is turned on.
+This means selecting \textsf{Tools \lyxarrow Preferences \lyxarrow Look
+\& Feel \lyxarrow{} Display}, ensuring that the \textsf{Display graphics}
+checkbox is checked, and against \textsf{Instant preview} selecting
+\textsf{On}, then clicking \textsf{OK}.
+
+\subsubsection{Document location}
+
+It also matters where your document is located. You may have your
+own local or personal texmf tree. If your document is located there,
+perhaps in the \verb`doc` folder, then not all features of preview
+will work as expected. Presumably this is because both \LyX{} and your
+\LaTeX{} distribution (e.g.\ \TeX Live or MiK\TeX ) are interacting
+with the location and interfere. Move your document to another location
+which your \LaTeX{} distribution has no interest in, and open it in
+\LyX{} there.
+
+\subsubsection{Global vs local previewing}
+
+\label{subsec:miscLyXGlobal-vs-local}Compilation of previews occurs
+in two distinct modes. 
+
+\paragraph{Global preview generation:}
+
+When a document is opened (and preview is \emph{on}), all previews
+in the document are formed in sequence in the one \LaTeX{} run. This
+is the global mode. The mini-\LaTeX{} run may well be substantial.
+It compiles a \verb`.tex` file that begins with the document's preamble
+with some additions then comes \verb`\begin{document}`. That is followed
+by a sequence of preview environments,
+\begin{verbatim}
+    \begin{preview}
+    <stuff>
+    \end{preview}
+\end{verbatim}
+one for each preview in the document. Finally there is an \verb`\end{document}`
+statement. Critically, all previews are between the same \verb`\begin{document}`,
+\verb`\end{document}` statements, and so earlier previews in the
+sequence can communicate with later ones.
+
+\paragraph{Local preview generation:}
+
+The other mode in which preview operates is local. Suppose you have
+your document open and want to add to it, for instance with a simple
+evaluation, \verb`\eval{x+y}[x=1,y=2]` in an ERT inset in a preview
+inset. The resulting mini-\LaTeX{} run is of the form
+\begin{verbatim}
+    <preamble>
+    \begin{document}
+    \begin{preview}
+    \eval{x+y}[x=1,y=2]
+    \end{preview}
+    \end{document}
+\end{verbatim}
+The preamble is as before but only a solitary preview sits between
+the \verb`\begin` \verb`{document}`, \verb`\end{document}` statements.
 That preview is isolated from all other, previous previews and will
-be isolated from all other, later previews.}{\small\par}
+be isolated from all other, later previews. 
 
-{\small This has implications for the supplementary commands of the
-previous chapter and means that if you want to transfer information
-(a macro, a constant, a result) from one preview to another, you need
-to do it through the preamble or by means of an external file or,
-in some cases, by forcing a global preview run in which all previews
-are recompiled between the same }{\small{\small\verb`\begin{document}`}}{\small ,
-}{\small{\small\verb`\end{document}`}}{\small{} statements.}{\small\par}
+This has implications for the supplementary commands of Chapter~\ref{chap:Supplementary-commands}
+and means that if you want to transfer information (a macro, a constant,
+a result) from one preview to another, you need to do it through the
+preamble or by means of an external file or, in some cases, by forcing
+a global preview run in which all previews are recompiled between
+the same \verb`\begin{document}`, \verb`\end{document}` statements.
 
-\subsubsection{Forcing a global preview run}
+\paragraph{Forcing a global preview run}
 
-{\small Closing then opening a document is one way to force a global
-preview compilation. Another is to change the zoom level. This causes
-\LyX{} to recompile all previews at the new zoom level. But you may
-not want to work at the new zoom level. Going back to the old zoom
-level will force a second recompilation of all previews. For a large
-document }{\small\emph{two}}{\small{} recompilations is too heavy a
-burden. The secret is to combine a zoom in and a zoom out into one
-command and attach it to a shortcut.}{\small\par}
+Closing then opening a document is one way to force a global preview
+compilation. Another is to change the zoom level. This causes \LyX{}
+to recompile all previews at the new zoom level. But you may not want
+to work at the new zoom level. Going back to the old zoom level will
+force a second recompilation of all previews. For a large document
+\emph{two} recompilations is too heavy a burden. The secret is to
+combine a zoom in and a zoom out into one command and attach it to
+a shortcut.
 
-{\small If you go to }{\small\textsf{Tools \lyxarrow{} Preferences \lyxarrow{}
-Editing \lyxarrow{} Shortcuts}}{\small , click on the }{\small\textsf{New}}{\small{}
-button and enter }{\small\par}
-\begin{lyxcode}
-{\small command-sequence~buffer-zoom-in;~buffer-zoom-out}{\small\par}
-\end{lyxcode}
-{\small then assign a shortcut to it (}{\small{\small\verb`Alt+Z`}}{\small{}
-for zoom?) you will gain a simple means of forcing a global recompilation
-of previews.}{\small\par}
+If you go to \textsf{Tools \lyxarrow{} Preferences \lyxarrow{} Editing
+\lyxarrow{} Shortcuts}, click on the \textsf{New} button and enter
+\begin{verbatim}
+    command-sequence buffer-zoom-in; buffer-zoom-out
+\end{verbatim}
+then assign a shortcut to it (\verb`Alt+Z` for zoom?) you will gain
+a simple means of forcing a global recompilation of previews. 
 
-\section{Mathed}
+\subsubsection{Mathed}
 
-{\small (Mathed = the \LyX{} mathematics editor.) If you have instant
-preview }{\small\emph{on}}{\small{} then one way to use }{\small\texttt{numerica}}{\small{}
-in \LyX{} is to enter an }{\small{\small\verb`\eval`}}{\small{}
-command in mathed. Clicking the cursor outside the editor with the
-mouse or moving it outside with the arrow keys will then trigger formation
-of a preview of the editor's contents -- a snippet of what will be
-shown in the pdf. This will be displayed in mathed's place after a
-generally short `pause for thought' as the mini-\LaTeX{} run progresses
-behind the scenes.}{\small\par}
+(Mathed = the \LyX{} mathematics editor.) If you have instant preview
+\emph{on} then one way to use \texttt{numerica} in \LyX{} is to enter
+an \verb`\eval` command in mathed. Clicking the cursor outside the
+editor with the mouse or moving it outside with the space bar or arrow
+keys will then trigger formation of a preview of the editor's contents
+– a snippet of what will be shown in the \texttt{pdf}. This will be
+displayed in mathed's place after a generally short `pause for thought'
+as the mini-\LaTeX{} run progresses behind the scenes. 
 
-{\small The original expression can be recovered by clicking on the
-preview. The content of mathed is immediately displayed and can be
-edited.}{\small\par}
+The original expression can be recovered by clicking on the preview.
+The content of mathed is immediately displayed and can be edited.
 
-\subsection{\protect\LaTeX{} braces~\{~~\}}
+\paragraph{\protect\LaTeX{} braces~\{~~\}}
 
-{\small\LyX{} does not support }{\small\texttt{numerica}}{\small 's
-}{\small{\small\verb`\eval`}}{\small{} command `out of the box'
-as it does, say, }{\small{\small\verb`\frac`}}{\small{} or }{\small{\small\verb`\sqrt`}}{\small .
-To use the }{\small{\small\verb`\eval`}}{\small{} command in
-mathed you will need to supply the braces used to delimit its mandatory
-argument. (For }{\small{\small\verb`\frac`}}{\small{} and }{\small{\small\verb`\sqrt`}}{\small{}
+\LyX{} does not support \texttt{numerica}'s \verb`\eval` command `out
+of the box' as it does, say, \verb`\frac` or \verb`\sqrt`. To use
+the \verb`\eval` command in mathed you will need to supply the braces
+used to delimit its mandatory argument. (For \verb`\frac` and \verb`\sqrt`
 by contrast, \LyX{} supplies these automatically in the form of blue-outlined
-boxes.) Unfortunately the }{\small{\small\verb`{`}}{\small{}
-key}{\small\footnote{{\small\textsf{Shift+{[}}}{\small{} on my keyboard.}}}{\small{}
+boxes.) Unfortunately the \verb`{` key\footnote{\textsf{Shift+{[}} on my keyboard.}
 does not insert a left brace into the document but rather an escaped
-left brace }{\small{\small\verb`\{`}}{\small{} as you can see
-by looking at }{\small\textsf{View \lyxarrow{} Code Preview Pane}}{\small .
-Escaped braces like this are used for grouping terms in }{\small\emph{mathematics}}{\small ;
-they are not the delimiters of a \LaTeX{} argument.}{\small\par}
+left brace \verb`\{` as you can see by looking at \textsf{View \lyxarrow{}
+Code Preview Pane}. Escaped braces like this are used for grouping
+terms in \emph{mathematics}; they are not the delimiters of a \LaTeX{}
+argument. 
 
-{\small The brace delimiters for \LaTeX{} arguments are entered in mathed
-by typing a backslash }{\small\textsf{\textbackslash{} }}{\small then
-a left brace}{\small\textsf{ \{}}{\small{} -- two separate key presses
-rather than a single combined press. This enters a balanced pair of
-(unescaped) braces with the cursor sitting between them waiting for
-input. Alternatively, if you have already written an expression that
-you want to place between braces, select it, then type }{\small\textsf{\textbackslash{}
-}}{\small then}{\small\textsf{ \{}}{\small .}{\small\par}
+The brace delimiters for \LaTeX{} arguments are entered in mathed by
+typing a backslash \textsf{\textbackslash{} }then a left brace\textsf{
+\{} – two separate key presses rather than a single combined press.
+This enters a balanced pair of (unescaped) braces with the cursor
+sitting between them waiting for input. Alternatively, if you have
+already written an expression that you want to place between braces,
+select it, then type \textsf{\textbackslash{} }then\textsf{ \{}.
 
-\section{Preview insets}
+\subsubsection{Preview insets}
 
-{\small There are problems with using mathed for calculations. }{\small\par}
+There are problems with using mathed for calculations.
 \begin{itemize}
-\item {\small Expressions entered in mathed are necessarily of the form }{\small{\small\verb`$ \eval... $`}}{\small{}
-or more generally }{\small{\small\verb`delimiter`}}{\small{}
-}{\small{\small\verb`\eval...`}}{\small{} }{\small{\small\verb`delimiter`}}{\small .
-But you may wish to wrap the }{\small{\small\verb`\eval`}}{\small{}
-command }{\small\emph{around}}{\small{} the math delimiters to produce
-a }{\small\emph{formula=result}}{\small{} form of display. In mathed
-the only way to effect such a display is to write the }{\small\emph{formula=
-}}{\small part yourself -- which may involve no more than copy and
-paste but is still additional mouse work/key pressing. }{\small\par}
-\item {\small Mathed does not accept carriage returns. If you want to format
-a complicated expression for readability by breaking it into separate
-lines, you can't. The expression is jammed into the one line, along
-with the settings option content and the vv-list, often extending
-well beyond the edge of the screen. }{\small\par}
+\item Expressions entered in mathed are necessarily of the form \verb`$ \eval... $`
+or more generally \verb`delimiter` \verb`\eval...` \verb`delimiter`.
+But you may wish to wrap the \verb`\eval` command \emph{around} the
+math delimiters to produce a \emph{formula=result} form of display.
+In mathed the only way to effect such a display is to write the \emph{formula=
+}part yourself – which may involve no more than copy and paste but
+is still additional mouse work/key pressing. 
+\item Mathed does not accept carriage returns. If you want to format a complicated
+expression for readability by breaking it into separate lines, you
+can't. The expression is jammed into the one line, along with the
+settings option content and the vv-list, often extending well beyond
+the edge of the screen. 
 \end{itemize}
-{\small For these reasons I have come to prefer }{\small\emph{not}}{\small{}
-using mathed for calculations but instead to use preview insets wrapped
-around \TeX -code (ERT) insets. \LyX{} uses the shortcut }{\small\textsf{Ctrl+L}}{\small{}
-to insert an ERT inset. Since \LyX{} now does no printing itself, the
-shortcut }{\small\textsf{Ctrl+P}}{\small{} that was formerly used for
-printing is available for other purposes. On my keyboard, the }{\small\textsf{P}}{\small{}
-key lies diagonally up and to the right but adjacent to the }{\small\textsf{L}}{\small{}
-key. I suggest assigning }{\small\textsf{Ctrl+P}}{\small{} to inserting
-a preview inset. Then typing }{\small\textsf{Ctrl+P Ctrl+L}}{\small{}
--- which means holding the }{\small\textsf{Ctrl}}{\small{} key down
-and tapping two diagonally adjacent keys, }{\small\textsf{P}}{\small{}
-followed immediately by }{\small\textsf{L}}{\small{} -- will insert
-an ERT inset inside a preview inset with the cursor sitting inside
-the ERT inset waiting for input. In the ERT inset you can enter carriage
-returns, and so format complicated expressions. You can place the
-vv-list on a separate line or onto consecutive lines. And when you
-have finished, clicking outside the preview inset will trigger preview
-into doing its thing and present the result `before your eyes'.}{\small\par}
+For these reasons I have come to prefer \emph{not} using mathed for
+calculations but instead to use preview insets wrapped around \TeX -code
+(ERT) insets. \LyX{} uses the shortcut \textsf{Ctrl+L} to insert an
+ERT inset. Since \LyX{} now does no printing itself, the shortcut \textsf{Ctrl+P}
+that was formerly used for printing is available for other purposes.
+On my keyboard, the \textsf{P} key lies diagonally up and to the right
+but adjacent to the \textsf{L} key. I suggest assigning \textsf{Ctrl+P}
+to inserting a preview inset. Then typing \textsf{Ctrl+P Ctrl+L} –
+which means holding the \textsf{Ctrl} key down and tapping two diagonally
+adjacent keys, \textsf{P} followed immediately by \textsf{L} – will
+insert an ERT inset inside a preview inset with the cursor sitting
+inside the ERT inset waiting for input. In the ERT inset you can enter
+carriage returns, and so format complicated expressions. You can place
+the vv-list on a separate line or onto consecutive lines. And when
+you have finished, clicking outside the preview inset will trigger
+preview into doing its thing and present the result `before your
+eyes'. 
 
-{\small To assign the suggested shortcut, go to }{\small\textsf{Tools
-\lyxarrow{} Preferences \lyxarrow{} Editing \lyxarrow{} Shortcuts}}{\small .
-Under }{\small\textsf{Cursor, Mouse and Editing Functions}}{\small{}
-in the main window on the right, scroll down until you come to }{\small\textsf{preview-insert}}{\small ,
-select it, then click }{\small\textsf{Modify}}{\small . Now press }{\small\textsf{Ctrl+P}}{\small .
-The shortcut will magically appear in the greyed, depressed key.}{\small\textsf{
-}}{\small Click }{\small\textsf{OK}}{\small{} and then }{\small\textsf{OK}}{\small{}
-in the }{\small\textsf{Preferences}}{\small{} window to close it. (Most
-of the examples in this document have been evaluated in this way,
-using }{\small\textsf{Ctrl+P Ctrl+L.)}}{\small\par}
+To assign the suggested shortcut, go to \textsf{Tools \lyxarrow{} Preferences
+\lyxarrow{} Editing \lyxarrow{} Shortcuts}. Under \textsf{Cursor, Mouse
+and Editing Functions} in the main window on the right, scroll down
+until you come to \textsf{preview-insert}, select it, then click \textsf{Modify}.
+Now press \textsf{Ctrl+P}. The shortcut will magically appear in the
+greyed, depressed key.\textsf{ }Click \textsf{OK} and then \textsf{OK}
+in the \textsf{Preferences} window to close it. (Most of the examples
+in this document have been evaluated in this way, using \textsf{Ctrl+P
+Ctrl+L.)}
 
-\section{Errors }
+\subsubsection{Errors }
 
-{\small Instant preview will display error messages generated by }\texttt{numerica}{\small{}
+Instant preview will display error messages generated by \texttt{numerica}
 in \LyX{} just as it does the results of calculations. Clicking on
 the message will show the underlying expression which can then be
-edited. However \LaTeX{} errors will }{\small\emph{not}}{\small{} produce
-a preview; formation of the preview will stall. To find precisely
-what has gone wrong, you will need to look at the \LaTeX{} log, but
-not the log of the overall document; rather the }{\small\emph{preview}}{\small{}
-log.}{\small\par}
+edited. However \LaTeX{} errors will \emph{not} produce a preview;
+formation of the preview will stall. To find precisely what has gone
+wrong, you will need to look at the \LaTeX{} log, but not the log of
+the overall document; rather the \emph{preview} log. 
 
-\subsection{Temporary directory of \protect\LyX}
+\paragraph{Temporary directory of \protect\LyX}
 
-{\small Unfortunately this is tucked away in a temporary directory
-and is not immediately accessible in \LyX{} (unlike the main \LaTeX{}
-log from }{\small\textsf{Document \lyxarrow{} \LaTeX{} Log}}{\small ).
-When \LyX{} is started, it sets up a temporary directory in which to
-perform various tasks. On Windows systems this will be located in
-}{\small\texttt{C:\textbackslash Users\textbackslash <your name>\textbackslash AppData\textbackslash Local\textbackslash Temp}}{\small{}
-and will have a name like }{\small\texttt{lyx\_tmpdir.XOsSGhBc1344}}{\small .}{\small\par}
+Unfortunately this is tucked away in a temporary directory and is
+not immediately accessible in \LyX{} (unlike the main \LaTeX{} log from
+\textsf{Document \lyxarrow{} \LaTeX{} Log}). When \LyX{} is started,
+it sets up a temporary directory in which to perform various tasks.
+On Windows systems this will be located in \texttt{C:\textbackslash Users\textbackslash <your
+name>\textbackslash AppData\textbackslash Local\textbackslash Temp}
+and will have a name like \texttt{lyx\_tmpdir.XOsSGhBc1344}. 
 
-{\small One of the tasks \LyX{} uses this temporary directory for is
-to create preview images when a document is opened. If you look inside
-\LyX 's temporary directory when a document is first loaded, you will
-see a subdirectory created, with a name like }{\small\texttt{lyx\_tmpbuf0}}{\small .
-There may already be such directories there, in which case the number
-on the end will be greater than }{\small\texttt{0}}{\small{} -- it
-depends on whether other documents are or have been open in the current
-instance of \LyX . Inside the appropriate }{\small\texttt{lyx\_tmpbuf}}{\small\texttt{\emph{n}}}{\small{}
-folder will be the preview log with a name like }{\small\texttt{lyxpreviewZL1344.log}}{\small .
+One of the tasks \LyX{} uses this temporary directory for is to create
+preview images when a document is opened. If you look inside \LyX 's
+temporary directory when a document is first loaded, you will see
+a subdirectory created, with a name like \texttt{lyx\_tmpbuf0}. There
+may already be such directories there, in which case the number on
+the end will be greater than \texttt{0} – it depends on whether other
+documents are or have been open in the current instance of \LyX .
+Inside the appropriate \texttt{lyx\_tmpbuf}\texttt{\emph{n}} folder
+will be the preview log with a name like \texttt{lyxpreviewZL1344.log}.
 It will usually be accompanied by other files with extensions like
-}{\small\texttt{.dvi}}{\small , }{\small\texttt{.tex}}{\small , and
--- depending on the number of previews in your document -- a number,
-perhaps a lot, of image files with the extension }{\small\texttt{.png}}{\small ,
-each one of which is a preview. For a document just loaded there will
-be only the one preview log, but if you have added preview insets
-or math insets to your document}{\small\textsf{ }}{\small in the current
-editing session there will be a number of such logs and you will need
-to determine the relevant one by the time stamp.}{\small\par}
+\texttt{.dvi}, \texttt{.tex}, and – depending on the number of previews
+in your document – a number, perhaps a lot, of image files with the
+extension \texttt{.png}, each one of which is a preview. For a document
+just loaded there will be only the one preview log, but if you have
+added preview insets or math insets to your document\textsf{ }in the
+current editing session there will be a number of such logs and you
+will need to determine the relevant one by the time stamp. 
 
-{\small The log files are text files and can be opened in a text editor.
-The relevant part of the log is towards the end (just before the final
-statistical summary) where you will find a list of entries like }{\small\texttt{Preview: Snippet
-1 641947 163840 7864588}}{\small . If there is an error, it will be
-noted here among these snippets and will generally make clear what
-needs remedying.}{\small\par}
+The log files are text files and can be opened in a text editor. The
+relevant part of the log is towards the end (just before the final
+statistical summary) where you will find a list of entries like \texttt{Preview: Snippet
+1 641947 163840 7864588}. If there is an error, it will be noted here
+among these snippets and will generally make clear what needs remedying.
 
-\subsection{CPU usage, \protect\LaTeX{} processes}
+\paragraph{CPU usage, \protect\LaTeX{} processes}
 
-{\small It is possible when a preview stalls that the \LaTeX{} process
-associated with the preview will continue to run, using CPU cycles,
-slowing overall computer performance, and perhaps resulting in extra
-fan use giving a different sound to the computer. In Windows 10, the
-}{\small\textsf{Task Manager}}{\small{} (}{\small\textsf{Ctrl+Shift+esc}}{\small )
-under the }{\small\textsf{Details}}{\small{} tab shows the current executables
-running. The }{\small\textsf{CPU}}{\small{} column will show which processes
-are preoccupying the CPU. Check whether one or more of these processes
-looks \LaTeX -related (e.g. }{\small\texttt{latex.exe}}{\small{} or
-}{\small\texttt{pdflatex.exe}}{\small , or }{\small\texttt{miktex-pdftex.exe}}{\small{}
-if using MiK\TeX ). Click the }{\small\textsf{Name}}{\small{} column
-to sort the processes by name and look for the relevant name in the
-list, select it, and end the process (click the }{\small\textsf{End
-Task}}{\small{} button).}{\small\par}
+It is possible when a preview stalls that the \LaTeX{} process associated
+with the preview will continue to run, using CPU cycles, slowing overall
+computer performance, and perhaps resulting in extra fan use giving
+a different sound to the computer. In Windows 10, the \textsf{Task
+Manager} (\textsf{Ctrl+Shift+esc}) under the \textsf{Details} tab
+shows the current executables running. The \textsf{CPU} column will
+show which processes are preoccupying the CPU. Check whether one or
+more of these processes looks \LaTeX -related (e.g.\ \texttt{latex.exe}
+or \texttt{pdflatex.exe}, or \texttt{miktex-pdftex.exe} if using MiK\TeX ).
+Click the \textsf{Name} column to sort the processes by name and look
+for the relevant name in the list, select it, and end the process
+(click the \textsf{End Task} button). 
 
-{\small I am not familiar with the corresponding situation on Linux
-or Mac.}{\small\par}
+I am not familiar with the corresponding situation on Linux or Mac.
 
-\section{Hyperref support vs speed}
+\subsubsection{Hyperref support vs speed}
 
-{\small If you want the pdf produced from your document to support
-hyperref links and show an outline window in your pdf viewer (generally
-placed on the left in the viewer) then you need to ensure the checkbox
-at }{\small\textsf{Document Settings \lyxarrow{} PDF Properties \lyxarrow{}
-Use Hyperref Support}}{\small{} is indeed checked. But you don't need
-to do this until the final compilation of the document. The advantage
+If you want the \texttt{pdf} produced from your document to support
+hyperref links and show an outline window in your \texttt{pdf} viewer
+(generally placed on the left in the viewer) then you need to ensure
+the checkbox at \textsf{Document Settings \lyxarrow{} PDF Properties
+\lyxarrow{} Use Hyperref Support} is indeed checked. But you don't
+need to do this until the final compilation of the document. The advantage
 of leaving this until the last is that in a large document with many
 previews the time for preview generation is essentially halved. If
 hyperref support is enabled, preview generation not only creates all
 the individual image files that are the previews (files of extension
-}{\small{\small\verb`.png`}}{\small ) but also requires the
-compilation of a single pdf document showing all the previews in sequence.
-(Like the previews, the pdf document `hides' in the termporary directory
-where \LyX{} does its work.) In other words, }{\small\emph{two}}{\small{}
-images are created for each preview, the }{\small{\small\verb`.png`}}{\small{}
-image which is the one \LyX{} displays, and another image buried inside
-the pdf of all images. That second step does not occur if hyperref
-support is disabled. In a small document, this is not going to matter;
-in a large document it becomes significant. It is well worth temporarily
-turning off hyperref support and then, when the time for final compilation
-comes, turning it back on.}{\small\par}
+\verb`.png`) but also requires the compilation of a single \texttt{pdf}
+document showing all the previews in sequence. (Like the previews,
+the \texttt{pdf} document `hides' in the termporary directory where
+\LyX{} does its work.) In other words, \emph{two} images are created
+for each preview, the \verb`.png` image which is the one \LyX{} displays,
+and another image buried inside the \texttt{pdf} of all images. That
+second step does not occur if hyperref support is disabled. In a small
+document, this is not going to matter; in a large document it becomes
+significant. It is well worth temporarily turning off hyperref support
+and then, when the time for final compilation comes, turning it back
+on.
 
-\section{Supplementary commands in \protect\LyX}
+\subsection{Supplementary commands in \protect\LyX}
 
-{\small There are some difficulties using the supplementary commands
-successfully with instant preview.}{\small\par}
+There are some difficulties using the supplementary commands successfully
+with instant preview. 
 
-\subsection{Reuse of earlier previews}
+\subsubsection{Reuse of earlier previews}
 
-{\small One is that whenever \LyX{} has generated a preview image for
-a particular \LaTeX{} expression, it will use that same image whenever
-it meets that same \LaTeX{} expression later. That means that a statement
-like }{\small{\small\verb`\macros[view]{}`}}{\small{} and the
-same statement later will display the same image, even though there
-may have been macros defined or freed in between. The same goes for
-all the other supplementary functions, including, for example, }{\small{\small\verb`\info{sum}`}}{\small .
-A second instance of }{\small{\small\verb`\info{sum}`}}{\small{}
+One is that whenever \LyX{} has generated a preview image for a particular
+\LaTeX{} expression, it will use that same image whenever it meets
+that same \LaTeX{} expression later. That means that a statement like
+\verb`\macros[view]{}` and the same statement later will display
+the same image, even though there may have been macros defined or
+freed in between. The same goes for all the other supplementary functions,
+including, for example, \verb`\info{sum}`. A second instance of \verb`\info{sum}`
 will display the image generated by the first instance even though
-further infinite sums may have been evaluated between the }{\small{\small\verb`\info`}}{\small{}
-statements.}{\small\par}
+further infinite sums may have been evaluated between the \verb`\info`
+statements. 
 
-{\small The remedy is to make some small but insignificant difference
-to the \LaTeX{} expression in the second instance -- generally a change
-in white space will do. For example: first time }{\small{\small\verb`\macros[view]{}`}}{\small ,
-second time }{\small{\small\verb`\macros[view]{ }`}}{\small{}
-where a space has been inserted between the braces; or: first time
-}{\small{\small\verb`\info{sum}`}}{\small , second time }{\small{\small\verb`\info{ sum}`}}{\small{}
-where a space has been inserted before }{\small{\small\verb`sum`}}{\small .
+The remedy is to make some small but insignificant difference to the
+\LaTeX{} expression  in the second instance – generally a change in
+white space will do. For example: first time \verb`\macros[view]{}`,
+second time \verb`\macros[view]{ }` where a space has been inserted
+between the braces; or: first time \verb`\info{sum}`, second time
+\verb`\info{ sum}` where a space has been inserted before \verb`sum`.
 This will ensure \LyX{} doesn't fall back on the previously generated
-image.}{\small\par}
+image.
 
-\subsection{\textquoteleft Stalled\textquoteright{} previews}
+\subsubsection{\textquoteleft Stalled\textquoteright{} previews}
 
-{\small It is possible to put content into an ERT inset inside a preview
-inset (}{\small\textsf{Ctrl+P Ctrl+L}}{\small ) and for nothing to
-happen. The preview has apparently stalled. Certainly this can be
-the case if there is an error in the input (e.g. a missing brace)
-but it also occurs if there is no output to display. For instance
-}{\small{\small\verb`\constants{ c=300000000 }`}}{\small{} does
-not produce any visual output. There is nothing for the preview to
-display and so the preview inset sits there, apparently stalled. This
-is a security measure for previews in \LyX{} to provide at least some
-guard against malicious code being run in the preview. If the preview
-resolved, it would disappear completely from view in the \LyX{} window.}{\small\par}
+It is possible to put content into an ERT inset inside a preview inset
+(\textsf{Ctrl+P Ctrl+L}) and for nothing to happen. The preview has
+apparently stalled. Certainly this can be the case if there is an
+error in the input (e.g.\ a missing brace) but it also occurs if
+there is no output to display. For instance \verb`\constants` \verb`{ c=300000000 }`
+does not produce any visual output. There is nothing for the preview
+to display and so the preview inset sits there, apparently stalled.
+This is a security measure for previews in \LyX{} to provide at least
+some guard against malicious code being run in the preview. If the
+preview resolved, it would disappear completely from view in the \LyX{}
+window. 
 
-{\small If you find the visual appearance of such apparently stalled
-previews distracting, the addition of some displayable content to
-the preview will result in it resolving to that content; the content
-could be as small as a full stop.}{\small\par}
+If you find the visual appearance of such apparently stalled previews
+distracting, the addition of some displayable content to the preview
+will result in it resolving to that content; the content could be
+as small as a full stop.
 
-\subsection{Using \texttt{\textbackslash nmcMacros}}
+\subsubsection{Using \texttt{\textbackslash nmcMacros}}
 
-{\small As noted earlier, previews are mini-\LaTeX{} runs, either local
-or global. Each local preview is of the form<preamble> }{\small\par}
-\begin{lyxcode}
-{\small\textbackslash begin\{document\}}{\small\par}
+As noted earlier, previews are mini-\LaTeX{} runs, either local or
+global. Each local preview is of the form<preamble>
+\begin{verbatim}
+    <preamble>
+    \begin{document}
+    \begin{preview}
+    <stuff>
+    \end{preview}
+    \end{document}
+\end{verbatim}
+Whatever goes into or comes out of the preview is isolated from any
+other local preview, unless it is through the preamble or an external
+file. Sometimes a global preview run can overcome this problem for
+then all the previews lie between the same \verb`\begin{document}`,
+\verb`end{document}` statements. However, this does not help with
+macro definitions. \verb`\def`, \verb`\newcommand`, \verb`\NewDocumentCommand`
+all provide \emph{local} definitions which remain trapped within their
+own \verb`\begin{preview}`, \verb`\end{preview}`) statements. Another
+preview, say containing an \verb`\eval` command, between a different
+pair of \verb`\begin{preview}`, \verb`\end{preview}`) statements,
+will not know about the macro definition.
 
-{\small\textbackslash begin\{preview\}}{\small\par}
-
-{\small <stuff>}{\small\par}
-
-{\small\textbackslash end\{preview\}}{\small\par}
-
-{\small\textbackslash end\{document\}}{\small\par}
-\end{lyxcode}
-{\small Whatever goes into or comes out of the preview is isolated
-from any other local preview, unless it is through the preamble or
-an external file. Sometimes a global preview run can overcome this
-problem for then all the previews lie between the same }{\small{\small\verb`\begin{document}`}}{\small ,
-}{\small{\small\verb`end{document}`}}{\small{} statements. However,
-this does not help with macro definitions. }{\small{\small\verb`\def`}}{\small ,
-}{\small{\small\verb`\newcommand`}}{\small , }{\small{\small\verb`\NewDocumentCommand`}}{\small{}
-all provide }{\small\emph{local}}{\small{} definitions which remain
-trapped within their own }{\small{\small\verb`\begin{preview}`}}{\small ,
-}{\small{\small\verb`\end{preview}`}}{\small ) statements.
-Another preview, say containing an }{\small{\small\verb`\eval`}}{\small{}
-command, between a different pair of }{\small{\small\verb`\begin{preview}`}}{\small ,
-}{\small{\small\verb`\end{preview}`}}{\small ) statements,
-will not know about the macro definition.}{\small\par}
-
-{\small There are (at least) three ways out: }{\small\par}
+There are (at least) three ways out:
 \begin{enumerate}
-\item {\small Confine everything to the same preview inset: the definition
-of a macro, the }{\small{\small\verb`\macros`}}{\small{} statement,
-and the use of the macro in an }{\small{\small\verb`\eval`}}{\small{}
-command. }{\small\par}
-\item {\small Confine macro definitions to the preamble (}{\small\textsf{Document
-\lyxarrow{} Settings \lyxarrow{} \LaTeX{} Preamble}}{\small ). }{\small\par}
-\item {\small Within previews use }{\small{\small\verb`\gdef`}}{\small{}
-(or }{\small{\small\verb`\global\def`}}{\small ) exclusively
+\item Confine everything to the same preview inset: the definition of a
+macro, the \verb`\macros` statement, and the use of the macro in
+an \verb`\eval` command. 
+\item Confine macro definitions to the preamble (\textsf{Document \lyxarrow{}
+Settings \lyxarrow{} \LaTeX{} Preamble}).
+\item Within previews use \verb`\gdef` (or \verb`\global\def`) exclusively
 for making your macro definitions; this makes the macro available
-to all later previews. }{\small\par}
+to all later previews.
 \end{enumerate}
 
-\subsection{Using \texttt{\textbackslash nmcConstants}}
+\subsubsection{Using \texttt{\textbackslash nmcConstants}}
 
-{\small Because }{\small{\small\verb`\nmcConstants`}}{\small{}
-doesn't use }{\small{\small\verb`\def`}}{\small{} or }{\small{\small\verb`\newcommand`}}{\small{}
-or }{\small{\small\verb`\NewDocumentCommand`}}{\small{} it is
-not subject to the same localisation problem as }{\small{\small\verb`\nmcMacros`}}{\small ,
-but the reach of a }{\small{\small\verb`\constants`}}{\small{}
-command will still be confined to its own preview unless a }{\small\emph{global}}{\small{}
-preview run is forced; see above §\ref{subsec:LyXGlobal-vs-local}.}{\small\par}
+Because \verb`\nmcConstants` doesn't use \verb`\def` or \verb`\newcommand`
+or \verb`\NewDocumentCommand` it is not subject to the same localisation
+problem as \verb`\nmcMacros`, but the reach of a \verb`\constants`
+command will still be confined to its own preview unless a \emph{global}
+preview run is forced; see above §\ref{subsec:miscLyXGlobal-vs-local}.
 
-\subsection{Using \texttt{\textbackslash nmcReuse}}
+\subsubsection{Using \texttt{\textbackslash nmcReuse}}
 
-{\small As noted earlier, \LyX{} creates its previews in a temporary
-directory, not the document directory. If you want to save values
-from your current document -- say, }{\small\texttt{mydoc.lyx}}{\small{}
--- to }{\small\texttt{mydoc.nmc}}{\small{} then you do so as described
-earlier (§\ref{sec:supplReuse}), but the file }{\small\texttt{mydoc.nmc}}{\small{}
-containing the saved results will be located in the temporary directory.
-When \LyX{} is closed the file will be deleted along with all the other
-contents of that directory.}{\small\par}
+As noted earlier, \LyX{} creates its previews in a temporary directory,
+not the document directory. If you want to save values from your current
+document – say, \texttt{mydoc.lyx} – to \texttt{mydoc.nmc} then you
+do so as described earlier (§\ref{sec:supplReuse}), but the file
+\texttt{mydoc.nmc} containing the saved results will be located in
+the temporary directory. When \LyX{} is closed the file will be deleted
+along with all the other contents of that directory.
 
-{\small Fortunately \LyX{} has a copying mechanism for getting files
-out of the temporary directory and into the document directory. When
-a document is exported -- say to pdf -- it is possible to specify
-a }{\small\emph{copier}}{\small{} to automatically copy back to the
-document directory or subdirectory various files in the temporary
-directory. We want the }{\small\texttt{.nmc}}{\small{} file containing
-the saved values to be copied back. Go to }{\small\textsf{Tools \lyxarrow{}
-Preferences \lyxarrow{} File Handling \lyxarrow{} File Formats}}{\small{}
-and find }{\small\textsf{PDF (pdflatex)}}{\small{} (assuming export
-to }{\small\texttt{pdf}}{\small{} by this route) in the list of formats.
-In}{\small\textsf{ }}{\small the }{\small\textsf{Copier}}{\small{} slot
-of the dialogue insert the following line of code: }{\small\par}
-\begin{lyxcode}
-{\small python~-tt~\$\$s/scripts/ext\_copy.py~-e~nmc,pdf~-d~\$\$i~\$\$o}{\small\par}
-\end{lyxcode}
-{\small{\small\verb`ext_copy.py`}}{\small{} is a python script
-that is supplied with \LyX . The }{\small\texttt{-e nmc,pdf -d}}{\small{}
-part of the line tells }{\small\texttt{ext\_copy.py}}{\small{} that
-on export to }{\small\texttt{pdf}}{\small{} by the }{\small\texttt{pdflatex}}{\small{}
-route}{\small\texttt{ }}{\small to copy any files with the extensions
-}{\small\texttt{.nmc}}{\small{} or }{\small\texttt{.pdf}}{\small{} from
-the temporary directory where \LyX{} does its work back to the document
-directory -- the }{\small{\small\verb`-d`}}{\small{} option
-(which became available with \LyX{} 2.3.0).}{\small\par}
+Fortunately \LyX{} has a copying mechanism for getting files out of
+the temporary directory and into the document directory. When a document
+is exported – say to \texttt{pdf} – it is possible to specify a \emph{copier}
+to automatically copy back to the document directory or subdirectory
+various files in the temporary directory. We want the \texttt{.nmc}
+file containing the saved values to be copied back. Go to \textsf{Tools
+\lyxarrow{} Preferences \lyxarrow{} File Handling \lyxarrow{} File Formats}
+and find \textsf{PDF (pdflatex)} (assuming export to \texttt{pdf}
+by this route) in the list of formats. In\textsf{ }the \textsf{Copier}
+slot of the dialogue insert the following line of code:
+\begin{verbatim}
+    python -tt $$s/scripts/ext_copy.py -e nmc,pdf -d $$i $$o
+\end{verbatim}
+\verb`ext_copy.py` is a python script that is supplied with \LyX .
+The \texttt{-e nmc,pdf -d} part of the line tells \texttt{ext\_copy.py}
+that on export to \texttt{pdf} by the \texttt{pdflatex} route\texttt{
+}to copy any files with the extensions \texttt{.nmc} or \texttt{.pdf}
+from the temporary directory where \LyX{} does its work back to the
+document directory – the \verb`-d` option (which became available
+with \LyX{} 2.3.0). 
 
-{\small But if you have a complex document, it may take too much time
-to want to export to pdf before closing \LyX , particularly if there
-are a lot of evaluations in the document. Much faster is to export
-to }{\small\emph{plain text}}{\small , not because you want a plain
-text version of your document but because it too can be used to trigger
-the copier mechanism. Go to }{\small\textsf{Tools \lyxarrow{} Preferences
-\lyxarrow{} File Handling \lyxarrow{} File Formats}}{\small{} and find
-}{\small\textsf{Plain text}}{\small{} in the list of formats. In the
-}{\small\textsf{Copier}}{\small{} slot enter }{\small\par}
-\begin{lyxcode}
-{\small python~-tt~\$\$s/scripts/ext\_copy.py~-e~nmc~-d~\$\$i~\$\$o}{\small\par}
-\end{lyxcode}
-{\small The only difference from the previous copier command is the
-absence of }{\small\texttt{pdf}}{\small .}{\small\footnote{{\small I'm assuming that you don't actually want the plain text version
-of the file copied back. If you do, then change }{\small\texttt{-e
-nmc}}{\small{} to }{\small\texttt{-e nmc,txt}}{\small .}}}{\small{} This will copy }{\small\texttt{mydoc.nmc}}{\small{} with its
-saved values from the temporary directory back to the document directory.
-To effect the export, go to }{\small\textsf{File \lyxarrow{} Export
-}}{\small and find }{\small\textsf{Plain text}}{\small{} in the list
-of formats and click on it.}{\small\par}
+But if you have a complex document, it may take too much time to want
+to export to pdf before closing \LyX , particularly if there are a
+lot of evaluations in the document. Much faster is to export to \emph{plain
+text}, not because you want a plain text version of your document
+but because it too can be used to trigger the copier mechanism. Go
+to \textsf{Tools \lyxarrow{} Preferences \lyxarrow{} File Handling \lyxarrow{}
+File Formats} and find \textsf{Plain text} in the list of formats.
+In the \textsf{Copier} slot enter
+\begin{verbatim}
+    python -tt $$s/scripts/ext_copy.py -e nmc -d $$i $$o
+\end{verbatim}
+The only difference from the previous copier command is the absence
+of \texttt{pdf}.\footnote{I'm assuming that you don't actually want the plain text version of
+the file copied back. If you do, then change \texttt{-e nmc} to \texttt{-e
+nmc,txt}.} This will copy \texttt{mydoc.nmc} with its saved values from the
+temporary directory back to the document directory. To effect the
+export, go to \textsf{File \lyxarrow{} Export }and find \textsf{Plain
+text} in the list of formats and click on it. 
 
-{\small A shortcut would be nice. For that go to }{\small\textsf{Tools
-\lyxarrow{} Preferences \lyxarrow{} Editing \lyxarrow{} Shortcuts}}{\small ,
-click on }{\small\textsf{New}}{\small , enter }{\small\texttt{buffer-export
-text}}{\small{} in the }{\small\textsf{Function:}}{\small{} slot, click
-on the blank key against }{\small\textsf{Shortcut:}}{\small{} and type
-your shortcut. You may have to try a number before you find one that
-hasn't already been assigned. (I'm using }{\small\textsf{Ctrl+}}{\small ;
-for no particular reason beyond the fact that it fits under the fingers
-easily and saving values to the document directory has a punctuation-like
-feel to it, a pause in the process of writing.) It is now an easy
-matter to press the shortcut at the end of a \LyX{} session to copy
-all the values saved in }{\small\texttt{mydoc.nmc}}{\small{} back to
-a file of the same name in the document directory. And it is brisk,
-not least because plain text export ignores ERT insets (and hence
-preview insets wrapped around ERT insets), nor does it evaluate }{\small{\small\verb`\eval`}}{\small{}
-commands in math insets.}{\small\par}
+A shortcut would be nice. For that go to \textsf{Tools \lyxarrow{}
+Preferences \lyxarrow{} Editing \lyxarrow{} Shortcuts}, click on \textsf{New},
+enter \texttt{buffer-export text} in the \textsf{Function:} slot,
+click on the blank key against \textsf{Shortcut:} and type your shortcut.
+You may have to try a number before you find one that hasn't already
+been assigned. (I'm using \textsf{Ctrl+}; for no particular reason
+beyond the fact that it fits under the fingers easily and saving values
+to the document directory has a punctuation-like feel to it, a pause
+in the process of writing.) It is now an easy matter to press the
+shortcut at the end of a \LyX{} session to copy all the values saved
+in \texttt{mydoc.nmc} back to a file of the same name in the document
+directory. And it is brisk, not least because plain text export ignores
+ERT insets (and hence preview insets wrapped around ERT insets), nor
+does it evaluate \verb`\eval` commands in math insets.
 
 \subsubsection{A final tweak?}
 
-{\small But one still needs to }{\small\emph{remember}}{\small{} to press
-the shortcut. The thought arises: can }{\small\emph{closing}}{\small{}
-the current document trigger the copying process? \LyX{} provides a
-means of linking two commands and assigning a keyboard shortcut to
-them with its }{\small\texttt{command-sequence}}{\small{} \LyX{} function.
-I suggest assigning a shortcut}{\small\textsf{ }}{\small to }{\small\par}
-\begin{lyxcode}
-{\small command-sequence~buffer-export~text;~view-close}{\small\par}
-\end{lyxcode}
-{\small Indeed, why not reassign the current shortcut for }{\small\texttt{view-close}}{\small ,}{\small\texttt{
-}}{\small which is }{\small\textsf{Ctrl+W}}{\small{} on my system, to
-this command sequence? (I use the }{\small\texttt{cua}}{\small{} key
-bindings -- check the }{\small\textsf{Bind file:}}{\small{} slot in
-}{\small\textsf{Tools \lyxarrow{} Preferences \lyxarrow{} Editing \lyxarrow{}
-Shortcuts}}{\small .)}{\small\par}
+But one still needs to \emph{remember} to press the shortcut. The
+thought arises: can \emph{closing} the current document trigger the
+copying process? \LyX{} provides a means of linking two commands and
+assigning a keyboard shortcut to them with its \texttt{command-sequence}
+\LyX{} function. I suggest assigning a shortcut\textsf{ }to
+\begin{verbatim}
+    command-sequence buffer-export text; view-close
+\end{verbatim}
+Indeed, why not reassign the current shortcut for \texttt{view-close},\texttt{
+}which is \textsf{Ctrl+W} on my system, to this command sequence?
+(I use the \texttt{cua} key bindings – check the \textsf{Bind file:}
+slot in \textsf{Tools \lyxarrow{} Preferences \lyxarrow{} Editing \lyxarrow{}
+Shortcuts}.)
 
-{\small Please note, however, that }{\small\emph{this will work as
-intended only from \LyX{} 2.4.0}}{\small .}{\small\footnote{{\small Much delayed; due for release in 2023.}}}{\small{}
-For \LyX{} 2.3 and earlier, the command sequence will generally fail
-because of `asynchronous' processing -- }{\small\texttt{buffer-export
-}}{\small and }{\small\texttt{view-close}}{\small{} use different threads
-and the latter may well start before the former is complete. From
-\LyX{} 2.4.0 this defect has been fixed. You press your shortcut, the
-export to plain text occurs and the }{\small\texttt{.nmc}}{\small{}
-file is copied back to the document directory, then the current view
-is closed.}{\small\par}
+Please note, however, that \emph{this will work as intended only from
+\LyX{} 2.4.0}.\footnote{Long-planned and initially due for release in 2021 but still (August
+2023) not released. But a beta3 version is now available from \url{https://ftp.lip6.fr/pub/lyx/devel/lyx-2.4/}} For \LyX{} 2.3 and earlier, the command sequence will generally fail
+because of `asynchronous' processing – \texttt{buffer-export }and
+\texttt{view-close} use different threads and the latter may well
+start before the former is complete. From \LyX{} 2.4.0 this defect
+has been fixed. You press your shortcut, the export to plain text
+occurs and the \texttt{.nmc} file is copied back to the document directory,
+then the current view is closed.
 
-{\small Note that in the other direction, the }{\small{\small\verb`.nmc`}}{\small{}
-file in your document directory is }{\small\emph{automatically}}{\small{}
-copied to the temporary directory when needed. Nothing needs to be
-done by you, the user.}{\small\par}
+Note that in the other direction, the \verb`.nmc` file in your document
+directory is \emph{automatically} copied to the temporary directory
+when needed. Nothing needs to be done by you, the user.
 
-\subsubsection{Use of \protect\LyX{} notes}
+\subsection{Use of \protect\LyX{} notes}
 
-{\small The central fact about a \LyX{} note is that it does not contribute
+The central fact about a \LyX{} note is that it does not contribute
 to the pdf. But instant preview still works there. This suggests a
 possibility: that a calculation be performed within a \LyX{} note and
-the result saved using }{\small{\small\verb`\nmcReuse`}}{\small{}
-within the same note. The saved value is now available }{\small\emph{from
-file}}{\small{} for use elsewhere in the document. In this way, some
-selected content from a LyX note }{\small\emph{can}}{\small{} find its
-way into the pdf when the document is compiled.}{\small\par}
+the result saved using \verb`\nmcReuse` within the same note. The
+saved value is now available \emph{from file} for use elsewhere in
+the document. In this way, some selected content from a LyX note \emph{can}
+find its way into the pdf when the document is compiled.
 
 \chapter{Reference summary}
 
+\section{Package options}
+\begin{itemize}
+\item \verb`comma` sets the comma as the decimal point; items in the variable=value
+list must then be separated by semicolons; arguments in $n$-ary functions
+must also be separated by semicolons; by default formulas in a multi-formula
+calculation should also be separated by a semicolon;
+\item \verb`rounding`=$n$ sets the default rounding value to the integer
+$n$;
+\item \verb`approx` replaces the default \verb`=` between formula and
+result in (some) displays with \verb`\approx` (displaying as $\approx$;
+the \verb`eq=<char(s)>` setting is still available to change the
+symbol for individual calculations).
+\end{itemize}
+
 \section{Commands defined in \texttt{numerica}}
 \begin{enumerate}
-\item {\small\texttt{\textbackslash nmcEvaluate, \textbackslash eval }}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash q, \textbackslash Q }}{\small (`cleave'
-commands) }{\small\par}
-\item {\small\texttt{\textbackslash nmcInfo, \textbackslash info}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash nmcMacros, \textbackslash macros}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash nmcConstants, \textbackslash constants}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash nmcReuse, \textbackslash reuse}}{\small{} }{\small\par}
+\item \texttt{\textbackslash nmcEvaluate, \textbackslash eval }
+\item \texttt{\textbackslash q, \textbackslash Q }(`cleave' commands)
+\item \texttt{\textbackslash nmcInfo, \textbackslash info}
+\item \texttt{\textbackslash nmcMacros, \textbackslash macros}
+\item \texttt{\textbackslash nmcConstants, \textbackslash constants}
+\item \texttt{\textbackslash nmcReuse, \textbackslash reuse}
 \end{enumerate}
-{\small Provided they have not already been defined when }{\small\texttt{numerica}}{\small{}
-is loaded, the following commands are defined in }{\small\texttt{numerica}}{\small{}
-using }{\small{\small\verb`\DeclareMathOperator`}}{\small{}
-from }{\small\texttt{amsmath}}{\small{} : }{\small\par}
+Provided they have not already been defined when \texttt{numerica}
+is loaded, the following commands are defined in \texttt{numerica}
+using \verb`\DeclareMathOperator` from \texttt{amsmath}:
 \begin{enumerate}
-\item {\small\texttt{\textbackslash arccsc, \textbackslash arcsec, \textbackslash arccot}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash csch, \textbackslash sech}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash asinh, \textbackslash acosh, \textbackslash atanh,
-\textbackslash acsch, \textbackslash asech, \textbackslash acoth}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash sgn, \textbackslash lb}}{\small{} }{\small\par}
+\item \texttt{\textbackslash arccsc, \textbackslash arcsec, \textbackslash arccot}
+\item \texttt{\textbackslash csch, \textbackslash sech}
+\item \texttt{\textbackslash asinh, \textbackslash acosh, \textbackslash atanh,
+\textbackslash acsch, \textbackslash asech, \textbackslash acoth}
+\item \texttt{\textbackslash arsinh, \textbackslash arcosh, \textbackslash artanh,
+\textbackslash arcsch, \textbackslash arsech, \textbackslash arcoth}
+\item \texttt{\textbackslash arcsinh, \textbackslash arccosh, \textbackslash arctanh,
+\textbackslash arccsch, \textbackslash arcsech, \textbackslash arccoth}
+\item \texttt{\textbackslash sgn, \textbackslash lb}
 \end{enumerate}
-{\small Provided they have not already been defined, the following
-commands are defined in }{\small\texttt{numerica}}{\small{} using }{\small{\small\verb`\DeclarePairedDelimiter`}}{\small{}
-from }{\small\texttt{mathtools}}{\small : }{\small\par}
-\begin{lyxcode}
-{\small\textbackslash abs,~\textbackslash ceil,~\textbackslash floor}{\small\par}
-\end{lyxcode}
-{\small The following commands have been redefined in }{\small\texttt{numerica}}{\small{}
-to give more spacing around the underlying }{\small{\small\verb`\wedge`}}{\small{}
-and }{\small{\small\verb`\vee`}}{\small{} symbols: }{\small\par}
-\begin{lyxcode}
-{\small\textbackslash land,~\textbackslash lor}{\small\par}
-\end{lyxcode}
+Provided they have not already been defined, the following commands
+are defined in \texttt{numerica} using \verb`\DeclarePairedDelimiter`
+from \texttt{mathtools}:
+\begin{verbatim}
+    \abs, \ceil, \floor
+\end{verbatim}
+Provided they have not already been defined, the following commands
+are defined in \texttt{numerica} using \texttt{\textbackslash ProvideDocumentCommand}
+\begin{verbatim}
+    \comma, \equals, \degree
+\end{verbatim}
+The following commands have been redefined in \texttt{numerica} to
+give more spacing around the underlying \verb`\wedge` and \verb`\vee`
+symbols:
+\begin{verbatim}
+    \land, \lor
+\end{verbatim}
 
 \section{\textquoteleft Digestible\textquoteright{} content}
 
-{\small\texttt{numerica}}{\small{} knows how to deal with the following
-content, meaning that any of these elements occurring within an }{\small{\small\verb`\eval`}}{\small{}
-command should not of itself cause a }{\small\texttt{numerica}}{\small{}
-error. Not all formatting commands affect display of the output. }{\small\par}
+\texttt{numerica} knows how to deal with the following content, meaning
+that any of these elements occurring within an \verb`\eval` command
+should not of itself cause a \texttt{numerica} error. Not all formatting
+commands affect display of the output.
 \begin{enumerate}
-\item {\small variable names (sequences of tokens given values in the variable~=~value
-list) }{\small\par}
-\item {\small digits, decimal point }{\small\par}
+\item variable names (sequences of tokens given values in the variable=value
+list)
+\item digits, decimal point
 \begin{enumerate}
-\item {\small\texttt{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, .}}{\small{} }{\small\par}
+\item \texttt{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, . }or \texttt{,} (if \texttt{comma}
+package option used)
 \end{enumerate}
-\item {\small constants }{\small\par}
+\item constants
 \begin{enumerate}
-\item {\small\texttt{e, \textbackslash pi, \textbackslash gamma, \textbackslash phi,
-\textbackslash deg, \textbackslash infty}}{\small{} }{\small\par}
+\item \texttt{e, \textbackslash pi, \textbackslash gamma, \textbackslash phi,
+\textbackslash deg, \textbackslash infty}
 \end{enumerate}
-\item {\small arithmetic operators }{\small\par}
+\item arithmetic operators
 \begin{enumerate}
-\item {\small\texttt{+, -, {*}, /, \textasciicircum , \textbackslash times,
-\textbackslash cdot, \textbackslash div}}{\small{} }{\small\par}
+\item \texttt{+, -, {*}, /, \textasciicircum , \textbackslash times, \textbackslash cdot,
+\textbackslash div}
 \end{enumerate}
-\item {\small logical operators }{\small\par}
+\item logical operators
 \begin{enumerate}
-\item {\small\texttt{\textbackslash wedge, \textbackslash land, \textbackslash vee,
-\textbackslash lor, \textbackslash neg, \textbackslash lnot}}{\small{} }{\small\par}
+\item \texttt{\textbackslash wedge, \textbackslash land, \textbackslash vee,
+\textbackslash lor, \textbackslash neg, \textbackslash lnot}
 \end{enumerate}
-\item {\small comparisons }{\small\par}
+\item degree symbol/switch
 \begin{enumerate}
-\item {\small\texttt{=, <, >, \textbackslash ne, \textbackslash neq, \textbackslash le,
-\textbackslash leq, \textbackslash ge, \textbackslash geq}}{\small{} }{\small\par}
-\item {\small (if }{\small\texttt{amssymb}}{\small{} loaded) }{\small\texttt{\textbackslash nless,
-\textbackslash ngtr, \textbackslash geqq, \textbackslash geqslant,
-\textbackslash leqq, \textbackslash leqslant, \textbackslash ngeq,
-\textbackslash ngeqq, \textbackslash ngeqslant, \textbackslash nleq,
-\textbackslash nleqq, \textbackslash nleqslant}}{\small{} }{\small\par}
+\item \texttt{\textbackslash degree} (possibly from package \texttt{gensymb})
 \end{enumerate}
-\item {\small brackets, bracket-like elements, modifiers }{\small\par}
+\item comparisons
 \begin{enumerate}
-\item {\small\texttt{( ), {[} {]}, \textbackslash\{ \textbackslash\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash lparen \textbackslash rparen}}{\small{}
-(from }{\small\texttt{mathtools}}{\small )}{\small\texttt{, \textbackslash lbrack
-\textbackslash rbrack, \textbackslash lbrace \textbackslash rbrace}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash lvert \textbackslash rvert, \textbackslash lfloor
-\textbackslash rfloor, \textbackslash lceil \textbackslash rceil}}{\small{} }{\small\par}
-\item {\small\texttt{| |}}{\small{} (no nesting, deprecated) }{\small\par}
-\item {\small\texttt{\textbackslash left \textbackslash right, \textbackslash bigl
-\textbackslash bigr, \textbackslash Bigl \textbackslash Bigr, \textbackslash biggl
-\textbackslash biggr, \textbackslash Biggl \textbackslash Biggr}}{\small{} }{\small\par}
-\item {\small\texttt{.}}{\small{} }{\small\texttt{/ |}}{\small{} (used with
-a modifier) }{\small\par}
-\item {\small\texttt{\textbackslash abs{[}{]}\{\}, \textbackslash abs{*}\{\},
+\item \texttt{=, <, >, \textbackslash ne, \textbackslash neq, \textbackslash le,
+\textbackslash leq, \textbackslash ge, \textbackslash geq}
+\item (if \texttt{amssymb} loaded) \texttt{\textbackslash nless, \textbackslash ngtr,
+\textbackslash geqq, \textbackslash geqslant, \textbackslash leqq,
+\textbackslash leqslant, \textbackslash ngeq, \textbackslash ngeqq,
+\textbackslash ngeqslant, \textbackslash nleq, \textbackslash nleqq,
+\textbackslash nleqslant}
+\end{enumerate}
+\item brackets, bracket-like elements, modifiers
+\begin{enumerate}
+\item \texttt{( ), {[} {]}, \textbackslash\{ \textbackslash\}; \textbackslash lparen
+\textbackslash rparen} (from \texttt{mathtools})\texttt{; \textbackslash lbrack
+\textbackslash rbrack, \textbackslash lbrace \textbackslash rbrace}
+\item \texttt{\textbackslash lvert \textbackslash rvert, \textbackslash lfloor
+\textbackslash rfloor, \textbackslash lceil \textbackslash rceil}
+\item \texttt{| |} (cannot be nested, deprecated)
+\item \texttt{\textbackslash left \textbackslash right;} \texttt{\textbackslash mleft
+\textbackslash mright, \textbackslash mleftright, \textbackslash mleftrightrestore}
+(if \texttt{mleftright} loaded)
+\item \texttt{\textbackslash bigl \textbackslash bigr, \textbackslash Bigl
+\textbackslash Bigr, \textbackslash biggl \textbackslash biggr,
+\textbackslash Biggl \textbackslash Biggr} 
+\item \texttt{\textbackslash middle }(if \texttt{mleftright} loaded)\texttt{;\textbackslash big,
+\textbackslash Big, \textbackslash bigg, \textbackslash Bigg} 
+\item \texttt{.} \texttt{/ |} (used with a modifier)
+\item \texttt{\textbackslash abs{[}{]}\{\}, \textbackslash abs{*}\{\},
 \textbackslash floor{[}{]}\{\}, \textbackslash floor{*}\{\}, \textbackslash ceil{[}{]}\{\},
-\textbackslash ceil{*}\{\}}}{\small{} }{\small\par}
+\textbackslash ceil{*}\{\}} 
 \end{enumerate}
-\item {\small unary functions (in the mathematical sense) }{\small\par}
+\item unary functions (in the mathematical sense)
 \begin{enumerate}
-\item {\small\texttt{\textbackslash sin, \textbackslash cos, \textbackslash tan,
-\textbackslash csc, \textbackslash sec, \textbackslash cot}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash arcsin, \textbackslash arccos, \textbackslash arctan,
-arccsc, \textbackslash arcsec, \textbackslash arccot }}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash sin\textasciicircum\{-1\}, \textbackslash cos\textasciicircum\{-1\},
+\item \texttt{\textbackslash sin, \textbackslash cos, \textbackslash tan,
+\textbackslash csc, \textbackslash sec, \textbackslash cot}
+\item \texttt{\textbackslash arcsin, \textbackslash arccos, \textbackslash arctan,
+arccsc, \textbackslash arcsec, \textbackslash arccot }
+\item \texttt{\textbackslash sin\textasciicircum\{-1\}, \textbackslash cos\textasciicircum\{-1\},
 \textbackslash tan\textasciicircum\{-1\}, \textbackslash csc\textasciicircum\{-1\},
-\textbackslash sec\textasciicircum\{-1\}, \textbackslash cot\textasciicircum\{-1\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash sinh, \textbackslash cosh, \textbackslash tanh,
-\textbackslash csch, \textbackslash sech, \textbackslash coth }}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash asinh, \textbackslash acosh, \textbackslash atanh,
-\textbackslash csch, \textbackslash sech, \textbackslash acoth}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash sinh\textasciicircum\{-1\}, \textbackslash cosh\textasciicircum\{-1\},
+\textbackslash sec\textasciicircum\{-1\}, \textbackslash cot\textasciicircum\{-1\}}
+\item \texttt{\textbackslash sinh, \textbackslash cosh, \textbackslash tanh,
+\textbackslash csch, \textbackslash sech, \textbackslash coth }
+\item \texttt{\textbackslash asinh, \textbackslash acosh, \textbackslash atanh,
+\textbackslash acsch, \textbackslash asech, \textbackslash acoth,
+\textbackslash arsinh, \textbackslash arcosh, \textbackslash artanh,
+\textbackslash arcsch, \textbackslash arsech, \textbackslash arcoth,
+\textbackslash arcsinh, \textbackslash arccosh, \textbackslash arctanh,
+\textbackslash arccsch, \textbackslash arcsech, \textbackslash arccoth}
+\item \texttt{\textbackslash sinh\textasciicircum\{-1\}, \textbackslash cosh\textasciicircum\{-1\},
 \textbackslash tanh\textasciicircum\{-1\}, \textbackslash csch\textasciicircum\{-1\},
-\textbackslash sech\textasciicircum\{-1\}, \textbackslash acoth\textasciicircum\{-1\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash exp, \textbackslash lb, \textbackslash lg,
+\textbackslash sech\textasciicircum\{-1\}, \textbackslash coth\textasciicircum\{-1\}}
+\item \texttt{\textbackslash exp, \textbackslash lb, \textbackslash lg,
 \textbackslash ln, \textbackslash log, \textbackslash log\_\{\},
-\textbackslash sgn, \textbackslash surd}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash sqrt\{\}, \textbackslash abs{[}{]}\{\},
-\textbackslash abs{*}\{\}, \textbackslash floor{[}{]}\{\}, \textbackslash floor{*}\{\},
-\textbackslash ceil{[}{]}\{\}, \textbackslash ceil{*}\{\}}}{\small{} }{\small\par}
-\item {\small\texttt{!, !! }}{\small (prepended argument) }{\small\par}
+\textbackslash sgn, \textbackslash surd}
+\item \texttt{\textbackslash sqrt\{\}, \textbackslash abs{[}{]}\{\}, \textbackslash abs{*}\{\},
+\textbackslash floor{[}{]}\{\}, \textbackslash floor{*}\{\}, \textbackslash ceil{[}{]}\{\},
+\textbackslash ceil{*}\{\}}
+\item \texttt{!, !! }(both with a prepended argument)
 \end{enumerate}
-\item {\small binary functions }{\small\par}
+\item binary functions 
 \begin{enumerate}
-\item {\small\texttt{\textbackslash tfrac\{\}\{\}, \textbackslash frac\{\}\{\},
-\textbackslash dfrac\{\}\{\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash tbinom\{\}\{\}, \textbackslash binom\{\}\{\},
-\textbackslash dbinom\{\}\{\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash sqrt{[}{]}\{\}}}{\small{} }{\small\par}
+\item \texttt{\textbackslash tfrac\{\}\{\}, \textbackslash frac\{\}\{\},
+\textbackslash dfrac\{\}\{\}, \textbackslash sfrac }(if \texttt{xfrac}
+loaded)
+\item \texttt{\textbackslash tbinom\{\}\{\}, \textbackslash binom\{\}\{\},
+\textbackslash dbinom\{\}\{\}}
+\item \texttt{\textbackslash sqrt{[}{]}\{\}}
 \end{enumerate}
-\item {\small$n$-ary functions }{\small\par}
+\item $n$-ary functions
 \begin{enumerate}
-\item {\small\texttt{\textbackslash min, \textbackslash max, \textbackslash gcd}}{\small{} }{\small\par}
+\item \texttt{\textbackslash min, \textbackslash max, \textbackslash gcd}
 \end{enumerate}
-\item {\small sum, prod }{\small\par}
+\item sum, prod
 \begin{enumerate}
-\item {\small\texttt{\textbackslash sum\_\{\}\textasciicircum , \textbackslash prod\_\{\}\textasciicircum{}
-}}{\small{} }{\small\par}
+\item \texttt{\textbackslash sum\_\{\}\{\}\textasciicircum\{\}, \textbackslash prod\_\{\}\{\}\textasciicircum\{\} }
 \end{enumerate}
-\item {\small formatting commands }{\small\par}
+\item formatting commands
 \begin{enumerate}
-\item {\small\texttt{,}}{\small{} (comma, in $n$-ary functions) }{\small\par}
-\item {\small\texttt{\{\}, \textbackslash\textbackslash , \&, \textbackslash to}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash begin\{\}, \textbackslash end\{\},
-\$, \textbackslash{[}, \textbackslash{]}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash dots, \textbackslash ldots, \textbackslash cdots}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash{} , \textbackslash ,}} \{\}{\small\texttt{,
-\textbackslash ;, \textbackslash :, \textbackslash !, \textbackslash >}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash thinspace, \textbackslash medspace,
-\textbackslash thickspace,}}{\small{} }{\small\par}
-\item {\small\textbackslash}{\small\texttt{negthinspace, \textbackslash negmedspace,
-\textbackslash negthickspace,}}{\small{} }{\small\par}
-\item {\small\textbackslash}{\small\texttt{hspace{*}\{\}, \textbackslash mspace\{\},}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash quad, \textbackslash qquad , \textbackslash hfill,
-\textbackslash hfil}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash phantom\{\}, \textbackslash vphantom\{\},
-\textbackslash hphantom\{\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash xmathstrut{[}{]}\{\}}}{\small{} }{\small\texttt{,
-\textbackslash splitfrac\{\}\{\}, \textbackslash splitdfrac\{\}\{\}
-}}{\small (from }{\small\texttt{mathtools}}{\small ), }{\small\texttt{\textbackslash mathstrut}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash displaystyle, \textbackslash textstyle,
-\textbackslash scriptstyle, \textbackslash scriptscriptstyle}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash label\{\}, \textbackslash ensuremath\{\},
-\textbackslash text\{\}, \textbackslash mbox\{\}, \textbackslash smash\{\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash color{[}{]}\{\}, \textbackslash textcolor{[}{]}\{\}\{\}}}{\small{} }{\small\par}
+\item \texttt{,} (comma, in $n$-ary functions)
+\item \texttt{\{\}, \textbackslash\textbackslash , \&, \textbackslash to}
+\item \texttt{\textbackslash begin\{\}, \textbackslash end\{\}, \$, \textbackslash{[},
+\textbackslash{]}}
+\item \texttt{\textbackslash dots, \textbackslash ldots, \textbackslash cdots}
+\item \texttt{\textbackslash{} , \textbackslash , {}, \textbackslash ;,
+\textbackslash :, \textbackslash !, \textbackslash >}
+\item \texttt{\textbackslash thinspace, \textbackslash medspace, \textbackslash thickspace,}
+\item \textbackslash\texttt{negthinspace, \textbackslash negmedspace,
+\textbackslash negthickspace,}
+\item \textbackslash\texttt{hspace{*}\{\}, \textbackslash mspace\{\},}
+\item \texttt{\textbackslash quad, \textbackslash qquad , \textbackslash hfill,
+\textbackslash hfil}
+\item \texttt{\textbackslash phantom\{\}, \textbackslash vphantom\{\},
+\textbackslash hphantom\{\}}
+\item \texttt{\textbackslash xmathstrut{[}{]}\{\}} \texttt{, \textbackslash splitfrac\{\}\{\},
+\textbackslash splitdfrac\{\}\{\} }(from \texttt{mathtools}), \texttt{\textbackslash mathstrut}
+\item \texttt{\textbackslash displaystyle, \textbackslash textstyle, \textbackslash scriptstyle,
+\textbackslash scriptscriptstyle}
+\item \texttt{\textbackslash label\{\}, \textbackslash ensuremath\{\},
+\textbackslash text\{\}, \textbackslash mbox\{\}, \textbackslash smash\{\}}
+\item \texttt{\textbackslash color{[}{]}\{\}, \textbackslash textcolor{[}{]}\{\}\{\}}
+\item \texttt{\textbackslash mkern, \textbackslash mskip}
 \end{enumerate}
-\item {\small font commands }{\small\par}
+\item font commands
 \begin{enumerate}
-\item {\small\texttt{\textbackslash mathrm\{\}, \textbackslash mathit\{\},
-\textbackslash mathcal\{\}, \textbackslash mathtt\{\}, \textbackslash mathbf\{\},
-\textbackslash mathbb\{\}, \textbackslash mathsf\{\}, \textbackslash mathfrak\{\},
-\textbackslash mathscr\{\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash mathnormal\{\}, \textbackslash boldsymbol\{\}}}{\small{} }{\small\par}
-\item {\small\texttt{\textbackslash textrm, \textbackslash textsf, \textbackslash texttt}}{\small{} }{\small\par}
+\item \texttt{\textbackslash mathrm\{\}, \textbackslash mathit\{\}, \textbackslash mathcal\{\},
+\textbackslash mathtt\{\}, \textbackslash mathbf\{\}, \textbackslash mathbb\{\},
+\textbackslash mathsf\{\}, \textbackslash mathfrak\{\}, \textbackslash mathscr\{\}}
+\item \texttt{\textbackslash mathnormal\{\}, \textbackslash boldsymbol\{\}}
+\item \texttt{\textbackslash textrm\{\}, \textbackslash textsf\{\}, \textbackslash texttt\{\},
+\textbackslash textit\{\}, \textbackslash textsl\{\}, \textbackslash textbf\{\},
+\textbackslash textsc\{\}}
 \end{enumerate}
 \end{enumerate}
 
 \section{Settings}
 
-\subsection{Available \texttt{\textbackslash nmcEvaluate} settings}
+\subsection{Functional settings}
 \begin{center}
-{\small{}%
-\begin{tabular}[t]{>{\raggedright}p{1.5cm}l>{\raggedright}m{4cm}>{\raggedright}m{4cm}}
+\begin{center}
+\begin{tabular}{>{\raggedright}p{1.5cm}>{\raggedright}p{1.5cm}>{\raggedright}p{3cm}>{\raggedright}p{1.5cm}>{\raggedright}p{1.5cm}}
 \toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
+{\small key} & {\small type} & {\small meaning} & {\small default} & {\small initial}\tabularnewline
 \midrule 
-{\small\texttt{dbg}} & {\small int} & {\small debug `magic' integer} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{view}} &  & {\small equivalent to }{\small\texttt{dbg=1}} & \tabularnewline
-{\small\texttt{\textasciicircum}} & {\small char} & {\small exponent mark for sci. notation input} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{xx}} & {\small int (0/1)} & {\small multi-token variable switch} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{()}} & {\small int (0/1/2)} & {\small trig. function arg. parsing} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{o}} & {\small int (0/1)} & {\small degree switch for trig. funcions} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{log}} & {\small num} & {\small base of logarithms for }{\small{\small\verb`\log`}}{\small} & {\small\texttt{10}}\tabularnewline
-{\small\texttt{vv@}} & {\small int (0/1)} & {\small vv-list calculation mode} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{vvmode}} & {\small int (0/1)} & {\small equivalent to }{\small\texttt{vv@}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{vvd}} & {\small token(s)} & {\small vv-list display-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 12mu plus 6mu minus 9mu(vv)}}\tabularnewline
-{\small\texttt{vvi}} & {\small token(s)} & {\small vv-list text-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{\small{*}} &  & {\small switch to suppress equation numbering (if }{\small\texttt{\textbackslash\textbackslash}}{\small{}
-in }{\small\texttt{vvd}}{\small )} & \tabularnewline
-{\small\texttt{p}} & {\small char(s)} & {\small punctuation (esp. in display-style)} & {\small\texttt{,}}\tabularnewline
-{\small\texttt{S+}} & {\small int} & {\small extra rounding for stopping criterion, sums} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{S?}} & {\small$\text{int}\ge0$} & {\small query stopping with these final terms, sums} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{P+}} & {\small int} & {\small extra rounding for stopping criterion, products} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{P?}} & {\small$\text{int}\ge0$} & {\small query stopping with these final terms, products} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{reuse}} & {\small int} & {\small form of result saved with }{\small{\small\verb`\nmcReuse`}}{\small} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{dbg}} & {\small int} & {\small debug data} &  & {\small\texttt{0}}\tabularnewline
+{\small\texttt{view}} &  & {\small\texttt{dbg=1}} & {\small\texttt{dbg=1}} & \tabularnewline
+{\small\texttt{\textasciicircum}} & {\small char} & {\small exp. mark for sci. notation input} & {\small\texttt{e}} & \tabularnewline
+{\small\texttt{xx}} & {\small int (0/1)} & {\small accept multi-token variables} &  & {\small\texttt{1}}\tabularnewline
+\multirow{2}{1.5cm}{\texttt{ff}} & \multirow{2}{1.5cm}{{\small char}} & \multirow{2}{3cm}{{\small main arg. multi- formula delimiter}} & \multicolumn{2}{l}{{\small\texttt{, }}{\small (if decimal dot)}}\tabularnewline
+ &  &  & \multicolumn{2}{l}{{\small\texttt{; }}{\small (if decimal comma)}}\tabularnewline
+{\small\texttt{1s2}} & {\small int (0/1)} & {\small allow spaced digit groups in numbers} & {\small\texttt{1}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{/min}} & {\small$\text{int}\ge1$} & {\small fraction form denom- inator search start} &  & {\small\texttt{1}}\tabularnewline
+{\small\texttt{/max}} & {\small$\text{int}\ge1$} & {\small fraction form denom- inator search end} &  & {\small\texttt{200}}\tabularnewline
+{\small\texttt{vv@}} & \multirow{3}{1.5cm}{{\small int (0/1)}} & \multirow{3}{3cm}{{\small vv-list calculation mode}} & \multirow{3}{1.5cm}{} & \multirow{3}{1.5cm}{{\small\texttt{0}}}\tabularnewline
+\multirow{2}{1.5cm}{{\small\texttt{vvmode}}} &  &  &  & \tabularnewline
+ &  &  &  & \tabularnewline
+{\small\texttt{o}} & {\small int (0/1)} & {\small trig. function args in degrees} & {\small\texttt{1}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{log}} & {\small num} & {\small base of logs for }{\small{\small\verb`\log`}} &  & {\small\texttt{10}}\tabularnewline
+{\small\texttt{S+}} & {\small int} & {\small extra rounding, sums} &  & {\small\texttt{2}}\tabularnewline
+{\small\texttt{S?}} & {\small$\text{int}\ge0$} & {\small number of query terms, sums} &  & {\small\texttt{0}}\tabularnewline
+{\small\texttt{P+}} & {\small int} & {\small extra rounding, products} &  & {\small\texttt{2}}\tabularnewline
+{\small\texttt{P?}} & {\small$\text{int}\ge0$} & {\small number of query terms, products} &  & {\small\texttt{0}}\tabularnewline
+\midrule 
+{\small\texttt{()}} & \multicolumn{4}{l}{{\small obsolete; see §\ref{sec:settinsDeprecatedObsoleteOptions}}}\tabularnewline
+{\small\texttt{reuse}} & \multicolumn{4}{l}{{\small obsolete; see §\ref{sec:settinsDeprecatedObsoleteOptions}}}\tabularnewline
+{\small\texttt{{*}}} & \multicolumn{4}{l}{{\small obsolete; see §\ref{sec:settinsDeprecatedObsoleteOptions}}}\tabularnewline
 \bottomrule
-\end{tabular}}{\small\par}
+\end{tabular}
 \par\end{center}
+\par\end{center}
 
-\subsection{Available settings for supplementary commands}
+\subsubsection{Debug settings}
+\begin{itemize}
+\item \verb`dbg=0`\texttt{ }turns off the debug function, displays the
+result or error message (this is the initial value);
+\item \verb`dbg=1`\texttt{ }equivalent to \verb`dbg=2*3*5*7*11` for \verb`\eval`;
+\item \verb`dbg=2` displays the formula after multi-token variables have
+been converted to their single token form, \verb`\nmc_a`, \verb`\nmc_b`,
+etc.;
+\item \verb`dbg=3` displays the vv-list after multi-token variables have
+been converted to their single token form;
+\item \verb`dbg=5` displays the stored variables and their values \emph{after}
+evaluation (\verb`dbg=3` lists the values as expressions);
+\item \verb`dbg=7` displays the formula after it has been fp-ified but
+before it has been fed to \texttt{l3fp} to evaluate; 
+\item \verb`dbg=11` displays the \LaTeX{} form of the final display; it
+will contain, \emph{inter alia}, the numerical result.
+\end{itemize}
 
-{\small All settings for }{\small{\small\verb`\nmcEvaluate`}}{\small ,
-the }{\small{\small\verb`view`}}{\small{} setting in particular
-(although most will be irrelevant), plus for }{\small\par}
+\subsection{Display settings}
+
+\begin{tabular}{>{\raggedright}p{1cm}>{\raggedright}p{1.5cm}>{\raggedright}p{3.5cm}>{\centering}p{1.5cm}>{\centering}p{1.5cm}}
+\toprule 
+{\small key} & {\small type} & {\small meaning} & {\small default} & {\small initial}\tabularnewline
+\midrule
+\texttt{f} & {\small int (0/1)} & {\small show/hide formula} &  & \tabularnewline
+{\small\texttt{p}} & {\small token(s)} & {\small concluding punctuation} & {\small\texttt{,}} & \tabularnewline
+{\small\texttt{pp}} & {\small token(s)} & {\small multi-formula inter- result punctuation} & {\small\texttt{,}} & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{env}} & {\small token(s)} & {\small math environment} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{arg}} & {\small token(s)} & {\small arg. for }{\small\texttt{-at}}{\small , }{\small\texttt{array}}{\small{}
+envs} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{eq}} & {\small token(s)} & {\small relation symbol} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{vv}} & {\small token(s)} & {\small vv-list specification} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{sep}} & {\small token(s)} & {\small separator between multi-formula results} & \multicolumn{2}{c}{{\small see Table~\ref{tab:settingsEnvironment-defaults}}}\tabularnewline
+{\small\texttt{\textbackslash\}}} & {\small token(s)} & {\small right bracket for inner math environments} & {\small\textbackslash{} }{\small\texttt{\textbackslash\}}} & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{vvi}} & \multicolumn{4}{l}{{\small deprecated; use }{\small\texttt{vv}}}\tabularnewline
+{\small\texttt{vvd}} & \multicolumn{4}{l}{{\small deprecated; use }{\small\texttt{vv}}}\tabularnewline
+\bottomrule
+\end{tabular}
+
+\subsection{Environment settings}
+
+\begin{tabular}{lccV{\linewidth}l}
+\toprule 
+{\small\texttt{env}} & {\small rem/}{\small\texttt{arg}} & {\small\texttt{eq}} & {\small\texttt{vv}} & {\small\texttt{sep}}\tabularnewline
+\midrule
+{\small\texttt{\$}} & \multirow{3}{*}{} & \multirow{3}{*}{{\small\texttt{=}}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 12muplus}}~\linebreak{}
+{\small\texttt{6muminus9mu(vv)}}
+\end{cellvarwidth}} & \multirow{3}{*}{{\small\texttt{\textbackslash quad}}}\tabularnewline
+{\small\texttt{\textbackslash (}} &  &  &  & \tabularnewline
+{\small\texttt{math}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{\textbackslash{[}}} &  & {\small\texttt{=}} & \begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth} & {\small\texttt{\textbackslash{]}\textbackslash{[}}}\tabularnewline
+\cmidrule{1-1}
+{\small\texttt{displaymath}} & \multirow{3}{*}{} & \multirow{3}{*}{{\small\texttt{=}}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{\textbackslash end\{}}{\small\texttt{\emph{env}}}{\small\texttt{\}}}~\linebreak{}
+{\small\texttt{\textbackslash begin\{}}{\small\texttt{\emph{env}}}{\small\texttt{\}}}
+\end{cellvarwidth}}\tabularnewline
+{\small\texttt{equation}} &  &  &  & \tabularnewline
+{\small\texttt{equation{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{multline}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+\centering
+{\small\texttt{\textbackslash eval}}{\small{} in }\linebreak{}
+{\small{} }{\small\texttt{multline}}
+\end{cellvarwidth}} & \multirow{2}{*}{{\small\texttt{=}}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth}} & \multirow{2}{*}{{\small\texttt{\textbackslash hfill\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{multline{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{multline}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+\centering
+{\small\texttt{multline}}~\linebreak{}
+{\small in }{\small\texttt{\textbackslash eval}}
+\end{cellvarwidth}} & \multirow{2}{*}{{\small\texttt{=}}} & \multirow{2}{*}{{\small\texttt{,\textbackslash\textbackslash (vv)}}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{\textbackslash end\{}}{\small\texttt{\emph{env}}}{\small\texttt{\}}}~\linebreak{}
+{\small\texttt{\textbackslash begin\{}}{\small\texttt{\emph{env}}}{\small\texttt{\}}}
+\end{cellvarwidth}}\tabularnewline
+{\small\texttt{multline{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{eqnarray}} & \multirow{2}{*}{} & \multirow{2}{*}{{\small\texttt{\&=\&}}} & \multirow{2}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth}} & \multirow{2}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{eqnarray{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{align}} & \multirow{3}{*}{} & \multirow{3}{*}{{\small\texttt{\&=}}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 36mu}}~\linebreak{}
+{\small\texttt{minus24mu(vv)}}
+\end{cellvarwidth}} & \multirow{3}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{align{*}}} &  &  &  & \tabularnewline
+{\small\texttt{aligned}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{flalign}} & \multirow{2}{*}{} & \multirow{2}{*}{{\small\texttt{\&=}}} & \multirow{2}{*}{{\small\texttt{,\&(vv)}}} & \multirow{2}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{flalign{*}}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{gather}} & \multirow{3}{*}{} & \multirow{3}{*}{{\small\texttt{\&=\&}}} & \multirow{3}{*}{\begin{cellvarwidth}[t]
+{\small\texttt{,\textbackslash mskip 12muplus}}~\linebreak{}
+{\small\texttt{6muminus9mu(vv)}}
+\end{cellvarwidth}} & \multirow{3}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{gather{*}}} &  &  &  & \tabularnewline
+{\small\texttt{gathered}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{alignat}} & \multirow{3}{*}{{\small\texttt{2}}} & \multirow{3}{*}{{\small\texttt{\&=\textbackslash ;\&}}} & \multirow{3}{*}{{\small\texttt{,\textbackslash qquad\&(vv)}}} & \multirow{3}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{alignat{*}}} &  &  &  & \tabularnewline
+{\small\texttt{alignedat}} &  &  &  & \tabularnewline
+\cmidrule{1-1}
+{\small\texttt{array}} & {\small\texttt{rcrl}} & {\small\texttt{\&=\&}} & {\small\texttt{,\&(vv)}} & {\small\texttt{\textbackslash\textbackslash}}\tabularnewline
+\cmidrule{1-1}
+{\small\texttt{cases}} & \multirow{2}{*}{} & \multirow{2}{*}{{\small\texttt{=}}} & \multirow{2}{*}{{\small\texttt{,\textbackslash quad\textbackslash hfill(vv)}}} & \multirow{2}{*}{{\small\texttt{\textbackslash\textbackslash}}}\tabularnewline
+{\small\texttt{dcases}} &  &  &  & \tabularnewline
+\bottomrule
+\end{tabular}
+
+\subsection{Settings for supplementary commands}
+
+In principle the settings 
+\begin{verbatim}
+    dbg, view, ^, xx, ff, 1s2, /min, /max, vv@, o, log, S+, S?, P+, P? 
+\end{verbatim}
+are available for \verb`\nmcInfo`, \verb`\nmcMacros`, \verb`\nmcConstants`,
+\verb`\nmcReuse` but most will be of little relevance in most cases. 
 \begin{itemize}
-\item {\small{\small\verb`\nmcMacros`}}{\small{} }{\small\par}
+\item \verb`\nmcInfo`
 \begin{itemize}
-\item {\small{\small\verb`free`}}{\small{} `deregister' a macro from
-}\texttt{numerica}{\small{} }{\small\par}
+\item \verb`view` equivalent to \verb`dbg=2`;
 \end{itemize}
-\item {\small{\small\verb`\nmcConstants`}}{\small{} }{\small\par}
+\item \verb`\nmcMacros`
 \begin{itemize}
-\item {\small{\small\verb`add`}}{\small{} add the new list of constants
-to the current one }{\small\par}
+\item \verb`view` equivalent to \verb`dbg=2*3*5`;
+\item \verb`free` `deregister' a macro from \texttt{numerica};
 \end{itemize}
-\item {\small{\small\verb`\nmcReuse`}}{\small{} }{\small\par}
+\item \verb`\nmcConstants`
 \begin{itemize}
-\item {\small{\small\verb`delete`}}{\small{} remove the listed control
-sequences from the }{\small{\small\verb`.nmc`}}{\small{} file }{\small\par}
-\item {\small{\small\verb`renew`}}{\small{} change the value of a
-control sequence in the }{\small{\small\verb`.nmc`}}{\small{}
-file }{\small\par}
+\item \verb`view` equivalent to \verb`dbg=2*3*5`;
+\item \verb`add` add the new list of constants to the current one;
 \end{itemize}
+\item \verb`\nmcReuse`
+\begin{itemize}
+\item \verb`view` equivalent to \verb`dbg=3`;
+\item \verb`save` the control sequence formed from the supplied name to
+the \verb`.nmc` file with the numerical result from the latest \verb`\eval`
+command and define it in \LaTeX ;
+\item \verb`renew` if necessary overwrite the value of a control sequence
+in the \verb`.nmc` file and redefine it in \LaTeX .
+\item \verb`load` load the saved control sequences and define them globally
+in \LaTeX ;
+\item \verb`delete` remove the listed control sequence and value from the
+\verb`.nmc` file and undefine it in \LaTeX ;
 \end{itemize}
+\end{itemize}
 
-\subsection{Available configuration file settings}
-\begin{center}
-{\small\bigskip{}
- }{\small{}%
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small default}\tabularnewline
-\midrule 
-{\small\texttt{rounding}} & {\small\texttt{6}}\tabularnewline
-{\small\texttt{pad}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{output-sci-notation}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{output-exponent-char}} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{input-sci-notation}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{input-exponent-char}} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{multitoken-variables}} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{use-degrees}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{logarithm-base}} & {\small\texttt{10}}\tabularnewline
-{\small\texttt{intify-rounding}} & {\small\texttt{14}}\tabularnewline
-{\small\texttt{vv-display}} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{\small\texttt{vv-inline}} & {\small\texttt{\{,\}\textbackslash mskip 12mu 6mu minus 9mu(vv)}}\tabularnewline
-{\small\texttt{sum-extra-rounding}} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{sum-query-terms}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{prod-extra-rounding}} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{prod-query-terms}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{eval-reuse}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}}{\small\par}
-\par\end{center}
-
-{\small{} }{\small\par}
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/numerica/numerica.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/numerica/numerica.sty	2023-08-22 22:46:08 UTC (rev 68020)
+++ trunk/Master/texmf-dist/tex/latex/numerica/numerica.sty	2023-08-22 22:46:17 UTC (rev 68021)
@@ -7,49 +7,97 @@
 %
 % Andrew Parsloe (ajparsloe at gmail.com)
 %
-\RequirePackage{l3keys2e}
 \RequirePackage{amsmath,mathtools}
-\ProvidesExplPackage
-  {numerica}
-  {2023/06/28}
-  {2.1.0}
+\ProvidesExplPackage{numerica} {2023/08/19} {3.0.0}
   {Numerically evaluate mathematical expressions in their LaTeX form}
-% needs amsmath
-\cs_if_free:NT \arccsc { \DeclareMathOperator{\arccsc}{arccsc} }
-\cs_if_free:NT \arcsec { \DeclareMathOperator{\arcsec}{arcsec} }
-\cs_if_free:NT \arccot { \DeclareMathOperator{\arccot}{arccot} }
-\cs_if_free:NT \csch   { \DeclareMathOperator{\csch}{csch} }
-\cs_if_free:NT \sech   { \DeclareMathOperator{\sech}{sech} }
-\cs_if_free:NT \asinh  { \DeclareMathOperator{\asinh}{asinh} }
-\cs_if_free:NT \acosh  { \DeclareMathOperator{\acosh}{acosh} }
-\cs_if_free:NT \atanh  { \DeclareMathOperator{\atanh}{atanh} }
-\cs_if_free:NT \acsch  { \DeclareMathOperator{\acsch}{acsch} }
-\cs_if_free:NT \asech  { \DeclareMathOperator{\asech}{asech} }
-\cs_if_free:NT \acoth  { \DeclareMathOperator{\acoth}{acoth} }
-\cs_if_free:NT \sgn    { \DeclareMathOperator{\sgn}{sgn} }
-\cs_if_free:NT \lb     { \DeclareMathOperator{\lb}{lb} }
-% needs mathtools
-\cs_if_free:NT \abs {\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} }
-\cs_if_free:NT \ceil { \DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} }
-\cs_if_free:NT \floor { \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} }
-%
+
+\tl_const:Nn \c_nmc_version_tl { 30 }
+\bool_new:N \l__nmc_dec_comma_bool
+\keys_define:nn { numerica/package }
+  { 
+    comma   .bool_set:N = \l__nmc_dec_comma_bool,
+    comma    .default:n = true,
+    comma    .initial:n = false,
+    rounding .int_set:N = \l__nmc_round_int,
+    rounding .initial:n = 6,
+    approx    .tl_set:N = \l__nmc_eq_tl,
+    approx   .default:n = \approx,
+    approx   .initial:n = {=}
+  }
+\ProcessKeyOptions [ numerica/package ]
+% *unspaced* decimal comma
+\bool_if:NTF \l__nmc_dec_comma_bool
+  {
+    \tl_const:Nn \c__nmc_vv_delim_tl {;}
+    \mathchardef \nmcComma \mathcode`,
+    \AtBeginDocument
+      { 
+        \char_set_active_eq:nN { `, } \__nmc_dec_comma:
+        \char_set_mathcode:nn { `, } { "8000 }
+      }
+  }
+  { \tl_const:Nn \c__nmc_vv_delim_tl {,} }
+
+\cs_new_protected:Npn \__nmc_dec_comma:
+  { \peek_after:Nw \__nmc_check_for_digit:  }
+\cs_new:Npn \__nmc_check_for_digit:
+  {
+    \token_case_charcode:NnTF \l_peek_token 
+        { {0}{} {1}{} {2}{} {3}{} {4}{} {5}{} {6}{} {7}{} {8}{} {9}{} }
+      { { \nmcComma } } { \nmcComma }
+  }
+% \sgn \lb; missing hyp & inverse trig & hyp fns
+\cs_new:Npn \__nmc_fn_def:N #1
+  { \cs_if_free:NT #1 { \DeclareMathOperator{#1}{\cs_to_str:N #1} } }
+\cs_generate_variant:Nn \__nmc_fn_def:N { c }
+\AtBeginDocument 
+  {
+    \clist_map_inline:nn { sgn, lb } { \__nmc_fn_def:c {#1} } 
+    \clist_map_inline:nn { csch, sech } { \__nmc_fn_def:c {#1} }
+    \clist_map_inline:nn { csc, sec, cot } { \__nmc_fn_def:c {arc#1} }
+    \clist_map_inline:nn { sinh, cosh, tanh, csch, sech, tanh }
+      { 
+        \__nmc_fn_def:c {a#1} 
+        \__nmc_fn_def:c {ar#1} 
+        \__nmc_fn_def:c {arc#1} 
+      }
+    \cs_if_free:NT \abs {\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} }
+    \cs_if_free:NT \ceil { \DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} }
+    \cs_if_free:NT \floor { \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} }
+    \cs_if_free:NT \sfrac 
+      { 
+        \NewDocumentCommand \sfrac { mm } 
+          { 
+            \mathchoice{{\scriptstyle #1/#2}} {{\scriptstyle #1/#2}}
+                {{\scriptscriptstyle #1/#2}} {{#1/#2}} 
+          }
+      }
+  }
 \RenewDocumentCommand \land {} { \,\wedge\, }
 \RenewDocumentCommand \lor {} { \,\vee\, }
 \NewDocumentCommand \Q {} { \prg_do_nothing: } % Qleave apart
 \NewDocumentCommand \q {} { \prg_do_nothing: } % qleave to 
+\ProvideDocumentCommand \comma {} {,}
+\ProvideDocumentCommand \equals {} { \ensuremath{=} }
+\ProvideDocumentCommand \degree {} { \ensuremath{^\circ} }
 %
 \int_const:Nn \c__nmc_and_int { 0 }
 \int_const:Nn \c__nmc_cmp_int { 1 }
 \int_const:Nn \c__nmc_sum_int { 2 }
-\int_const:Nn \c__nmc_trg_int { 3 }
-\int_const:Nn \c__nmc_uny_int { 4 }
-\int_const:Nn \c__nmc_prn_int { 5 }
-\int_const:Nn \c__nmc_srd_int { 6 }
-\int_new:N \l__nmc_trg_int
+\int_const:Nn \c__nmc_uny_int { 3 }
+\int_const:Nn \c__nmc_prn_int { 4 }
+\int_const:Nn \c__nmc_srd_int { 5 }
 \int_new:N \l__nmc_num_sgn_int % tables
 \tl_new:N \l__nmc_toss_tl
+\tl_new:N \l__nmca_tl
+\fp_new:N \l_tmpc_fp 
+\fp_new:N \l_tmpd_fp
+\int_new:N \l__nmca_int
 \seq_new:N \l_tmpc_seq
-% 
+%
+\cs_if_exist:NTF \seq_map_pairwise_function:NNN
+  { \cs_set_eq:NN \__nmc_braid:NNN \seq_map_pairwise_function:NNN }
+  { \cs_set_eq:NN \__nmc_braid:NNN \seq_mapthread_function:NNN } 
 \cs_if_exist:NF \int_if_zero_p:n
   {
     \prg_new_conditional:Npnn \int_if_zero:n #1 { p,T,F,TF }
@@ -79,7 +127,7 @@
       { \prop_gput:Nnn \g__nmc_class_prop { ##1 } { #2 } }
   }
 %
-\__nmc_fill_class:nn { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, . } 
+\__nmc_fill_class:nn { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 } 
   { \__nmc_fpify_dec: \__nmc_delim_dec: }
 \__nmc_fill_class:nn { e, \pi, \gamma, \phi, \deg, \infty }
   { \__nmc_fpify_const: \__nmc_delim_const: }
@@ -96,7 +144,7 @@
   { \__nmc_fpify_power: \__nmc_delim_power: }
 \__nmc_fill_class:nn { \frac, \dfrac }
   { \__nmc_fpify_frac: \__nmc_delim_frac: }
-\prop_put:Nnn \g__nmc_class_prop { \tfrac }
+\__nmc_fill_class:nn { \tfrac, \sfrac }
   { \__nmc_fpify_frac: \__nmc_delim_tfrac: }
 % comparisons
 \__nmc_fill_class:nn 
@@ -116,29 +164,26 @@
   { \__nmc_fpify_lparen: \__nmc_delim_lparen: }
 \__nmc_fill_class:nn { |, \lvert, \lfloor, \lceil }
   { \__nmc_fpify_lvert: \__nmc_delim_lvert: }
-\__nmc_fill_class:nn { \left, \bigl, \Bigl, \biggl, \Biggl }
+\__nmc_fill_class:nn { \left, \mleft, \bigl, \Bigl, \biggl, \Biggl }
   { \__nmc_fpify_lmod: \__nmc_delim_lmod: } 
 % right
-\__nmc_fill_class:nn { \right, \bigr, \Bigr, \biggr, \Biggr }
-  { \prg_do_nothing: \__nmc_delim_rparen: } 
+\__nmc_fill_class:nn { \right, \mright, \bigr, \Bigr, \biggr, \Biggr }
+  { \__nmc_fpify_rmod: \__nmc_delim_rparen: } 
 % unary fns: f 
-\__nmc_fill_class:nn { \sin, \cos, \tan, \csc, \sec, \cot }
-  { 
-    { \__nmc_fpify_unary:n { \l__nmc_trg_int } } 
-    { \__nmc_delim_unary:n { \l__nmc_trg_int } } 
-  }
 \__nmc_fill_class:nn
     { 
+      \sin, \cos, \tan, \csc, \sec, \cot,
       \arcsin, \arccos, \arctan, \arccsc, \arcsec, \arccot,
       \sinh, \cosh, \tanh, \csch, \sech, \coth,
       \asinh, \acosh, \atanh, \acsch, \asech, \acoth,
+      \arsinh, \arcosh, \artanh, \arcsch, \arsech, \arcoth,
+      \arcsinh, \arccosh, \arctanh, \arccsch, \arcsech, \arccoth,
       \exp, \ln, \lg, \lb, \sgn
     }
-  { 
-    { \__nmc_fpify_unary:n { \c__nmc_uny_int } } 
-    { \__nmc_delim_unary:n { \c__nmc_uny_int } } 
-  }
-% f!
+  { \__nmc_fpify_unary: \__nmc_delim_unary: }
+\prop_put:Nnn \g__nmc_class_prop { \degree }
+  { \__nmc_fpify_degree: \__nmc_delim_append: }
+% factorial
 \prop_put:Nnn \g__nmc_class_prop { ! }
   { \__nmc_fpify_fact: \__nmc_delim_fact: }
 % f{}
@@ -152,14 +197,26 @@
 % nary f(arg1,...)
 \__nmc_fill_class:nn { \min, \max, \gcd }
   { \__nmc_fpify_nary: \__nmc_delim_nary: }
-\prop_put:Nnn \g__nmc_class_prop { , }
-  { \__nmc_fpify_comma: \__nmc_delim_comma: }
+\bool_if:NTF \l__nmc_dec_comma_bool
+  { 
+    \prop_put:Nnn \g__nmc_class_prop { , }
+      { \__nmc_fpify_dec: \__nmc_delim_dec: }
+    \prop_put:Nnn \g__nmc_class_prop { ; }
+      {\__nmc_fpify_comma: \__nmc_delim_comma: } 
+  }
+  {
+    \prop_put:Nnn \g__nmc_class_prop { . }
+      { \__nmc_fpify_dec: \__nmc_delim_dec: }
+    \prop_put:Nnn \g__nmc_class_prop { , }
+      {\__nmc_fpify_comma: \__nmc_delim_comma: }
+  }
 % fontlike (ignore cmd; heed {arg} )
 \__nmc_fill_class:nn
     { 
       \mathrm, \mathit, \mathcal, \mathtt, \mathbf, \mathbb, 
       \mathsf, \mathfrak, \mathscr, \mathnormal, \boldsymbol,
-      \ensuremath, \smash, \textrm, \textsf, \texttt
+      \ensuremath, \smash, \textrm, \textsf, \texttt,
+      \textit, \textsl, \textsc, \textbf
     }
   { \__nmc_fpify_font: \__nmc_delim_font: }
 % ignore cmd, [arg1], {arg2}; heed {arg3}
@@ -173,8 +230,11 @@
     { 
       {{}}, \\, &, \to, \q_nil, \dots, \ldots, \cdots,
       \quad, \qquad, \hfill, \hfil, \mathstrut, $, \(, \), \[, \],
-      \ , \,, \;, \:, \!, \>, \thinspace, \medspace, \thickspace, \negthinspace, \negmedspace, \negthickspace,
+      \ , \,, \;, \:, \!, \>, \thinspace, \medspace, \thickspace, 
+      \negthinspace, \negmedspace, \negthickspace, \lefteqn,
       \displaystyle, \textstyle, \scriptstyle, \scriptscriptstyle,
+      \middle, \big, \Big, \bigg, \Bigg, \protect, 
+      \mleftright, \mleftrightrestore, \comma, \equals
     }
   { \prg_do_nothing: \__nmc_delim_absorb: }
 \__nmc_fill_class:nn 
@@ -184,6 +244,9 @@
   { \__nmc_fpify_absorb_sm: \__nmc_delim_absorb_ii: } 
 \__nmc_fill_class:nn  { \xmathstrut, \color }
   { \__nmc_fpify_absorb_om: \__nmc_delim_absorb_ii: }
+% kerning
+\__nmc_fill_class:nn { \mskip, \mkern }
+  { \__nmc_fpify_mkern: \__nmc_delim_mkern: }
 % ams environs f{arg1} (& f{arg1}{arg2} for aligned, aligned*) 
 \__nmc_fill_class:nn { \begin, \end } 
   { \__nmc_fpify_BE: \__nmc_delim_BE: }
@@ -198,7 +261,7 @@
     { 
       \eval, \nmcEvaluate, \iter, \nmcIterate, \solve, \nmcSolve,
       \recur, \nmcRecur, \tabulate, \nmcTabulate, \info, \nmcInfo,
-      \constants, \nmcConstants, \reuse, \nmcReuse
+      \constants, \nmcConstants, \macros, \nmcMacros, \reuse, \nmcReuse
     }
   { \__nmc_fpify_cmd: \__nmc_delim_cmd: }
 % substitution classes %%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -212,7 +275,7 @@
   {
     \cs_set_protected:Npn \__nmc_substitutions:nn ##1##2
       { \prop_gput:Nnn #1 { ##1 } { ##2 } }
-    \seq_mapthread_function:NNN #2 #3 \__nmc_substitutions:nn
+    \__nmc_braid:NNN #2 #3 \__nmc_substitutions:nn
   }
 \seq_set_from_clist:Nn \l_tmpa_seq 
   {
@@ -221,6 +284,8 @@
     \arcsin, \arccos, \arctan, \arccsc, \arcsec, \arccot,
     \sinh, \cosh, \tanh, \csch, \sech, \coth, 
     \asinh, \acosh, \atanh, \acsch, \asech, \acoth,
+    \arsinh, \arcosh, \artanh, \arcsch, \arsech, \arcoth,
+    \arcsinh, \arccosh, \arctanh, \arccsch, \arcsech, \arccoth,
     \exp, \ln, \lg, \lb, \sgn, 
     \max, \min, \surd, \sqrt, \times, \cdot, \div,
     \abs, \floor, \ceil, \lvert, \lfloor, \lceil,
@@ -240,7 +305,9 @@
     acsc\__nmc_deg:, asec\__nmc_deg:, acot\__nmc_deg:,
     sinh, cosh, tanh, csch, sech, coth,  
     asinh, acosh, atanh, acsch, asech, acoth,
-    exp, ln, (0.4342944819032518)ln, (1.442695040888963)ln, sign, 
+    asinh, acosh, atanh, acsch, asech, acoth,
+    asinh, acosh, atanh, acsch, asech, acoth,
+    exp, ln, (0.4342944819032518)ln, (1.442695040888963)ln, sign,
     max, min, sqrt, sqrt, *, *, /, 
     abs, floor, ceil, abs, floor, ceil,
     !, !, &&, &&, ||, ||,
@@ -250,100 +317,179 @@
 \__nmc_subst:NNN \g__nmc_subst_fpfn_prop \l_tmpa_seq \l_tmpb_seq 
 
 \seq_set_from_clist:Nn \l_tmpa_seq
-    { 
-      \cosh, \sinh, \tanh, \csch, \sech, \coth,
-      (, [, \{, \lparen, \lbrack, \lbrace,
-      \left, \bigl, \Bigl, \biggl, \Biggl, 
-      \lvert, \lceil, \lfloor,
-      sum, prod, deriv, integ, iter, solve,
-      \eval, \nmcEvaluate, \iter, \nmcIterate, \solve, \nmcSolve,
-      \recur, \nmcRecur, \tabulate, \nmcTabulate, \info, \nmcInfo,
-      \constants, \nmcConstants, \reuse, \nmcReuse
-    } 
+  { 
+    \cosh, \sinh, \tanh, \csch, \sech, \coth,
+    (, [, \{, \lparen, \lbrack, \lbrace,
+    \left, \bigl, \Bigl, \biggl, \Biggl, 
+    \lvert, \lceil, \lfloor,
+    sum, prod, deriv, integ, iter, solve,
+    \eval, \nmcEvaluate, \iter, \nmcIterate, \solve, \nmcSolve,
+    \recur, \nmcRecur, \tabulate, \nmcTabulate, \info, \nmcInfo,
+    \constants, \nmcConstants, \macros, \nmcMacros, \reuse, \nmcReuse,
+    <=, =<, >=, =>
+  } 
 \seq_set_from_clist:Nn \l_tmpb_seq
-    { 
-      acosh, asinh, atanh, acsch, asech, acoth,
-      ), ], \}, \rparen, \rbrack, \rbrace,
-      \right, \bigr, \Bigr, \biggr, \Biggr, 
-      \rvert, \rceil, \rfloor,
-      term, factor, bisection, subdivision, iteration, step,
-      eval, eval, iter, iter, solve, solve,
-      recur, recur, table, table, info, info,
-      consts, consts, reuse, reuse
-    }
+  { 
+    acosh, asinh, atanh, acsch, asech, acoth,
+    ), ], \}, \rparen, \rbrack, \rbrace,
+    \right, \bigr, \Bigr, \biggr, \Biggr, 
+    \rvert, \rceil, \rfloor,
+    term, factor, bisection, subdivision, iteration, step,
+    eval, eval, iter, iter, solve, solve,
+    recur, recur, table, table, info, info,
+    consts, consts, macros, macros, reuse, reuse,
+    \leq, \leq, \geq, \geq
+  }
 \__nmc_subst:NNN \g__nmc_subst_misc_prop \l_tmpa_seq \l_tmpb_seq
-
 % base function variants %%%%%%%%%%%%%%%%%%%%%%%%
-\cs_generate_variant:Nn \tl_if_head_eq_meaning:nNTF { V }
-\cs_generate_variant:Nn \tl_if_head_eq_meaning:nNF { V }
 \cs_generate_variant:Nn \tl_if_head_eq_meaning_p:nN { V }
-\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNTF { V }
-\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNT { V }
-\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNF { V }
 \cs_generate_variant:Nn \tl_if_head_is_group:nTF { V }
 \cs_generate_variant:Nn \tl_if_in:NnTF { NV }
 \cs_generate_variant:Nn \tl_if_in:NnT { NV }
 \cs_generate_variant:Nn \tl_if_in:nnTF { nV }
-\cs_generate_variant:Nn \tl_if_eq:nnTF { V }
+\cs_generate_variant:Nn \tl_if_in:nnT { nV }
+\cs_generate_variant:Nn \tl_if_eq:nnTF { V, VV }
 \cs_generate_variant:Nn \tl_if_eq:nnT  { V }
 \cs_generate_variant:Nn \tl_if_eq:nnF  { V }
-\cs_generate_variant:Nn \tl_replace_once:Nnn { Nnx }
+\cs_generate_variant:Nn \tl_replace_once:Nnn { NV, NnV, Nnx }
 \cs_generate_variant:Nn \tl_count_tokens:n { V }
-\cs_generate_variant:Nn \int_compare:nNnTF { v }
-\cs_generate_variant:Nn \int_compare:nNnT { v }
-\cs_generate_variant:Nn \int_case:nnTF { v }
-\cs_generate_variant:Nn \clist_pop:NN { cc }
+\cs_generate_variant:Nn \str_if_eq:nnTF { V }
+\cs_generate_variant:Nn \str_if_in:NnTF { NV }
+\cs_generate_variant:Nn \seq_set_split:Nnn { NV, NVV }
+\cs_generate_variant:Nn \seq_use:Nn { NV }
 \cs_generate_variant:Nn \prop_put_if_new:Nnn { No }
 \cs_generate_variant:Nn \iow_open:Nn { NV }
 \cs_generate_variant:Nn \iow_now:Nn  { NV }
+\cs_generate_variant:Nn \regex_extract_once:NnN { NV }
 \cs_generate_variant:Nn \keys_set_known:nn { x }
 \cs_generate_variant:Nn \file_get:nnN { V }
 \cs_generate_variant:Nn \file_get:nnNT { V }
 \cs_generate_variant:Nn \file_get:nnNTF { V }
+% environments
+\tl_new:N \l__nmc_equals_tl 
+\int_new:N \l__nmc_env_def_int % 0 undefined; 1 provisional; 2 defined
+\prop_new:N \g__nmc_env_prop
+\prop_new:N \g__nmc_envi_prop
+\prop_gput_from_keyval:Nn \g__nmc_env_prop
+  {
+    $           = \__nmc_math_env_sym:nnnnn {$}{}{}{}{$},
+    math        = \__nmc_math_env:nnnn
+                      {math}{}{\mskip 12muplus6muminus9mu(vv)}{\quad},
+    \(          = \__nmc_math_env_sym:nnnnn {\(}{}{}{}{\)},
+    \[          = \__nmc_math_env_sym:nnnnn 
+                      {\[}{}{\mskip 36muminus24mu(vv)}{\]\[}{\]},
+    displaymath = \__nmc_math_env:nnnn {displaymath}{}{}{},
+    equation    = \__nmc_math_env:nnnn {equation}{}{}{},
+    equation*   = \__nmc_math_env:nnnn {equation*}{}{}{},
+    multline    = \mode_if_math:TF 
+                      { \__nmc_math_env:nnnn {multline}{}{}{\hfill\\} }
+                      { \__nmc_math_env:nnnn {multline}{}{\\(vv)}{} },
+    multline*   = \mode_if_math:TF
+                      { \__nmc_math_env:nnnn {multline*}{}{}{\hfill\\} }
+                      { \__nmc_math_env:nnnn {multline*}{}{\\(vv)}{} },
+    eqnarray    = \__nmc_math_env_cum:nnnn {eqnarray}{&=&}
+                      {\mskip 36muminus24mu(vv)}{},
+    eqnarray*   = \__nmc_math_env_cum:nnnn {eqnarray*}{&=&}
+                      {\mskip 36muminus24mu(vv)}{},
+    align       = \__nmc_math_env_cum:nnnn {align}{}{}{},
+    align*      = \__nmc_math_env_cum:nnnn {align*}{}{}{},
+    gather      = \__nmc_math_env_cum:nnnn {gather}{=}
+                      {\mskip 12muplus6muminus9mu(vv)}{},
+    gather*     = \__nmc_math_env_cum:nnnn {gather*}{=}
+                      {\mskip 12muplus6muminus9mu(vv)}{},
+    flalign     = \__nmc_math_env_cum:nnnn {flalign}{}{}{},
+    flalign*    = \__nmc_math_env_cum:nnnn {flalign*}{}{}{},
+    alignat     = \__nmc_math_env_cum:nnnn {alignat}{&=\;&}{\qquad&(vv)}{}
+                      \tl_set:Nn \l__nmc_env_arg_tl {2},
+    alignat*    = \__nmc_math_env_cum:nnnn {alignat*}{&=\;&}{\qquad&(vv)}{} 
+                      \tl_set:Nn \l__nmc_env_arg_tl {2},
+  }
+\prop_gput_from_keyval:Nn \g__nmc_envi_prop
+  {
+    aligned     = \__nmc_math_env_cum:nnnn {aligned}{}{}{},
+    alignedat   = \__nmc_math_env_cum:nnnn {alignedat}{&=\;&}{\qquad&(vv)}{}
+                      \tl_set:Nn \l__nmc_env_arg_tl {2},
+    array       = \__nmc_math_env_cum:nnnn {array}{&=&}{&(vv)}{}
+                      \tl_set:Nn \l__nmc_env_arg_tl {rcrl},
+    gathered    = \__nmc_math_env_cum:nnnn {gathered}{=}
+                      {\mskip 12muplus6muminus9mu(vv)}{},
+    cases       = \__nmc_math_env_cum:nnnn {cases}{=}{\quad\hfill(vv)}{},
+    dcases      = \__nmc_math_env_cum:nnnn {dcases}{=}{\quad\hfill(vv)}{}
+  }
+% #1 env #2 equals #3 vv #4 multisep #5 \) et al or arg
+\cs_new_protected:Npn \__nmc_math_env_sym:nnnnn #1#2#3#4#5
+  { 
+    \__nmc_math_env_delims:nn {#1}{#5}
+    \__nmc_math_env_set:Vnnnn \c__nmc_vv_delim_tl{#1}{=}
+        {\mskip 12muplus6muminus9mu(vv)}{\quad}
+    \tl_if_blank:nF {#2#3#4} 
+      { \__nmc_math_env_aux:Vnnn \c__nmc_vv_delim_tl {#2}{#3}{#4} }
+    \tl_replace_once:NnV  \l__nmc_equals_tl { = } \l__nmc_eq_tl
+  }
+\cs_new_protected:Npn \__nmc_math_env:nnnn #1#2#3#4
+  {
+    \__nmc_math_env_delims:n { #1 }
+    \__nmc_math_env_set:Vnnnn \c__nmc_vv_delim_tl {#1}{=}
+        {\mskip 36muminus24mu(vv)}{\end{#1}\begin{#1}}
+    \tl_if_blank:nF {#2#3#4} 
+      { \__nmc_math_env_aux:Vnnn \c__nmc_vv_delim_tl {#2}{#3}{#4} }
+    \tl_replace_once:NnV  \l__nmc_equals_tl { = } \l__nmc_eq_tl
+  }
+\cs_new_protected:Npn \__nmc_math_env_cum:nnnn #1#2#3#4
+  {
+    \__nmc_math_env_delims:n { #1 }
+    \__nmc_math_env_set:Vnnnn \c__nmc_vv_delim_tl{#1}{&=}
+        {\mskip 36muminus24mu(vv)}{\\}
+    \tl_if_blank:nF {#2#3#4} 
+      { \__nmc_math_env_aux:Vnnn \c__nmc_vv_delim_tl {#2}{#3}{#4} }
+    \tl_replace_once:NnV  \l__nmc_equals_tl { = } \l__nmc_eq_tl
+  }
+\cs_new_protected:Npn \__nmc_math_env_set:nnnnn #1#2#3#4#5
+  { 
+    \tl_clear:N \l__nmc_env_arg_tl
+    \tl_set:Nn \l__nmc_env_tl {#2}
+    \tl_set:Nn \l__nmc_equals_tl {#3}
+    \tl_set:Nn \l__nmc_vv_tl {#1#4}
+    \tl_set:Nn \l__nmc_multi_sep_tl {#5}
+  }
+\cs_generate_variant:Nn \__nmc_math_env_set:nnnnn { V }
+\cs_new_protected:Npn \__nmc_math_env_aux:nnnn #1#2#3#4
+  { 
+    \tl_if_blank:nF { #2 } { \tl_set:Nn \l__nmc_equals_tl {#2} }
+    \tl_if_blank:nF { #3 } { \tl_set:Nn \l__nmc_vv_tl {#1#3} }
+    \tl_if_blank:nF { #4 } { \tl_set:Nn \l__nmc_multi_sep_tl {#4} }
+  }
+\cs_generate_variant:Nn  \__nmc_math_env_aux:nnnn { V }
 % general purpose routines %%%%%%%%%%%%%%%%%%%%%%
-% \tl_new:N \l__nmc_A_tl etc.
+% \tl_new:N \l__nmcA_tl etc.
 \clist_map_inline:nn { A,B,C,L,R } { \tl_new:c { l__nmc_#1_tl } }
 % prune head from A, put in B; record new head of A in C
 \cs_new_protected:Npn \__nmc_next:
-  { \exp_last_unbraced:NV\__nmc_next:w \l__nmc_A_tl\q_stop }
+  { \exp_last_unbraced:NV\__nmc_next:w \l__nmcA_tl\q_stop}
 \cs_new_protected:Npn \__nmc_next:w #1#2#3\q_stop
-  { \__nmc_assign_vals:nnnN {#1} {#2} {#3} \l__nmc_B_tl } 
+  { \__nmc_assign_vals:nnnN {#1} {#2} {#3} \l__nmcB_tl } 
 % get |arg| 
 \cs_new_protected:Npn \__nmc_absval_arg:N #1
-  { \exp_last_unbraced:NV \__nmc_absval_arg:wN \l__nmc_A_tl\q_stop #1 }
+  { \exp_last_unbraced:NV \__nmc_absval_arg:wN \l__nmcA_tl\q_stop #1 }
 \cs_new_protected:Npn \__nmc_absval_arg:wN #1|#2#3\q_stop #4
   { \__nmc_assign_vals:nnnN {#1} {#2} {#3} #4 }
 \cs_new_protected:Npn \__nmc_assign_vals:nnnN #1#2#3#4
   {
     \tl_if_single:nTF { #2 }
-      { \tl_set:Nn \l__nmc_A_tl { #2#3 } }
-      { \tl_set:Nn \l__nmc_A_tl { {#2}#3 } } 
+      { \tl_set:Nn \l__nmcA_tl { #2#3 } }
+      { \tl_set:Nn \l__nmcA_tl { {#2}#3 } } 
     \tl_set:Nn #4 { #1 }
-    \tl_set:Nn \l__nmc_C_tl { #2 }
+    \tl_set:Nn \l__nmcC_tl { #2 }
   }
 \cs_new_protected:Npn \__nmc_parenth:N #1
   { \tl_set:Nx #1 { ( \exp_not:o #1 ) } }  
-\cs_new_protected:Npn \__nmc_accum_fn_parenth:NNn #1#2#3
-  { \tl_put_right:Nx #1 { #3( \exp_not:o #2 ) } }
-% (fpify) #2, append to #1
-\cs_new_protected:Npn \__nmc_accum_fpify_parenth:NN #1#2
-  {
-    \group_begin:
-    \tl_clear:N \l_tmpa_tl
-    \__nmc_fpify:VN #2 \l_tmpa_tl
-    \exp_args:NNNV
-    \group_end:
-        \__nmc_accum_fn_parenth:NNn #1\l_tmpa_tl{}
-  }
- % (fp-ify) next braced arg, append to #1
-\cs_new_protected:Npn \__nmc_fpify_next_braced:N #1
-  { 
-    \__nmc_next:
-    \__nmc_accum_fpify_parenth:NN #1 \l__nmc_B_tl
-  }
+\cs_new_protected:Npn \__nmc_accum_fn_parenth:Nnn #1#2#3
+  { \tl_put_right:Nx #1 { #3( \exp_not:o {#2} ) } }
+\cs_generate_variant:Nn \__nmc_accum_fn_parenth:Nnn { NV }
 % wrap #3 in #2 & #4, & append to #1
 \cs_new_protected:Npn \__nmc_put_right_wrap:NnNn #1#2#3#4
   { \tl_put_right:Nx #1 { #2 \exp_not:o #3 #4 } }
+
 \cs_new_protected:Npn \__nmc_get_arg_L:nN #1#2
   {
     \tl_set:Nn \l__nmc_L_tl { #1 }
@@ -359,15 +505,24 @@
 % #1 ldelim; #2 <-- arg (delims *not* included)
 % #3 rdelim (*must* differ from #1)
 \cs_new_protected:Npn \__nmc_get_arg_LR:NNN #1#2#3
-  { 
-    \int_set:Nn \l_tmpa_int { 1 }
-    \tl_map_inline:Nn \l__nmc_A_tl
+  {
+    \int_set:Nn \l__nmca_int { 1 }
+    \tl_map_inline:Nn \l__nmcA_tl
       {
         \str_case:nn { ##1 }
           { 
-            { #1 } { \int_incr:N \l_tmpa_int }
-            { #3 } { \__nmc_get_arg_LR_rdelim: }
-            { \q_nil } { \__nmc_get_arg_LR_qnil:N #1 }
+            { #1 } { \int_incr:N \l__nmca_int }
+            { #3 } 
+              {
+                \int_decr:N \l__nmca_int
+                \int_if_zero:nT { \l__nmca_int }
+                  {  \__nmc_next: \tl_map_break: }
+              }
+            { \q_nil } 
+              { 
+                \__nmc_error_what:n { Unmatched~\__nmc_verb:n { #1 }\ in }
+                \tl_map_break:
+              }
           }
         \__nmc_next:
         \tl_if_single:nTF { ##1 }
@@ -374,79 +529,24 @@
           { \tl_put_right:Nn #2 { ##1 } }
           { \tl_put_right:Nn #2 { {##1} } }
       }
-      
   }
-\cs_new_protected:Npn \__nmc_get_arg_LR_rdelim:
-  {
-    \int_decr:N \l_tmpa_int
-    \int_if_zero:nT { \l_tmpa_int }
-      {  \__nmc_next: \tl_map_break: }
-  }
-\cs_new_protected:Npn \__nmc_get_arg_LR_qnil:N #1
-  { 
-    \__nmc_error_what:n { Unmatched~\__nmc_verb:n { #1 }{}~in }
-    \tl_map_break: 
-  }
+% number parsing
 % #1 <== multi-char num poss. in sci notation
-% #2 delim: vs fpify: bool
+% #2 delim: vs fpify: boolean
 \cs_new_protected:Npn \__nmc_get_dec:NN #1#2 
-  {         
-    \tl_set:NV #1 \l__nmc_B_tl
-    \__nmc_get_dec_digits:Nn #1 { 1234567890. }
-    \bool_lazy_and:nnT { \l__nmc_sci_num_in_bool } 
-        { \tl_if_eq_p:NN \l__nmc_C_tl \l__nmc_sci_num_in_tl }
-      { \__nmc_get_dec_aux:NN #1#2 }
-  }
-\cs_new_protected:Npn \__nmc_get_dec_aux:NN #1#2
-  { % l3fp uses "e"
-    \__nmc_next:
-    \tl_if_eq:VnTF \l__nmc_C_tl { - }
-      { 
-        \__nmc_next:
-        \__nmc_get_dec_aux:NNn #1#2 { e- }
-      }
-      { \__nmc_get_dec_aux:NNn #1#2 { e } }
-  }
- \cs_new_protected:Npn \__nmc_get_dec_aux:NNn #1#2#3
-  {
-    \tl_if_in:nVTF { 123456789 } \l__nmc_C_tl
-      { 
-        \bool_if:NTF #2
-          { \tl_put_right:NV #1 \l__nmc_sci_num_in_tl }
-          { \tl_put_right:Nn #1 { #3 } }
-        \__nmc_get_dec_digits:Nn #1 { -1234567890 }
-      }
-      { 
-        \tl_set_eq:NN \l__nmc_C_tl \l__nmc_sci_num_in_tl
-        \str_if_in:nnT { #3 } { - } 
-          { \tl_put_left:Nn \l__nmc_A_tl { - } }
-        \tl_put_left:NV \l__nmc_A_tl \l__nmc_sci_num_in_tl
-      }
-  }
-\cs_new_protected:Npn \__nmc_get_dec_digits:Nn #1#2
-  {
-    \tl_map_inline:Nn \l__nmc_A_tl
-      {    
-        \tl_if_in:nnTF { #2 } { ##1 }
-          {
-            \tl_put_right:Nn #1 { ##1 }
-            \__nmc_next:
-          }
-          { \tl_map_break: }
-      }
-  }
-% intify fp (for !, binom, n-th root, sum/prod)
-% #2(e.g. = 0,1,-1) <= #1(tl) <-- int 
-\cs_new_protected:Npn \__nmc_intify:Nn #1#2
   { 
-    \fp_compare:nTF 
-        { { #2 } <= round(#1+0,\l__nmc_intify_round_tl) = round(#1+0) }
-      {  \tl_set:Nx #1 { \fp_eval:n { round(#1+0) } } }
+    \tl_concat:NNN \l__nmcA_tl \l__nmcB_tl \l__nmcA_tl
+    \regex_extract_once:NVN \l__nmc_num_regex \l__nmcA_tl \l_tmpa_seq
+    \seq_pop:NN \l_tmpa_seq #1
+    \bool_if:NF #2
       { 
-        \fp_compare:nNnTF { #2 } = { -inf }
-          { \__nmc_error_what:n { Integer~required~in } }
-          { \__nmc_error_what:n { Integer~$\ge#2$~required~in } }
+        \bool_if:NT \l__nmc_dec_comma_bool
+          { \tl_replace_once:Nnn #1 {,} {.} }
+        \bool_if:NT \l__nmc_sci_num_in_bool
+          { \tl_replace_once:NVn #1 \l__nmc_sci_num_in_tl {e} }
       }
+    \regex_replace_once:NnN \l__nmc_num_regex {} \l__nmcA_tl
+    \tl_set:Nx \l__nmcC_tl { \tl_head:N \l__nmcA_tl }
   }
 % calc fn vals; explicit/implicit eval. of vv-list
 % #1(tl) var; #2(tl) fn; #3(fp) var val; #4(fp) <-- fn val
@@ -497,43 +597,53 @@
     \exp_args:NNNV
     \group_end:
         \tl_set:Nn \l__nmc_fp_exprn_tl \l_tmpa_tl
+    \bool_if:NF \g__nmc_error_bool
+      { 
         \fp_set:Nn #1 { \l__nmc_fp_exprn_tl }
-    \__nmc_error_fpflag:
+        \__nmc_error_fpflag:
+      }
   }
 \cs_generate_variant:Nn \__nmc_fpify_set:Nn { NV, cv }
 
 \cs_new:Npn \__nmc_verb:n #1
-  { \texttt{\string #1} }
+  { \texttt{ \tl_to_str:n { #1 } } }
 \cs_generate_variant:Nn \__nmc_verb:n { V }
 \cs_new:Npn \__nmc_verb:N #1
-  { \texttt{\string #1} }
+  { \texttt{ \tl_to_str:N #1 } }
 \cs_generate_variant:Nn \__nmc_verb:N { c }
-% Error handling %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% numerica errors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\int_new:N \l__nmc_depth_int
 \seq_new:N  \g__nmc_error_where_seq
 \bool_new:N \g__nmc_error_bool
+\msg_new:nnn { numerica } { base } 
+    { numerica~error~in~#1~on~line~\msg_line_number:. }
+\cs_new_protected:Npn \__nmc_error_msg:n #1
+  {
+    \tl_set:Nn \l_tmpa_tl { ??? }
+    \seq_if_empty:NF \g__nmc_error_where_seq
+      { 
+        \seq_gpop:NN \g__nmc_error_where_seq \l_tmpa_tl
+        \textsf{ !!!~#1:~\l_tmpa_tl.~!!! }
+      }
+    \msg_log:nnx { numerica } { base } \l_tmpa_tl
+  }
 \cs_new_protected:Npn \__nmc_error_where:n #1
   { 
-    \seq_gpush:Nn \g__nmc_error_where_seq 
-      { #1
+    \seq_gpush:Nx \g__nmc_error_where_seq 
+      { 
+        #1
         \int_compare:nNnT { \l__nmc_depth_int } > { 1 }
           { ~(\int_eval:n { (\l__nmc_depth_int-1)/2 } ) } 
       }
   }
 \cs_new_protected:Npn \__nmc_error_what:n #1
-  { 
+  {
     \bool_gset_true:N \g__nmc_error_bool
     \tl_gclear:N \g__nmc_reuse_tl
-    \__nmc_error_msg:n { #1 }
+    \int_compare:nNnF \l__nmc_dbg_int < { 0 }
+      { \__nmc_error_msg:n { #1 } }
   }
-\cs_new_protected:Npn \__nmc_error_msg:n #1
-  { 
-    \tl_set:Nn \l_tmpa_tl { ??? }
-    \seq_if_empty:NF \g__nmc_error_where_seq
-      { 
-        \seq_gpop:NN \g__nmc_error_where_seq \l_tmpa_tl
-        \hbox:n { !!!~  #1 :~\l_tmpa_tl.~!!! }
-      }
-  }
+\cs_generate_variant:Nn \__nmc_error_what:n { V, x }
 % l3fp exceptions; ln(1),cos(90),sin(360) underflow ignored!
 %  Invalid op --> LaTeX *error*, hence
 \fp_trap:nn { invalid_operation } { flag }
@@ -548,40 +658,41 @@
   }
 \cs_new_protected:Npn \__nmc_flag:n #1
   { 
-    \__nmc_error_what:n 
-      { 
-        \__nmc_verb:n{l3fp}~error~` \clist_item:nn
-            { Overflow, Division~by~zero, Invalid~operation }{ #1 }'~in
-      }
-  }  
+    \__nmc_error_what:V { \__nmc_verb:n{l3fp}~error~`\clist_item:nn
+        { Overflow, Division~by~zero, Invalid~operation }{ #1 }'~in }
+  } 
 %%%%%%%% multi-tok --> single token vars %%%%%%%%
 % no math delims; #1(seq) vv-list; #2(tl) formula 
 \int_new:N \g__nmc_prep_multitok_int
 \tl_new:N \l_nmc_multitoka_tl
 \tl_new:N \l_nmc_multitokb_tl
+\seq_new:N \l__nmc_multitoka_seq
+\seq_new:N \l__nmc_multitokb_seq
 \cs_new_protected:Npn \__nmc_prep_multitok:NN #1#2
-  { 
-    \seq_clear:N \l_tmpa_seq
+  {
+    \seq_clear:N \l__nmc_multitoka_seq
     \seq_map_inline:Nn #1
       {
-        \seq_set_split:Nnn \l_tmpb_seq { = } { ##1 }
-        \seq_pop:NN \l_tmpb_seq \l_tmpb_tl
+        \seq_set_split:Nnn \l__nmc_multitokb_seq { = } { ##1 }
+        \seq_pop:NN \l__nmc_multitokb_seq \l_tmpb_tl
         \int_compare:nNnT { \tl_count_tokens:V \l_tmpb_tl } > { 1 }
-          { \seq_push:NV \l_tmpa_seq \l_tmpb_tl }
+          { \seq_push:NV \l__nmc_multitoka_seq \l_tmpb_tl }
       }
-    \seq_sort:Nn \l_tmpa_seq 
-      {  % big --> small
+    % big --> small
+    \seq_sort:Nn \l__nmc_multitoka_seq 
+      {  
         \int_compare:nNnTF { \tl_count:n {##2} } > { \tl_count:n { ##1 } }
           { \sort_return_swapped: }
           { \sort_return_same: } 
       }
-    \seq_map_inline:Nn \l_tmpa_seq
-      {  % multitoks => \nmc_a, \nmc_b, etc
+    % multitoks => \nmc_a, \nmc_b, etc
+    \seq_map_inline:Nn \l__nmc_multitoka_seq
+      { 
         \int_gincr:N \g__nmc_prep_multitok_int
         \tl_set:Nn \l_nmc_multitoka_tl { ##1 }
         \tl_set:Nx \l_nmc_multitokb_tl { \cs:w nmc_\int_to_alph:n 
             { \g__nmc_prep_multitok_int } \cs_end: }
-        \tl_set:cn { nmc_\int_to_alph:n { \g__nmc_prep_multitok_int } }
+        \tl_gset:cn { nmc_\int_to_alph:n { \g__nmc_prep_multitok_int } }
             { ##1 }
         \regex_replace_all:nnN 
             { \u{l_nmc_multitoka_tl} } { \u{l_nmc_multitokb_tl} } #1
@@ -590,57 +701,70 @@
       }
   }
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\int_new:N \l__nmc_depth_int
 \tl_new:N \l__nmc_mode_tl
-\tl_new:N \l_nmc_formula_tl
-\fp_new:N \l__nmc_result_fp
-\tl_new:N \l_nmc_result_tl
+\tl_new:N \l__nmc_formula_tl
 \tl_new:N \l__nmc_formula_dup_tl
+\tl_new:N \l__nmc_env_tl
+\tl_new:N \l__nmc_result_tl
+\tl_new:N \l__nmc_show_tl
+\tl_new:N \l__nmc_display_tl
 \tl_new:N \l__nmc_fp_expr_tl      
 \tl_new:N \l__nmc_fp_exprn_tl
-\bool_new:N \l__nmc_dbg_count_bool
+\tl_new:N \l__nmc_eq_var_tl
+\tl_new:N \l__nmc_eq_val_tl
+\tl_new:N \l__nmc_vv_fp_expr_tl
+\tl_new:N \l__nmc_vv_tl
+\tl_new:N \l__nmc_vvv_tl
+\tl_new:N \l__nmc_punc_tl 
+\tl_new:N \l__nmc_math_delimi_tl
+\tl_new:N \l__nmc_math_delimii_tl
+\tl_new:N \l__nmc_outer_delimi_tl
+\tl_new:N \l__nmc_outer_delimii_tl
+\tl_new:N \l__nmc_env_arg_tl
 \tl_new:N \l__nmc_dbg_vv_tl
+\tl_new:N \l__nmc_dbg_idiii_tl
 \tl_new:N \l__nmc_dbg_idii_tl
-\tl_new:N \l__nmc_dbg_idiii_tl
 \tl_new:N \l__nmc_dbg_idv_tl
-\seq_new:N \l__nmc_dbg_stored_seq
-\int_new:N \l__nmc_round_int
+\tl_new:N  \l__nmc_bool_F_tl
+\tl_new:N  \l__nmc_bool_T_tl
 \int_new:N \l__nmc_sci_expon_int
 \int_new:N \l__nmc_num_alt_int
-\tl_new:N  \l__nmc_bool_F_tl
-\tl_new:N  \l__nmc_bool_T_tl
+\int_new:N \l__nmc_multi_int
+\seq_new:N \l__nmc_vv_visible_seq
+\seq_new:N \l__nmc_vv_no_consts_seq
+\seq_new:N \l__nmc_vv_all_seq
+\seq_new:N \l__nmc_calc_fn_seq
+\seq_new:N \l__nmc_dbg_stored_seq
+\seq_new:N \l__nmc_vva_seq
+\seq_new:N \l__nmc_vvb_seq
 \bool_new:N \l__nmc_TF_out_bool
 \bool_new:N \l__nmc_allow_TF_out_bool
 \bool_new:N \l__nmc_sci_num_x_bool
 \bool_new:N \l__nmc_sci_num_table_bool
+\bool_new:N \l__nmc_num_only_bool
+\bool_new:N \l__nmc_round_bool
+\bool_new:N \l__nmc_see_formula_bool
+\bool_new:N \l__nmc_see_vv_bool
 \bool_new:N \l__nmc_vv_val_only_bool
-\bool_new:N \l__nmc_vv_invisible_bool
-\clist_new:N \l__nmc_vv_clist
-\seq_new:N \l__nmc_vv_visible_seq
-\seq_new:N \l__nmc_vv_no_consts_seq
-\seq_new:N \l__nmc_vv_all_seq
-\seq_new:N \l__nmc_calc_fn_seq
+\bool_new:N \l__nmc_dbg_count_bool
 \prop_new:N \l__nmc_vv_change_prop
-\tl_new:N \l__nmc_eq_var_tl
-\tl_new:N \l__nmc_eq_val_tl
-\tl_new:N \l__nmc_vv_fp_expr_tl
-\tl_new:N \l__nmc_punc_tl 
-\tl_new:N \l__nmc_math_delimi_tl
-\tl_new:N \l__nmc_math_delimii_tl
-\bool_new:N \l__nmc_wraps_math_bool
 % ##1 = number-only switch, ##2 = keyval settings,
 % ##3 = formula, ##4 = vv-list, ##5 = number-format spec.,
 % #1 = \nmcCommand, #2 = cmd id, #3 = short-name cmd
 \cs_new_protected:Npn \nmc_define:NnN  #1#2#3
-  { 
+  {
     \NewDocumentCommand #1 { s O{} m O{} O{} }
-      {
+      { 
         \group_begin:
-        \__nmc_initialize:Nn ##1 { #2 }
-
-        \__nmc_inputs_get:nnnnn { #2 } { ##2 } { ##3 } {##4 } {##5 }
-
+        \bool_set_eq:NN \l__nmc_num_only_bool ##1
+        \__nmc_initialize:n { #2 }
         \bool_if:NF \g__nmc_error_bool
+          { \__nmc_settings:nn { #2 } { ##2 } }
+        \bool_if:NF \g__nmc_error_bool
+          { \__nmc_formula:nn { #2 } { ##3 } }
+        \bool_if:NF \g__nmc_error_bool
+          { \__nmc_trailing_args:nnn { #2 } { ##4 } { ##5 } }
+        \bool_if:NF \g__nmc_error_bool
           { \use:c { __nmc_#2_process: } }
         \int_if_zero:nTF { \l__nmc_dbg_int } 
           { 
@@ -647,33 +771,37 @@
             \bool_if:NF \g__nmc_error_bool
               { \use:c { __nmc_#2_display: } }
           }
-          { \__nmc_dbg_display:nn { \l__nmc_dbg_int } { #2 } } 
+          { \__nmc_dbg_display:nn { \l__nmc_dbg_int } { #2 } }
         \group_end:
       }
     \ProvideDocumentCommand #3 {} { #1 }
-    \cs_new_protected:cpn { __nmc_#2_vv_digest:N } ##1 
-        { }
-    \clist_map_inline:nn { initialize, settings_digest, process, display }
-      { \cs_new_protected:cpn { __nmc_#2_##1: } { \prg_do_nothing: } }
+
+    \cs_new_protected:cpn { __nmc_#2_vv_digest:N } ##1 {}
+    \clist_map_inline:nn { initialize, formula, settings, process, display }
+       { \cs_new_protected:cpn { __nmc_#2_##1: } {} }
   } 
 \nmc_define:NnN \nmcEvaluate { eval } \eval
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cs_new_protected:Npn \__nmc_initialize:Nn #1#2
-  {
+
+% initialize
+\cs_new_protected:Npn \__nmc_initialize:n #1
+  { 
     \bool_gset_false:N \g__nmc_error_bool
-    \bool_set_eq:NN \l__nmc_num_only_bool #1
     \bool_set_false:N \l__nmc_sci_num_out_bool
     \bool_set_false:N \l__nmc_sci_num_x_bool
     \bool_set_false:N \l__nmc_sci_num_table_bool
+    \bool_set_false:N \l__nmc_round_bool
+    \tl_set:Nn \l__nmc_dbg_idiii_tl { vv-list }
+    \int_zero:N \l__nmc_multi_int
+%
     \int_incr:N \l__nmc_depth_int 
     \int_compare:nNnT \l__nmc_depth_int > { 1 } % for nesting
       { \bool_set_true:N \l__nmc_num_only_bool }
     \prop_concat:NNN \l__nmc_subst_var_prop 
         \g__nmc_subst_var_prop \l__nmc_subst_var_prop
-    \tl_set:Nn \l__nmc_dbg_idii_tl { vv-list }
-    \use:c { __nmc_#2_initialize: }
+    \use:c { __nmc_#1_initialize: }
   }
-\cs_new_protected:Npn \__nmc_inputs_get:nnnnn #1#2#3#4#5
+% #1 id, #2 settings
+\cs_new_protected:Npn \__nmc_settings:nn #1#2
   { 
     \__nmc_error_where:n { settings }
     \tl_if_empty:nF { #2 } 
@@ -680,38 +808,50 @@
       { 
         \keys_set_known:nn { numerica/generic } { #2 } 
         \keys_set_known:xn { numerica/#1 }{ #2 }
-      }
-    \use:c { __nmc_#1_settings_digest: }
+      } 
+
+    \tl_if_empty:NT \l__nmc_multi_delim_tl
+      { \tl_set_eq:NN \l__nmc_multi_delim_tl \c__nmc_vv_delim_tl }
+    \use:c { __nmc_#1_settings: }
+    \int_compare:nNnT \l__nmc_depth_int > { 1 } % for nesting
+      { \int_zero:N \l__nmc_dbg_int }
     \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
-    \bool_if:NF \g__nmc_error_bool
+  }
+\cs_new_protected:Npn \__nmc_formula:nn #1#2
+  { 
+    \__nmc_error_where:n { formula }
+    \tl_set:Nn \l__nmc_formula_tl { #2 }
+    \tl_trim_spaces:N \l__nmc_formula_tl
+    \use:c { __nmc_#1_formula: } 
+  }
+% #2=vv, #3=number format
+\cs_new_protected:Npn \__nmc_trailing_args:nnn #1#2#3
+  {
+    \__nmc_error_where:n { variable=value~list }
+    \tl_if_in:nnTF { #2 } { = }% vv-list
       { 
-        \mode_if_math:TF 
-          { \tl_set:Nn \l_nmc_formula_tl { #3 } }
-          { \__nmc_math_delims:n { #3 } } 
-        \tl_set_eq:NN \l__nmc_formula_dup_tl \l_nmc_formula_tl 
+        \__nmc_vv_extract_visible:nN { #2 } \l__nmc_vva_seq
+        \use:c { __nmc_#1_vv_digest:N } \l__nmc_vva_seq
+        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
+        \__nmc_get_num_format:n { #3 } 
+        \tl_if_blank:nF { #3 }
+          { \bool_set_true:N \l__nmc_round_bool }
       }
-    \bool_if:NF \g__nmc_error_bool
-      {  
-        \tl_if_in:nnTF { #4 } { = }% vv-list
-          { 
-            \__nmc_get_num_format:n { #5 } 
-            \__nmc_error_where:n { variable\,=\,value~list }
-            \__nmc_vv_extract_visible:nN { #4 } \l__nmc_vv_clist
-            \use:c { __nmc_#1_vv_digest:N } \l__nmc_vv_clist
-          }
-          { % empty vv-list
-            \__nmc_get_num_format:n { #4#5 }
-            \use:c { __nmc_#1_vv_digest:N } \c_empty_clist
-            \tl_clear:N \l__nmc_vv_inline_tl
-            \tl_clear:N \l__nmc_vv_display_tl
-            \bool_set_true:N \l__nmc_vv_invisible_bool
-          }
-        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl  
+      { % empty vv-list
+        \use:c { __nmc_#1_vv_digest:N } \c_empty_seq
+        \bool_set_false:N \l__nmc_see_vv_bool
+        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
+        \__nmc_get_num_format:n { #2#3 }
+        \tl_if_blank:nF { #2#3 }
+          { \bool_set_true:N \l__nmc_round_bool }
       }
   }
-%%%%%%%%%%%%%%%%% debug routines %%%%%%%%%%%%%%%%
+%%%%%%%%%% debug %%%%%%%%%%
 \cs_new_protected:Npn \__nmc_dbg_display:nn #1#2
-  { \__nmc_dbg_display:xnn { \mode_if_math:TF { ed }{ * } } { #1 } { #2 } }
+  { 
+    \__nmc_dbg_display:xnn { \mode_if_math:TF { ed }{ * } } { #1 } { #2 } 
+    \tl_clear:N \l__nmc_show_tl
+  }
 \cs_new_protected:Npn \__nmc_dbg_display:nnn #1#2#3
   { % #2 dbg int, #3 fn id
     \seq_reverse:N \l__nmc_vv_all_seq
@@ -718,9 +858,9 @@
     \raggedright 
     \begin{ align#1 }
       \__nmc_if_mod_zero:nnT { #2 } { 2 }
-        { \__nmc_dbg:Nnn \l__nmc_dbg_vv_tl { #2 } \l__nmc_dbg_idii_tl } 
+        { \__nmc_dbg:Nnn \l__nmc_formula_tl { #2 } \l__nmc_dbg_idii_tl }
       \__nmc_if_mod_zero:nnT { #2 } { 3 }
-        { \__nmc_dbg:Nnn \l_nmc_formula_tl { #2 } \l__nmc_dbg_idiii_tl }
+        { \__nmc_dbg:Nnn \l__nmc_dbg_vv_tl { #2 } \l__nmc_dbg_idiii_tl } 
       \__nmc_if_mod_zero:nnT { #2 } { 5 }
         {
           \__nmc_dbg_stored:
@@ -727,12 +867,9 @@
           \__nmc_dbg:Nnn \l_tmpa_tl { #2 } \l__nmc_dbg_idv_tl 
         }
       \__nmc_if_mod_zero:nnT { #2 } { 7 }
-        {
-          \__nmc_dbg:Nnn \l__nmc_fp_expr_tl { #2 } { fp-form }
-          \bool_if:nT { !\g__nmc_error_bool 
-                        && !\str_if_eq_p:nn { #3 } { table } }
-            { \\ \text{result:} & \quad \text{\l_nmc_result_tl } }
-        }
+        { \__nmc_dbg:Nnn \l__nmc_fp_expr_tl { #2 } { fp-form } }
+      \__nmc_if_mod_zero:nnT { #2 } { 11 }
+        {\__nmc_dbg:Nnn \l__nmc_show_tl { #2 } { LaTeX } }
     \end{ align#1 }
     \bool_set_false:N \l__nmc_dbg_count_bool
   }
@@ -780,87 +917,36 @@
   { 
     \bool_if:NT \l__nmc_dbg_count_bool { \\ }
     \hbox:n { #3:} & \quad 
-    \int_compare:nNnTF { #2 } > { 0 }
-      { \vbox_top:n } { \hbox:n } { \tl_to_str:N #1 } 
+    \int_compare:nNnTF \l__nmc_depth_int > { 1 }
+      { \hbox:n } { \vbox_top:n } { \tl_to_str:N #1 }
     \bool_set_true:N \l__nmc_dbg_count_bool
   }
 \cs_generate_variant:Nn \__nmc_dbg_display:nnnn { V, x }
-%%%%%%%%%%%%%% formula, delimiters %%%%%%%%%%%%%%
-\cs_new_protected:Npn \__nmc_math_delims:n #1
-  { % #1 formula 
-    \tl_set:Nn \l_nmc_formula_tl { #1 }
-    \tl_trim_spaces:N \l_nmc_formula_tl
-    \bool_set_true:N \l__nmc_wraps_math_bool
-    % $ ?
-    \tl_if_head_eq_meaning:VNTF \l_nmc_formula_tl $
-      { \__nmc_math_delims_aux:n { 1 } }
-      {
-        \tl_if_head_eq_meaning:VNTF \l_nmc_formula_tl \(
-          { \__nmc_math_delims_aux:n { 1 } }
-            { % \[ ?
-              \tl_if_head_eq_meaning:VNTF \l_nmc_formula_tl \[
-                { \__nmc_math_delims_aux:n { 1 } }
-                { %\begin{environ} ?
-                  \tl_if_head_eq_meaning:VNTF \l_nmc_formula_tl \begin
-                    { \__nmc_math_delims_aux:n { 2 } }
-                    { 
-                      \__nmc_math_delims_aux:nn { \[ } { \] } 
-                      \bool_set_false:N \l__nmc_wraps_math_bool
-                    }
-                }
-            }
-      }
-    \tl_trim_spaces:N \l_nmc_formula_tl
-    \bool_if:NTF \l__nmc_num_only_bool
-      { \__nmc_math_delims_aux:nn {}{} }
-      { 
-        \bool_if:NT \l__nmc_vv_multline_bool
-          { \__nmc_math_delims_mliner:V \l__nmc_eqn_num_tl }
-      }
-  }
-\cs_new:Npn \__nmc_math_delims_mliner:n #1
-  {
-    \bool_if:nT { \l__nmc_wraps_math_bool || !\mode_if_math_p: }
-      { 
-        \tl_set:Nn \l__nmc_math_delimi_tl { \begin{multline#1} }
-        \tl_set:Nn \l__nmc_math_delimii_tl { \end{multline#1} }
-      }
-  }
-\cs_generate_variant:Nn \__nmc_math_delims_mliner:n { V }
-\cs_new_protected:Npn \__nmc_math_delims_aux:n #1
-  {
-    \__nmc_math_delims_aux:xx
-        { \tl_range:Nnn \l_nmc_formula_tl { 1 } { #1 } }
-        { \tl_range:Nnn \l_nmc_formula_tl { -#1 } { -1 } } 
-    \int_set:Nn \l_tmpa_int { #1 + 1 }
-    \tl_set:Nx \l_nmc_formula_tl 
-        { \tl_range:Nnn \l_nmc_formula_tl { \l_tmpa_int } { -\l_tmpa_int } }
-  }
-\cs_new_protected:Npn \__nmc_math_delims_aux:nn #1#2
-  {
-    \tl_set:Nn \l__nmc_math_delimi_tl { #1 }
-    \tl_set:Nn \l__nmc_math_delimii_tl { #2 }
-  }
-\cs_generate_variant:Nn \__nmc_math_delims_aux:nn { xx }
-
 %%%%%%%%%% number-formatting routines %%%%%%%%%%%
+\int_zero_new:N \l__nmc_frac_out_int
+\bool_new:N \l__nmc_pad_zeros_bool
+\bool_new:N \l__nmc_sci_num_out_bool
 \cs_new_protected:Npn \__nmc_get_num_format:n #1
   {
-    \__nmc_error_where:n { result~format~spec. }
+    \__nmc_error_where:n { result~format~spec }
+    \tl_clear:N \l_tmpa_tl
     \str_set:Nn \l_tmpa_str { #1 }
-    \tl_clear:N \l_tmpa_tl
     \int_zero:N \l__nmc_num_alt_int
-    \str_if_in:NnTF \l_tmpa_str { ? }
+    \str_if_in:nnTF { #1 } { ? } 
       { \__nmc_num_bool_spec: }
-      {
-        \str_if_in:NnT \l_tmpa_str { * }
+      { 
+        \str_if_in:nnTF { #1 } { / } 
+          { \__nmc_num_frac_spec: }
           { 
-            \bool_set_true:N \l__nmc_pad_zeros_bool 
-            \str_remove_all:Nn \l_tmpa_str { * }
+            \str_if_in:nnT { #1 } { * } 
+              { 
+                \bool_set_true:N \l__nmc_pad_zeros_bool 
+                \str_remove_all:Nn \l_tmpa_str { * }
+              }
           }
       }
     \str_map_inline:Nn \l_tmpa_str
-      {
+      { 
         \str_if_in:nnTF { 1234567890- } { ##1 }
           { \tl_put_right:Nn \l_tmpa_tl { ##1 } }
           { \__nmc_num_sci_spec:n { ##1 } }
@@ -890,6 +976,25 @@
     \bool_if:NT \l__nmc_num_only_bool 
       { \int_set:Nn \l__nmc_num_alt_int { 1 }  }
   }
+\cs_new_protected:Npn \__nmc_num_frac_spec:
+  {
+    \int_incr:N \l__nmc_frac_out_int % 1
+    \str_remove_once:Nn \l_tmpa_str { / }
+    \str_if_in:NnTF \l_tmpa_str { / }
+      {
+        \int_incr:N \l__nmc_frac_out_int % 2
+        \str_if_in:NnTF \l_tmpa_str { t }
+          { \int_incr:N \l__nmc_frac_out_int } % 3
+          {
+            \str_if_in:NnT \l_tmpa_str { d }
+              { \int_set:Nn \l__nmc_frac_out_int { 4 } }
+          }
+      }
+      { 
+        \str_if_in:NnT \l_tmpa_str { s }
+          { \int_set:Nn \l__nmc_frac_out_int { 5 } }
+      }
+  }
 \cs_new_protected:Npn \__nmc_num_sci_spec:n #1
   {
     \str_case:nn { #1 }
@@ -911,26 +1016,86 @@
     \int_zero:N \l__nmc_num_alt_int
   }
 %%%%%%%%%%
-% #1=fpify-ed in; #2=tl fmt'ed out; #3=int rnd; #4 sci bool
+% #1=fpify-ed in; #2=tl fmt'ed out; #3=int rndg; #4 sci bool
 \cs_new_protected:Npn \__nmc_num_format:nNnN #1#2#3#4
   { 
     \bool_if:NTF \l__nmc_TF_out_bool
       { \__nmc_num_bool_out:nNn { #1 } #2 { \l__nmc_num_alt_int } }
       { 
-        \bool_if:NTF #4
-          { 
-            \exp_last_unbraced:Nx \__nmc_sci_output_aux:wNn 
-                { \fp_to_scientific:n { #1 } } \q_stop #2 { #3 }
+        \int_if_zero:nTF \l__nmc_frac_out_int
+          {
+            \bool_if:NTF #4
+              { 
+                \exp_last_unbraced:Nx \__nmc_sci_output_aux:wNn 
+                    { \fp_to_scientific:n { #1 } } \q_stop #2 { #3 }
+              }
+              { \__nmc_num_format_decimal:nNn { #1 } #2 { #3 } }
+            \bool_if:NT \l__nmc_dec_comma_bool
+              { \tl_replace_once:Nnn #2 {.} {,} }
           }
-          { \__nmc_num_format_decimal:nNn { #1 } #2 { #3 } }
+          { \__nmc_num_frac_out:nNn { #1 } #2 { #3 }}
       }
   }
 \cs_new_protected:Npn \__nmc_num_bool_out:nNn #1#2#3
-  {
-    \fp_compare:nNnTF { 0 } = { #1 }
+  { 
+    \fp_compare:nNnTF { 0 } = { round(#1, \l__nmc_round_int) }
       { \tl_set:Nx #2 { \clist_item:nn {0,F,\texttt{F}} { #3 } } }
-      { \tl_set:Nx #2 { \clist_item:nn {1,T,\texttt{T}} { #3 } } } 
+      { \tl_set:Nx #2 { \clist_item:nn {1,T,\texttt{T}} { #3 } } }
   }
+\cs_new_protected:Npn \__nmc_num_frac_out:nNn #1#2#3
+  { 
+    \group_begin:
+    \int_set:Nn \l_tmpa_int { \l__nmc_frac_denom_min_int - 1 }
+    \fp_set:Nn \l_tmpc_fp { #1 }
+    \fp_set_eq:NN \l_tmpb_fp \c_one_fp
+    \fp_set:Nn \l_tmpa_fp { \l_tmpc_fp * \l_tmpa_int } 
+    \fp_do_until:nNnn { 0 } = { \l_tmpb_fp }
+      {
+        \int_incr:N \l_tmpa_int 
+        \int_compare:nNnTF { \l_tmpa_int } > { \l__nmc_frac_denom_max_int }
+          { 
+            \__nmc_error_what:n { No~result~to~\int_use:N \l__nmc_round_int\ 
+            zeros~with~$ \int_use:N \l__nmc_frac_denom_min_int \le 
+            \texttt{denom} \le \int_use:N \l__nmc_frac_denom_max_int $~in }
+            \fp_zero:N \l_tmpb_fp
+          }
+          { 
+            \fp_add:Nn \l_tmpa_fp { \l_tmpc_fp } 
+            \fp_set:Nn \l_tmpb_fp { round( ( \l_tmpa_fp - 
+                round( \l_tmpa_fp, 0 ) ) / \l_tmpa_int, #3 ) }
+          }
+      }
+    \bool_if:NF \g__nmc_error_bool
+      { 
+        \__nmc_num_frac_out_aux:xxNNN { \fp_to_int:n {abs(\l_tmpa_fp)} } 
+            { \int_use:N \l_tmpa_int } \l__nmca_tl
+                \l__nmc_frac_out_int \l_tmpa_fp
+            
+      }
+    \exp_args:NNNV
+    \group_end:
+      \tl_set:Nn #2 { \l__nmca_tl }
+  }
+\cs_new_protected:Npn  \__nmc_num_frac_out_aux:nnNNN #1#2#3#4#5
+  { 
+    \int_case:nn { #4 }
+      {
+        { 1 } { \tl_set:Nn #3 { #1 / #2 } }
+        { 2 } { \tl_set:Nn #3 { \frac { #1 } { #2 } } }
+        { 3 } { \tl_set:Nn #3 { \tfrac { #1 } { #2 } } }
+        { 4 } { \tl_set:Nn #3 { \dfrac { #1 } { #2 } } }
+        { 5 }
+          { 
+            \cs_if_exist:NTF \sfrac
+              { \tl_set:Nn #3 { \sfrac { #1 } { #2 } } }
+              { \tl_set:Nn #3 { \scriptstyle #1 / #2 } }
+          }
+      }
+    \fp_compare:nNnT { #5 } < { 0 } 
+      { \tl_put_left:Nn #3 {-} }
+  }
+\cs_generate_variant:Nn \__nmc_num_frac_out_aux:nnNNN { xx }
+
 \cs_new_protected:Npn \__nmc_num_format_decimal:nNn #1#2#3
   {
     \tl_set:Nx #2 { \fp_eval:n { 0 + round( #1, #3 ) } }
@@ -938,9 +1103,8 @@
     \bool_if:NF \g__nmc_error_bool
       {
         \int_set:Nn \l__nmc_num_sgn_int { \fp_sign:n { #2 } }
-        \bool_lazy_and:nnT { \l__nmc_pad_zeros_bool } 
-            { \int_compare_p:nNn { #3 } > { 0 } } 
-          { \__nmc_num_pad:Nn #2 { #3 } }
+        \bool_lazy_and:nnT { \int_compare_p:nNn { #3 } > { 0 } } 
+            { \l__nmc_pad_zeros_bool } { \__nmc_num_pad:Nn #2 { #3 } }
       }
   }
 \cs_new_protected:Npn \__nmc_num_pad:Nn #1#2
@@ -991,7 +1155,7 @@
       {
         \bool_if:NTF \l__nmc_sci_num_x_bool
           { \exp_not:N \times 10^{#1} } 
-          { \hbox:n { \l__nmc_sci_num_out_tl {#1} } }
+          { \text{ \l__nmc_sci_num_out_tl {#1} } }
       }
   }
 \cs_new:Npn \__nmc_sci_num_table:n #1
@@ -1000,50 +1164,31 @@
 \cs_new_protected:Npn \__nmc_vv_extract_visible:nN #1#2
   { % #2 reverses #1
     \seq_clear:N \l__nmc_vv_visible_seq
-    \clist_set:Nn \l_tmpa_clist { #1 } 
-    \mode_if_math:F
-      {
-        \__nmc_vv_remove_delims:N \l_tmpa_clist
-        \tl_trim_spaces:N \l_tmpa_clist
-      }
-    \clist_clear:N #2 
-    \clist_map_inline:Nn \l_tmpa_clist % to remove { }
+    \seq_set_split:NVn \l__nmc_vvb_seq \c__nmc_vv_delim_tl { #1 } 
+    \seq_remove_all:Nn \l__nmc_vvb_seq {}
+    \seq_clear:N #2 
+    \seq_map_inline:Nn  \l__nmc_vvb_seq % remove { } from {var}
       { 
         \tl_if_head_is_group:nTF { ##1 }
-          { \clist_put_left:Nx #2 { \tl_head:n { ##1 } \tl_tail:n { ##1 } } }
+          { \seq_put_left:Nx #2 { \tl_head:n { ##1 } \tl_tail:n { ##1 } } }
           { 
             \seq_put_right:Nn \l__nmc_vv_visible_seq { ##1 } 
-            \clist_put_left:Nn #2 { ##1 }
+            \seq_put_left:Nn #2 { ##1 }
           }
       }
-    \__nmc_vv_subst_style:
-  }
-\cs_new_protected:Npn \__nmc_vv_remove_delims:N #1 
-  {
-    \exp_args:Nx\str_case:nn { \tl_head:N #1 }
-      {
-        { $ } { \tl_remove_all:Nn #1 { $ } }
-        { \( } { \tl_map_inline:nn {\(\)} { \tl_remove_once:Nn #1 { ##1 } } }
-        { \[ } { \tl_map_inline:nn {\[\]} { \tl_remove_once:Nn #1 { ##1 } } }
-      }
-  }
-\cs_new_protected:Npn \__nmc_vv_subst_style:
-  {
-    \seq_if_empty:NTF \l__nmc_vv_visible_seq
-      { \bool_set_true:N \l__nmc_vv_invisible_bool }
+    \seq_if_empty:NTF \l__nmc_vv_visible_seq 
+      { \bool_set_false:N \l__nmc_see_vv_bool }
       { 
-        \tl_map_inline:nn { \l__nmc_vv_inline_tl \l__nmc_vv_display_tl }
-            { \tl_replace_once:Nnx ##1 { vv } 
-                { \seq_use:Nn \l__nmc_vv_visible_seq { , } } }
+        \tl_replace_once:Nnx \l__nmc_vv_tl { vv } 
+            { \seq_use:NV \l__nmc_vv_visible_seq \c__nmc_vv_delim_tl }
       }
   }
+% #1 is reversed vv seq
 \cs_new_protected:Npn \__nmc_vv_digest:N #1
   { 
-    \seq_set_from_clist:NN \l__nmc_vv_all_seq #1
-    \seq_concat:NNN \l__nmc_vv_all_seq 
-        \g__nmc_consts_vv_seq \l__nmc_vv_all_seq 
+    \seq_concat:NNN \l__nmc_vv_all_seq \g__nmc_consts_vv_seq #1
     \bool_if:NT \l__nmc_multitok_bool
-      { \__nmc_prep_multitok:NN \l__nmc_vv_all_seq \l_nmc_formula_tl }
+      { \__nmc_prep_multitok:NN \l__nmc_vv_all_seq \l__nmc_formula_tl }
     \__nmc_vv_get_vars_vals:NN \l__nmc_vv_all_seq \c_empty_prop
   } 
 % #1(seq) vv-list;#2(prop) changed vars (implicit-mode)
@@ -1066,7 +1211,7 @@
     \bool_if:NF \g__nmc_error_bool
       { \__nmc_vv_record:NVN \l__nmc_eq_var_tl \l__nmc_eq_val_tl #2 }
   }
-% changed `var=vals in prop #3
+% changed var=vals in prop #3
 \cs_new_protected:Npn \__nmc_vv_record:NnN #1#2#3
   { 
     \prop_get:NVNF #3 #1 \l__nmc_vv_fp_expr_tl
@@ -1101,7 +1246,8 @@
       { 
         \__nmc_split_eq:w #1\q_stop 
         \tl_if_empty:NT \l__nmc_eq_val_tl
-          { \__nmc_error_what:n { No~value~for~$\l__nmc_eq_var_tl$~in } }
+          { \__nmc_error_what:n 
+              { No~value~for~\__nmc_verb:N\l__nmc_eq_var_tl\ in } }
       }
       {
         \bool_set_true:N \l__nmc_vv_val_only_bool
@@ -1115,65 +1261,341 @@
     \tl_trim_spaces:N \l__nmc_eq_var_tl
     \tl_set:Nn \l__nmc_eq_val_tl { #2 }
   }
-% eval-specific routines %%%%%%%%%%%%%%%%%%%%%%%%
-\cs_gset_protected:Npn \__nmc_eval_initialize:
-  {
-    \tl_set:Nn \l__nmc_dbg_idiii_tl { formula }
+%%%%%%%%%%%% eval-specific routines %%%%%%%%%%%%%
+\cs_set_protected:Npn \__nmc_eval_initialize:
+  { 
+    \tl_set:Nn \l__nmc_dbg_idii_tl { formula }
     \tl_set:Nn \l__nmc_dbg_idv_tl { stored }
+    \tl_clear:N \l__nmc_show_tl
+    \__nmc_env_initialize:
   }
-\cs_gset_protected:Npn \__nmc_eval_settings_digest: 
-  { \bool_set_true:N \l__nmc_allow_TF_out_bool }
-
-\cs_gset_eq:NN \__nmc_eval_vv_digest:N \__nmc_vv_digest:N
-
-\cs_gset_protected:Npn \__nmc_eval_process:
+\cs_new_protected:Npn \__nmc_env_initialize:
+  {
+    \int_zero:N \l__nmc_env_def_int
+    \bool_set_true:N \l__nmc_allow_TF_out_bool
+    \bool_if:NTF \l__nmc_num_only_bool
+      { 
+        \bool_set_false:N \l__nmc_see_formula_bool
+        \bool_set_false:N \l__nmc_see_vv_bool
+        \__nmc_math_env_delims:nn {}{}
+        \tl_clear:N \l__nmc_env_arg_tl
+        \tl_set:Nn \l__nmc_multi_sep_tl { ~ }
+        \int_set:Nn \l__nmc_env_def_int { 2 }
+      }
+      {
+        \mode_if_math:T
+          {
+            \int_incr:N \l__nmc_env_def_int
+            \prop_get:NVNT \g__nmc_envi_prop \@currenvir \l_tmpb_tl
+              { 
+                \__nmc_env_params_def:Nnn \l_tmpb_tl { 0 } { 1 }
+                \__nmc_math_env_delims:nn {}{}
+                \tl_clear:N \l__nmc_env_arg_tl
+                \int_incr:N \l__nmc_env_def_int
+              }
+           }
+       }
+  }
+\cs_set_protected:Npn \__nmc_eval_settings: 
+  { \__nmc_env_settings: }
+\cs_set_protected:Npn \__nmc_env_settings: 
   { 
+    \int_if_zero:nTF \l__nmc_env_def_int % math mode F/T
+      { \exp_args:NV \__nmc_env_s_zero:n \l__nmc_env_s_tl }
+      { \exp_args:NV  \__nmc_env_s_one:n \l__nmc_env_s_tl }
+  }
+\cs_new_protected:Npn \__nmc_env_s_zero:n #1
+  {
+    \prop_get:NnNTF \g__nmc_envi_prop { #1 } \l_tmpb_tl
+      { 
+        \__nmc_error_what:n { Math~mode~needed~for~\__nmc_verb:n {#1}\ 
+            environment~in } 
+      }
+      {
+        \prop_if_in:NnT \g__nmc_env_prop { #1 }
+          { 
+            \__nmc_env_delims_outer:n { #1 }
+            \int_incr:N \l__nmc_env_def_int
+          }
+      }
+  }
+\cs_new_protected:Npn \__nmc_env_s_one:n #1
+  {
+    \int_compare:nNnT { \l__nmc_env_def_int } = { 1 }
+      { 
+        \prop_get:NnNT \g__nmc_envi_prop { #1 } \l_tmpb_tl
+          { 
+            \__nmc_env_params_def:Nnn \l_tmpb_tl { 1 } { 1 }
+            \int_incr:N \l__nmc_env_def_int
+          }
+      }
+  }
+\cs_set_protected:Npn \__nmc_eval_formula: 
+  { \__nmc_env_formula: }
+\cs_new_protected:Npn \__nmc_env_formula:
+  {
+    \__nmc_env_extract_formula:x { \tl_head:N \l__nmc_formula_tl }
+    \int_if_zero:nTF \l__nmc_env_def_int % m mode F, no or invalid env
+      { \exp_args:NVV \__nmc_env_f_zero:nn \l__nmc_env_s_tl \l__nmc_env_f_tl }
+      { 
+        \int_compare:nNnT { \l__nmc_env_def_int } = { 1 }
+          { \exp_args:NVV \__nmc_env_f_one:nn 
+              \l__nmc_env_s_tl \l__nmc_env_f_tl } % mmode T or set env
+      }
+    \__nmc_env_params_set:oooN \l__nmc_s_equals_tl \l__nmc_s_vv_tl 
+        \l__nmc_s_multi_sep_tl \l__nmc_env_s_arg_tl
+    \bool_if:NT \l__nmc_env_rbrace_bool
+      { 
+        \exp_args:NV \__nmc_env_rbrace:n \l__nmc_env_rbrace_tl
+        \bool_if:NF \l__nmc_vv_settings_bool
+          { \tl_set:Nn \l__nmc_vv_tl { ,\mskip 12muplus6muminus6mu (vv) } }
+      }
+  }
+\cs_new_protected:Npn \__nmc_env_rbrace:n #1
+  {
+    \prop_if_in:NVT \g__nmc_envi_prop \l__nmc_env_tl
+      { 
+        \tl_if_blank:nTF { #1 }
+          { \tl_set:Nn \l__nmcA_tl { .\q_nil } }
+          { \tl_set:Nn \l__nmcA_tl { #1\q_nil } }
+        \__nmc_next:
+        \quark_if_nil:NTF \l__nmcC_tl
+          { 
+            \tl_set:Nn \l__nmc_env_sp_rbrace_tl { \right }
+            \tl_set_eq:NN \l__nmc_env_rbrace_tl \l__nmcB_tl
+          }
+          {
+            \tl_concat:NNN \l__nmc_env_sp_rbrace_tl \l__nmcB_tl \right
+            \tl_set_eq:NN \l__nmc_env_rbrace_tl \l__nmcC_tl
+          }
+        \tl_set:Nn \l__nmc_multi_sep_tl { \\ }
+      }
+  }
+\cs_new_protected:Npn \__nmc_env_f_zero:nn #1#2
+  {
+    \prop_get:NnNTF \g__nmc_envi_prop { #2 } \l_tmpb_tl
+      { 
+        \__nmc_error_what:n { Math~mode~needed~for~\__nmc_verb:n {#2}\ 
+            environment~in } 
+      }
+      { 
+        \prop_get:NnNTF \g__nmc_env_prop { #2 } \l_tmpb_tl
+          { \__nmc_env_params_def:Nnn \l_tmpb_tl { 1 } { 1 } }
+          { \__nmc_env_f_zero_aux:nn { #1 } { #2 } }
+      }
+  }
+\cs_new_protected:Npn \__nmc_env_f_zero_aux:nn #1#2
+  { 
+    \bool_if:nTF { \tl_if_blank_p:n { #1 } && \tl_if_blank_p:n { #2 } }
+      { 
+        \prop_get:NnN \g__nmc_env_prop { $ } \l_tmpb_tl
+        \__nmc_env_params_def:Nnn \l_tmpb_tl { 0 } { 0 }
+      }
+      { 
+        \tl_if_empty:nTF { #1 }
+          { \__nmc_error_what:n { Unknown~math~environment~
+              \__nmc_verb:n { #2 }~in } }
+          { 
+            \__nmc_error_where:n { settings }
+            \__nmc_error_what:n { Unknown~math~environment~
+              \__nmc_verb:n { #1 }~in } 
+          }
+      }
+  }
+\cs_new_protected:Npn \__nmc_env_f_one:nn #1#2
+  { 
+    \prop_get:NnNTF \g__nmc_envi_prop { #2 } \l_tmpb_tl
+      { 
+        \__nmc_env_params_def:Nnn \l_tmpb_tl { 1 } { 1 }
+        \mode_if_math:F
+          {
+            \tl_concat:NNN \l__nmc_math_delimi_tl 
+                \l__nmc_outer_delimi_tl\l__nmc_math_delimi_tl
+            \tl_concat:NNN \l__nmc_math_delimii_tl
+                \l__nmc_math_delimii_tl \l__nmc_outer_delimii_tl
+          }
+      }
+      { 
+        \mode_if_math:TF
+          {
+            \exp_args:NV \__nmc_env_params_def:nn \@currenvir { 0 }
+            \__nmc_math_env_delims:nn {}{}
+          }
+          { \__nmc_env_params_def:nn { #1 } { 1 } }
+      }
+  }
+\cs_new_protected:Npn \__nmc_env_params_def:nn #1#2
+  {
+    \prop_get:NnNTF \g__nmc_env_prop { #1 } \l_tmpb_tl
+      { \__nmc_env_params_def:Nnn \l_tmpb_tl { #2 } { 1 } }
+      {
+        \prop_get:NnN \g__nmc_env_prop { $ } \l_tmpb_tl
+        \__nmc_env_params_def:Nnn \l_tmpb_tl { 0 } { 0 }
+      }
+  }
+\cs_new_protected:Npn \__nmc_env_params_def:Nnn #1#2#3
+  { 
+    #1
+    \__nmc_int_to_bool:Nn \l__nmc_see_formula_bool { #2 }
+    \__nmc_int_to_bool:Nn \l__nmc_see_vv_bool { #3 }
+  }
+\cs_new_protected:Npn \__nmc_env_params_set:nnnN #1#2#3#4
+  { 
+    \tl_if_empty:nF { #1 } { \tl_set:Nn \l__nmc_equals_tl { #1 } }
+    \bool_if:NT \l__nmc_vv_settings_bool { \tl_set:Nn \l__nmc_vv_tl { #2 } }
+    \tl_if_empty:nF { #3 } { \tl_set:Nn \l__nmc_multi_sep_tl { #3 } }
+    \tl_if_empty:NF { #4 } { \tl_set_eq:NN \l__nmc_env_arg_tl #4 }
+    \int_if_zero:nF { 1 + \l__nmc_see_force_int }
+      { 
+        \__nmc_int_to_bool:Nn \l__nmc_see_formula_bool 
+            { \l__nmc_see_force_int } 
+      }
+  }
+\cs_generate_variant:Nn \__nmc_env_params_set:nnnN { ooo }
+\tl_new:N \l__nmc_env_f_tl
+\cs_new_protected:Npn \__nmc_env_extract_formula:n #1
+  {
+    \str_case:nn {#1}
+      {
+        {$}  { \__nmc_env_extract_formula_aux:n {$}  }
+        {\(} { \__nmc_env_extract_formula_aux:n {\(} } 
+        {\[} { \__nmc_env_extract_formula_aux:n {\[} }
+        {\begin} 
+          {
+            \tl_set:Nx \l__nmc_env_f_tl 
+              { \tl_item:Nn \l__nmc_formula_tl { 2 } }
+            \tl_set:Nx \l__nmc_formula_tl 
+                { \tl_range:Nnn\l__nmc_formula_tl {3}{-3} }
+          }
+      }
+  }
+\cs_generate_variant:Nn \__nmc_env_extract_formula:n { x }
+\cs_new_protected:Npn \__nmc_env_extract_formula_aux:n #1
+  {
+    \tl_set:Nx \l__nmc_formula_tl 
+        { \tl_range:Nnn\l__nmc_formula_tl {2}{-2} }
+    \tl_set:Nn \l__nmc_env_f_tl { #1 }
+  }
+\cs_new_protected:Npn \__nmc_math_env_delims:nn #1#2
+  { 
+    \tl_set:Nn \l__nmc_math_delimi_tl {#1}
+    \tl_set:Nn \l__nmc_math_delimii_tl {#2}
+  }
+\cs_new_protected:Npn \__nmc_math_env_delims:n #1
+  { \__nmc_math_env_delims:nn { \begin{#1} } { \end{#1} } } 
+\cs_new_protected:Npn \__nmc_env_delims_outer:n #1
+  {
+    \str_case:nnF {#1}
+      {
+        {$}  { \__nmc_math_env_delims:nn {$}{$}  }
+        {\(} { \__nmc_math_env_delims:nn {\(}{\)} } 
+        {\[} { \__nmc_math_env_delims:nn {\[}{\]} }
+      }
+      { \__nmc_math_env_delims:n {#1} }
+    \tl_set_eq:NN \l__nmc_outer_delimi_tl \l__nmc_math_delimi_tl
+    \tl_set_eq:NN \l__nmc_outer_delimii_tl \l__nmc_math_delimii_tl
+  }
+\cs_generate_variant:Nn \__nmc_env_delims_outer:n { V }
+%
+\cs_set_protected:Npn \__nmc_eval_vv_digest:N #1
+  { \__nmc_vv_digest:N #1 }
+%
+\cs_set_protected:Npn \__nmc_eval_process:
+  { 
     \__nmc_error_where:n { formula }
-    \tl_clear:N \l__nmc_fp_expr_tl
-    \__nmc_fpify:VN \l_nmc_formula_tl \l__nmc_fp_expr_tl
-    \bool_if:NF \g__nmc_error_bool
+    % prepare
+    \seq_set_split:NVV \l__nmc_multi_seq
+        \l__nmc_multi_delim_tl \l__nmc_formula_tl
+    \seq_remove_all:Nn \l__nmc_multi_seq {}
+    \int_set:Nn \l__nmc_multi_int { \seq_count:N \l__nmc_multi_seq }
+    % loop: process -> display/debug
+    \seq_map_variable:NNn \l__nmc_multi_seq \l__nmc_formula_tl
       {
-        \tl_set:Nx \l_nmc_result_tl { \fp_to_tl:n { \l__nmc_fp_expr_tl } }
-        \__nmc_error_fpflag:
+        \int_decr:N \l__nmc_multi_int
+        \tl_clear:N \l__nmc_display_tl
+        \tl_set_eq:NN \l__nmc_formula_dup_tl \l__nmc_formula_tl
+        \tl_clear:N \l__nmc_fp_expr_tl
+        \__nmc_fpify:VN \l__nmc_formula_tl \l__nmc_fp_expr_tl
+        \bool_if:NF \g__nmc_error_bool
+          { 
+            \tl_set:Nx \l__nmc_result_tl { \fp_to_tl:n { \l__nmc_fp_expr_tl } }
+            \__nmc_error_fpflag:
+          } 
+        \bool_if:NT \g__nmc_error_bool
+          { \seq_map_break: }
+        \int_compare:nNnTF { \l__nmc_depth_int } <  { 3 }
+          { \__nmc_eval_process_aux: }
+          { \tl_put_right:NV \l__nmc_show_tl \l__nmc_result_tl }
       }
+
     \int_if_zero:nF \l__nmc_dbg_int
-      { \__nmc_dbg_get_data: }
+      { 
+        \__nmc_dbg_get_data: 
+        \__nmc_if_mod_zero:nnT \l__nmc_dbg_int { 11 }
+          { \__nmc_eval_display: }
+      }
   }
-\cs_gset_protected:Npn \__nmc_eval_display:
-  {
-    \__nmc_num_format:nNnN { \l_nmc_result_tl } \l_nmc_result_tl
+\cs_new_protected:Npn \__nmc_eval_process_aux:
+  { 
+    \__nmc_num_format:nNnN { \l__nmc_result_tl } \l__nmc_result_tl
         { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl
-    \bool_if:NF \l__nmc_num_only_bool
-      {  
-        \tl_set:Nx \l_nmc_result_tl 
+    \tl_put_right:Nx \l__nmc_display_tl
+      {
+        \bool_if:NT \l__nmc_see_formula_bool
+          {
+            \exp_not:o \l__nmc_formula_dup_tl
+            \bool_if:NTF \l__nmc_TF_out_bool 
+              { \rightarrow } { \l__nmc_equals_tl }
+           }
+        \exp_not:o \l__nmc_result_tl
+        \bool_if:nT { \l__nmc_see_vv_bool && !\l__nmc_env_rbrace_bool }
+          { \exp_not:o \l__nmc_vv_tl }
+      }
+    \int_if_zero:nF { \l__nmc_multi_int }
+      {
+        \__nmc_eval_rdisplay:ooo \l__nmc_display_tl 
+           \l__nmc_multi_punc_tl \l__nmc_multi_sep_tl
+      }
+  }
+\cs_set_protected:Npn \__nmc_eval_display:
+  { 
+    \tl_gset:NV \g__nmc_reuse_tl \l__nmc_result_tl
+    \__nmc_eval_rdisplay:ooo \l__nmc_display_tl 
+        \l__nmc_punc_tl \l__nmc_math_delimii_tl
+    \bool_if:NTF \l__nmc_env_rbrace_bool
+      {
+        \bool_if:NF \l__nmc_see_vv_bool
+          { \tl_clear:N \l__nmc_vv_tl }
+        \__nmc_eval_rdisplay:ooo \l__nmc_env_sp_rbrace_tl
+           \l__nmc_env_rbrace_tl \l__nmc_vv_tl
+        \__nmc_eval_ldisplay:noo {\left.} 
+            \l__nmc_math_delimi_tl \l__nmc_env_arg_tl
+      }
+      {
+        \__nmc_eval_ldisplay:noo {} 
+            \l__nmc_math_delimi_tl \l__nmc_env_arg_tl
+      }
+    \__nmc_if_mod_zero:nnF { \l__nmc_dbg_int } { 11 }
+      { 
+        \mode_if_math:TF
           { 
-            \exp_not:o \l__nmc_math_delimi_tl
-            \bool_if:NT \l__nmc_wraps_math_bool
-              { 
-                \exp_not:o \l__nmc_formula_dup_tl
-                \bool_if:NTF \l__nmc_TF_out_bool 
-                  { \rightarrow } { = }
-              }
-            \exp_not:o \l_nmc_result_tl
-            \bool_if:NTF \l__nmc_vv_multline_bool
-              { \exp_not:o \l__nmc_vv_display_tl }
-              { 
-                \bool_if:NF \l__nmc_vv_invisible_bool
-                  { 
-                    \mathchoice{ \exp_not:o \l__nmc_vv_display_tl }
-                        { \exp_not:o \l__nmc_vv_inline_tl }{}{}
-                  }
-              }
-            \l__nmc_punc_tl 
-            \exp_not:o \l__nmc_math_delimii_tl 
+            \exp_after:wN \group_end: \l__nmc_show_tl
+            \group_begin:
           }
-        \int_if_zero:nT { \l__nmc_eval_reuse_int }
-          { \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl }
+          { \l__nmc_show_tl }
       }
-    \l_nmc_result_tl
-  }  
-% fpify LaTeX math expr %%%%%%%%%%%%%%%%%%%%%%%%%
+  }
+\cs_new_protected:Npn \__nmc_eval_rdisplay:nnn #1#2#3
+  { \tl_put_right:Nn \l__nmc_show_tl { #1 #2 #3 } }
+\cs_generate_variant:Nn  \__nmc_eval_rdisplay:nnn { ooo }
+\cs_new_protected:Npn \__nmc_eval_ldisplay:nnn #1#2#3
+  { 
+    \tl_if_blank:nTF { #3 }
+      { \tl_put_left:Nn \l__nmc_show_tl { #1 #2 } }
+      { \tl_put_left:Nn \l__nmc_show_tl { #1 #2 {#3} } }
+  }
+\cs_generate_variant:Nn  \__nmc_eval_ldisplay:nnn { noo }
+%%%%%%%%%%%% fpify LaTeX math expr %%%%%%%%%%%%%
 \bool_new:N \l__nmc_insert_aster_bool
 \tl_new:N \l__nmc_subst_tl
 \tl_new:N \l__nmc_accum_tl
@@ -1183,6 +1605,7 @@
 \tl_new:N \l__nmc_fn_arg_tl
 \tl_new:N \l__nmc_power_arg_tl
 \bool_new:N \l__nmc_hyperbolic_bool
+\bool_new:N \l__nmc_trig_bool
 % factorial
 \fp_new:N \l__nmc_fact_fp
 \tl_new:N \l__nmc_fact_arg_tl
@@ -1200,6 +1623,7 @@
 \tl_new:N \l__nmc_summand_tl
 \tl_new:N \l__nmc_sum_op_tl
 \tl_new:N \l__nmc_sum_type_tl
+\tl_new:N \l__nmc_sum_typei_tl
 \tl_new:N \g__nmc_sum_A_tl
 \bool_new:N \l__nmc_sum_bool
 \int_new:N \l__nmc_sum_index_int
@@ -1213,40 +1637,64 @@
 
 % #1 = latex expr #2 = fp-ified result
 \cs_new_protected:Npn \__nmc_fpify:nN #1#2
-  {
+  { 
     \group_begin:
     \bool_set_false:N \l__nmc_superscript_bool
     \bool_set_false:N \l__nmc_insert_aster_bool
+    \bool_set_false:N \l__nmc_trig_bool
     \tl_clear:N \l__nmc_accum_tl
-    \tl_clear:N \l__nmc_C_tl
-    \tl_set:Nn \l__nmc_A_tl  { #1\q_nil }
-    \tl_if_empty:nT { #1 }
+    \tl_clear:N \l__nmcC_tl
+    \tl_if_empty:nTF { #1 }
       { \__nmc_error_what:n { Empty~argument~to~fp-ify~in } }
+      { \tl_set:Nn \l__nmcA_tl  { #1\q_nil } }
     \bool_until_do:nn 
         { 
-          \quark_if_nil_p:N \l__nmc_C_tl
+          \quark_if_nil_p:N \l__nmcC_tl
           || \g__nmc_error_bool
         }
-      {
+      { 
         \tl_clear:N \l__nmc_arg_tl
-        \__nmc_next:
-        \prop_get:NVNTF \g__nmc_class_prop \l__nmc_B_tl \l_tmpb_tl
+        \__nmc_next: 
+        \prop_get:NVNTF \g__nmc_class_prop \l__nmcB_tl \l_tmpb_tl
           { \exp_last_unbraced:NV \use_i:nn \l_tmpb_tl }
-          { \__nmc_fpify_var: }
+          { \tl_if_empty:NF \l__nmcB_tl { \__nmc_fpify_var: } }
       } 
     \exp_args:NNNV
     \group_end:
         \tl_put_right:Nn #2 \l__nmc_accum_tl
- }
+  }
 \cs_generate_variant:Nn \__nmc_fpify:nN { V }
-
-\cs_new_protected:Npn \__nmc_fpify_unknown:
+% (fpify) #2, append to #1
+\cs_new_protected:Npn \__nmc_accum_fpify_parenth:NN #1#2
   {
-    \tl_if_in:nVTF { )]\}\rbrace } \l__nmc_B_tl
-      { \__nmc_error_what:n { Unmatched~\__nmc_verb:V \l__nmc_B_tl{}~in } }
-      { \__nmc_error_what:n { Unknown~token~\__nmc_verb:V \l__nmc_B_tl{}~in } }
+    \group_begin:
+    \tl_clear:N \l_tmpa_tl
+    \__nmc_fpify:VN #2 \l_tmpa_tl
+    \exp_args:NNNV
+    \group_end:
+        \__nmc_accum_fn_parenth:Nnn #1\l_tmpa_tl{}
   }
-% to avoid e.g. 34 instead of 3*4
+% (fp-ify) next braced arg, append to #1
+\cs_new_protected:Npn \__nmc_fpify_next_braced:N #1
+  { 
+    \__nmc_next:
+    \__nmc_accum_fpify_parenth:NN #1 \l__nmcB_tl
+  }
+%%%%%%%%%%
+\cs_new_protected:Npn \__nmc_fpify_unknown:
+  { 
+    \exp_args:NnV\str_if_in:nnTF { )]\}\rbrace } \l__nmcB_tl
+      { \__nmc_error_what:n { Unmatched~\__nmc_verb:N\l__nmcB_tl\ in } }
+      { 
+        \tl_if_single:NTF \l__nmcB_tl
+          {
+            \__nmc_error_what:n 
+                { Unknown~token~\__nmc_verb:V\l__nmcB_tl\ in }
+          }
+          { \__nmc_fpify:VN \l__nmcB_tl \l__nmc_accum_tl } % brace group
+      }
+  }
+% to ensure e.g. 3*4 instead of 34
 \cs_new_protected:Npn \__nmc_insert_aster:
   {
     \bool_if:NT \l__nmc_insert_aster_bool
@@ -1255,7 +1703,7 @@
 \cs_new_protected:Npn \__nmc_fpify_dec:
   { 
     \__nmc_get_dec:NN \l__nmc_fact_arg_tl \c_false_bool
-    \tl_if_eq:VnF \l__nmc_C_tl { ! }
+    \tl_if_eq:VnF \l__nmcC_tl { ! }
       {
         \__nmc_insert_aster:
         \tl_put_right:NV \l__nmc_accum_tl \l__nmc_fact_arg_tl
@@ -1264,24 +1712,29 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_var:
   { % ( ) in case var < 0 raised to power
-    \prop_get:NVNTF \l__nmc_subst_var_prop \l__nmc_B_tl \l__nmc_subst_tl
+
+    \prop_get:NVNTF \l__nmc_subst_var_prop \l__nmcB_tl \l__nmc_subst_tl
       {
         \tl_set_eq:NN \l__nmc_fact_arg_tl \l__nmc_subst_tl
-        \tl_if_in:noF { ! } \l__nmc_C_tl
+        \tl_if_in:noF { ! } \l__nmcC_tl
           { 
-            \__nmc_accum_fn_parenth:NNn \l__nmc_accum_tl \l__nmc_subst_tl {}
+            \__nmc_accum_fn_parenth:NVn \l__nmc_accum_tl \l__nmc_subst_tl {}
             \bool_set_true:N \l__nmc_insert_aster_bool
           }
       }
-      { \__nmc_fpify_unknown: }
+      {
+        \tl_trim_spaces:N \l__nmcB_tl
+        \tl_if_empty:NF \l__nmcB_tl
+          { \__nmc_fpify_unknown:{} }
+      }
   }
 \cs_new_protected:Npn \__nmc_fpify_const:
   { % if const used as var
-    \prop_get:NVNTF \l__nmc_subst_var_prop \l__nmc_B_tl \l__nmc_subst_tl
+    \prop_get:NVNTF \l__nmc_subst_var_prop \l__nmcB_tl \l__nmc_subst_tl
       { \__nmc_fpify_var: }
       {
-        \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l__nmc_subst_tl
-        \tl_if_eq:VnTF \l__nmc_C_tl { ! }
+        \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmcB_tl \l__nmc_subst_tl
+        \tl_if_eq:VnTF \l__nmcC_tl { ! }
           { \tl_clear:N \l__nmc_fact_arg_tl }
           { \tl_put_right:NV \l__nmc_accum_tl \l__nmc_subst_tl }
         \bool_set_true:N \l__nmc_insert_aster_bool
@@ -1289,12 +1742,12 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_arith:
   {
-    \tl_put_right:NV \l__nmc_accum_tl \l__nmc_B_tl
+    \tl_put_right:NV \l__nmc_accum_tl \l__nmcB_tl
     \bool_set_false:N \l__nmc_insert_aster_bool
   }
 \cs_new_protected:Npn \__nmc_fpify_slash:
-  {
-    \tl_put_right:NV \l__nmc_accum_tl \l__nmc_B_tl
+  { 
+    \tl_put_right:NV \l__nmc_accum_tl \l__nmcB_tl
     \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c__nmc_uny_int } 
     \__nmc_accum_fpify_parenth:NN \l__nmc_accum_tl \l__nmc_arg_tl
     \bool_set_true:N \l__nmc_insert_aster_bool
@@ -1301,33 +1754,36 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_arith_alt:
   {
-    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l__nmc_B_tl
-    \tl_put_right:NV \l__nmc_accum_tl \l__nmc_B_tl
+    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmcB_tl \l__nmcB_tl
+    \tl_put_right:NV \l__nmc_accum_tl \l__nmcB_tl
     \bool_set_false:N \l__nmc_insert_aster_bool
   }
 \cs_new_protected:Npn \__nmc_fpify_comparison:
   { 
-    \tl_if_in:noTF { <=> } \l__nmc_C_tl 
-      { \__nmc_error_what:n { Multi-token~comparison~in } }
+    \tl_if_in:noTF { <=> } \l__nmcC_tl
+      { 
+        \tl_concat:NNN \l_tmpa_tl \l__nmcB_tl \l__nmcC_tl 
+        \__nmc_next:
+      }
       {
-        \prop_get:NVNF \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l_tmpa_tl 
-          { \tl_set_eq:NN \l_tmpa_tl \l__nmc_B_tl } % < = > 
-        \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c__nmc_cmp_int }
-        \tl_clear:N \l_tmpb_tl
-        \__nmc_fpify:VN \l__nmc_arg_tl \l_tmpb_tl
-        \bool_if:NF \g__nmc_error_bool
-          {
-            \__nmc_accum_fn_parenth:NNn \l__nmc_accum_tl \l_tmpb_tl { - }
-            \tl_set:Nx \l__nmc_accum_tl 
-              { round( \l__nmc_accum_tl, \int_use:N \l__nmc_round_int ) }
-            \tl_put_right:NV \l__nmc_accum_tl \l_tmpa_tl
-            \tl_put_right:Nn \l__nmc_accum_tl { 0 }
-          }
+        \prop_get:NVNF \g__nmc_subst_fpfn_prop \l__nmcB_tl \l_tmpa_tl 
+          { \tl_set_eq:NN \l_tmpa_tl \l__nmcB_tl } % < = > 
       }
+    \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c__nmc_cmp_int }
+    \tl_clear:N \l_tmpb_tl
+    \__nmc_fpify:VN \l__nmc_arg_tl \l_tmpb_tl
+    \bool_if:NF \g__nmc_error_bool
+      {
+        \__nmc_accum_fn_parenth:NVn \l__nmc_accum_tl \l_tmpb_tl { - }
+        \tl_set:Nx \l__nmc_accum_tl 
+            { round( \l__nmc_accum_tl, \int_use:N \l__nmc_round_int ) }
+        \tl_put_right:NV \l__nmc_accum_tl \l_tmpa_tl
+        \tl_put_right:Nn \l__nmc_accum_tl { 0 }
+      }
   } 
 \cs_new_protected:Npn \__nmc_fpify_andor:
   { 
-    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l_tmpa_tl 
+    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmcB_tl \l_tmpa_tl 
     \tl_put_right:NV \l__nmc_accum_tl \l_tmpa_tl
     \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c__nmc_and_int }
     \tl_clear:N \l_tmpa_tl
@@ -1337,9 +1793,9 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_lparen:
   {
-    \__nmc_get_arg_L:VN \l__nmc_B_tl \l__nmc_arg_tl
+    \__nmc_get_arg_L:VN \l__nmcB_tl \l__nmc_arg_tl
     \tl_set_eq:NN \l__nmc_fact_arg_tl \l__nmc_arg_tl
-    \tl_if_eq:VnTF \l__nmc_C_tl { ! }
+    \tl_if_eq:VnTF \l__nmcC_tl { ! }
       { \bool_set_false:N \l__nmc_insert_aster_bool }
       {
         \__nmc_accum_fpify_parenth:NN \l__nmc_accum_tl \l__nmc_arg_tl 
@@ -1348,7 +1804,7 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_lvert:
   { 
-    \tl_if_eq:VnTF \l__nmc_B_tl { | } 
+    \tl_if_eq:VnTF \l__nmcB_tl { | } 
       { 
         \tl_set:Nn \l__nmc_L_tl { \lvert }
         \__nmc_absval_arg:N \l__nmc_arg_tl
@@ -1355,14 +1811,14 @@
         \tl_set:Nn \l__nmc_R_tl { \rvert }
       }
       { 
-        \tl_set_eq:NN \l__nmc_L_tl \l__nmc_B_tl
-        \__nmc_get_arg_L:VN \l__nmc_B_tl \l__nmc_arg_tl 
+        \tl_set_eq:NN \l__nmc_L_tl \l__nmcB_tl
+        \__nmc_get_arg_L:VN \l__nmcB_tl \l__nmc_arg_tl 
       }
     \__nmc_fpify_lvert_aux:
   }
 \cs_new_protected:Npn \__nmc_fpify_lvert_aux:
   {
-    \tl_if_eq:VnTF \l__nmc_C_tl { ! }
+    \tl_if_eq:VnTF \l__nmcC_tl { ! }
       {
         \tl_set:NV \l__nmc_fact_arg_tl \l__nmc_L_tl
         \tl_put_right:NV \l__nmc_fact_arg_tl \l__nmc_arg_tl 
@@ -1390,13 +1846,13 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_lmod:
   {
-    \tl_set_eq:NN \l__nmc_L_tl \l__nmc_B_tl
+    \tl_set_eq:NN \l__nmc_L_tl \l__nmcB_tl
     \prop_get:NVN \g__nmc_subst_misc_prop \l__nmc_L_tl \l__nmc_R_tl
-    \str_case:on \l__nmc_C_tl
+    \str_case:on \l__nmcC_tl
       {
         { | } { \__nmc_fpify_lmod_abs:V \l__nmc_L_tl }
-        { . } { \__nmc_fpify_lmod_aux:V \l__nmc_L_tl }
-        { / } 
+        { . } { \__nmc_next: } %\__nmc_fpify_lmod_aux:V \l__nmc_L_tl }
+        { / } %{ \__nmc_next: }
           { 
             \tl_put_right:Nn \l__nmc_accum_tl { / }
             \__nmc_fpify_lmod_aux:V \l__nmc_L_tl 
@@ -1404,7 +1860,7 @@
       }
   }
 \cs_new_protected:Npn \__nmc_fpify_lmod_abs:n #1
-  {
+  { 
     \__nmc_next:
     \tl_put_right:Nn \l__nmc_accum_tl { abs( }
     \exp_args:NNNV\__nmc_get_arg_LR:NNN { #1 } \l__nmc_arg_tl \l__nmc_R_tl 
@@ -1418,10 +1874,10 @@
 \cs_generate_variant:Nn \__nmc_fpify_lmod_abs:n { V }
 
 \cs_new_protected:Npn \__nmc_fpify_lmod_aux:n #1
-  {
+  { 
     \__nmc_next:
     \exp_args:NNNV\__nmc_get_arg_LR:NNN #1 \l__nmc_arg_tl \l__nmc_R_tl
-    \tl_if_eq:VnT \l__nmc_C_tl { . }
+    \tl_if_eq:VnT \l__nmcC_tl { . }
       { \__nmc_next: }
     \tl_clear:N \l_tmpa_tl
     \__nmc_fpify:VN \l__nmc_arg_tl \l_tmpa_tl
@@ -1432,20 +1888,23 @@
  
 \cs_new_protected:Npn \__nmc_fpify_rmod:
   { 
-    \tl_if_eq:VnT \l__nmc_C_tl { . }
+    \tl_if_eq:VnT \l__nmcC_tl { . }
       { \__nmc_next: }
   }
-\cs_new_protected:Npn \__nmc_fpify_unary:n #1
+\cs_new_protected:Npn \__nmc_fpify_unary:
   {
-    \tl_set:NV \l__nmc_fn_tl \l__nmc_B_tl
-    \tl_if_eq:VnTF \l__nmc_C_tl { ^ }
+    \tl_set:NV \l__nmc_fn_tl \l__nmcB_tl
+    \tl_if_eq:VnTF \l__nmcC_tl { ^ }
       { \__nmc_fpify_unary_superscript: }
       { \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_fn_tl \l__nmc_fn_tl }
     \str_if_in:NnTF \l__nmc_fn_tl { h }
       { \bool_set_true:N \l__nmc_hyperbolic_bool }
-      { \bool_set_false:N \l__nmc_hyperbolic_bool }
+      { 
+        \bool_set_false:N \l__nmc_hyperbolic_bool 
+        \bool_set_true:N \l__nmc_trig_bool
+      }
     % get fn arg
-    \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { #1 }
+    \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c__nmc_uny_int } 
     \tl_clear:N \l__nmc_fn_arg_tl
     \__nmc_fpify:VN \l__nmc_arg_tl \l__nmc_fn_arg_tl
     \bool_if:NT \l__nmc_hyperbolic_bool
@@ -1457,7 +1916,7 @@
     \bool_if:NTF \l__nmc_hyperbolic_bool
       { \tl_put_right:NV \l__nmc_accum_tl \l__nmc_fn_tl }
       { 
-        \__nmc_accum_fn_parenth:NNn \l__nmc_accum_tl 
+        \__nmc_accum_fn_parenth:NVn \l__nmc_accum_tl 
             \l__nmc_fn_arg_tl \l__nmc_fn_tl
       }
     \bool_if:NT \l__nmc_superscript_bool
@@ -1505,6 +1964,11 @@
         { acoth } { ( 0.5 ln( ((#1)+1)/((#1)-1) ) ) }
       }
   }
+\cs_new_protected:Npn \__nmc_fpify_degree:
+  {
+    \bool_if:NF \l__nmc_deg_bool
+      { \tl_put_right:Nn \l__nmc_accum_tl { (0.0174532925199433) } }
+  }
 \cs_new_protected:Npn \__nmc_fpify_power:
   {
     \tl_put_right:Nn \l__nmc_accum_tl { ^ }
@@ -1522,10 +1986,10 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_unarybrace:
   { 
-    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l__nmc_subst_tl
-    \tl_if_eq:VnT \l__nmc_C_tl { * }
+    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmcB_tl \l__nmc_subst_tl
+    \tl_if_eq:VnT \l__nmcC_tl { * }
       { \__nmc_next: }
-    \tl_if_eq:VnTF \l__nmc_C_tl { [ }
+    \tl_if_eq:VnTF \l__nmcC_tl { [ }
       { % n-th root
         \tl_if_eq:VnTF \l__nmc_subst_tl { sqrt }
           { 
@@ -1544,24 +2008,30 @@
   {
     \tl_set_eq:NN \l_tmpa_tl \l__nmc_subst_tl
     \__nmc_fpify_next_braced:N \l_tmpa_tl
-    \tl_if_eq:VnTF \l__nmc_C_tl { ! }
+    \tl_if_eq:VnTF \l__nmcC_tl { ! }
       { \__nmc_fpify_ubrace_fact: }
       { \tl_put_right:NV \l__nmc_accum_tl \l_tmpa_tl }
   }
 \cs_new_protected:Npn \__nmc_fpify_ubrace_n:
-  {
-    \__nmc_error_where:n { [~]~argument~of~\__nmc_verb:n { \sqrt } }
+  { 
+    \__nmc_error_where:n { \textbackslash sqrt }
     \tl_clear:N \l__nmc_arg_tl
     \tl_clear:N \l__nmc_ubrace_n_tl
+    \tl_put_right:Nn \l__nmc_accum_tl { ( }
     \__nmc_get_arg_LR:NNN [ \l__nmc_arg_tl ]
     \__nmc_fpify:VN \l__nmc_arg_tl \l__nmc_ubrace_n_tl
-    \__nmc_intify:Nn \l__nmc_ubrace_n_tl { 1 }
+    \tl_set:Nx \l__nmc_ubrace_n_tl { \fp_to_int:n \l__nmc_ubrace_n_tl }
+    \int_compare:nNnF { \l__nmc_ubrace_n_tl } > { 0 }
+      { 
+        \__nmc_error_what:n 
+          { Integer~$>0$~required~for~[arg]~of } 
+      }
     \bool_if:NF \g__nmc_error_bool
       {
         \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
         \__nmc_next:
         \tl_clear:N \l_tmpa_tl
-        \__nmc_fpify:VN \l__nmc_B_tl \l_tmpa_tl
+        \__nmc_fpify:VN \l__nmcB_tl \l_tmpa_tl
         \bool_if:nTF 
             { 
               \fp_compare_p:nNn { \l_tmpa_tl } < { 0 }
@@ -1573,6 +2043,7 @@
                { \__nmc_fpify_ubrace_n_aux:VV {\l_tmpa_tl}{ \l__nmc_ubrace_n_tl }}
           }
       }
+    \tl_put_right:Nn \l__nmc_accum_tl { ) }
   }
 \cs_new:Npn \__nmc_fpify_ubrace_n_aux:nn #1#2
   { sign( #1 )( abs( #1 ) )^( 1/( #2 ) ) }
@@ -1590,16 +2061,16 @@
           }
           {
             \tl_put_right:Nx \l__nmc_fact_arg_tl 
-                { { \exp_not:o \l__nmc_B_tl } }
+                { { \exp_not:o \l__nmcB_tl } }
           }
       }
   }
 \cs_new_protected:Npn \__nmc_fpify_unarysub:
   { % e.g. \log_{10}
-    \str_if_eq:VnTF \l__nmc_C_tl { _ }
+    \str_if_eq:VnTF \l__nmcC_tl { _ }
       { 
         \__nmc_next: \__nmc_next:
-        \__nmc_fpify_unarysub:N \l__nmc_B_tl
+        \__nmc_fpify_unarysub:N \l__nmcB_tl
       }
       { \__nmc_fpify_unarysub:N \l__nmc_log_base_tl }
   }
@@ -1621,13 +2092,13 @@
       }
     \bool_if:NF \g__nmc_error_bool
       {
-        \__nmc_accum_fn_parenth:NNn \l__nmc_accum_tl \l_tmpa_tl {}
-        \tl_put_left:Nn \l__nmc_A_tl { \ln }
+        \__nmc_accum_fn_parenth:NVn \l__nmc_accum_tl \l_tmpa_tl {}
+        \tl_put_left:Nn \l__nmcA_tl { \ln }
       }
   }
 \cs_new_protected:Npn \__nmc_fpify_surd:
   {
-    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l__nmc_subst_tl
+    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmcB_tl \l__nmc_subst_tl
     \tl_put_right:NV \l__nmc_accum_tl \l__nmc_subst_tl
     \tl_clear:N \l__nmc_arg_tl
     \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c__nmc_srd_int }
@@ -1640,14 +2111,19 @@
     \__nmc_error_where:n { factorial }
     \tl_clear:N \l_tmpa_tl
     \__nmc_fpify:VN \l__nmc_fact_arg_tl \l_tmpa_tl
-    \tl_if_eq:VnTF \l__nmc_C_tl { ! }
-      { \__nmc_fpify_fact_repeated: }
-      { 
-        \__nmc_intify:Nn \l_tmpa_tl { 0 }
-        \bool_if:NF \g__nmc_error_bool
-          {
-            \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
-            \__nmc_accum_fn_parenth:NNn \l__nmc_accum_tl  \l_tmpa_tl { fact }
+    \bool_if:NF \g__nmc_error_bool
+      {
+        \tl_set:Nx \l_tmpa_tl { \fp_to_int:n \l_tmpa_tl }
+        \tl_if_eq:VnTF \l__nmcC_tl { ! }
+          { \__nmc_fpify_fact_repeated: }
+          { 
+            \int_compare:nNnTF { \l_tmpa_tl } < { 0 }
+              { \__nmc_error_what:n { Integer~$\ge 0$~required~in } }
+              {
+                \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
+                \__nmc_accum_fn_parenth:NVn \l__nmc_accum_tl
+                    \l_tmpa_tl { fact }
+              }
           }
       }
     \bool_set_true:N \l__nmc_insert_aster_bool 
@@ -1654,15 +2130,16 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_fact_repeated:
   { 
-    \__nmc_intify:Nn \l_tmpa_tl { -1 }
-    \bool_if:NF \g__nmc_error_bool
+    \int_compare:nNnTF { \l_tmpa_tl } < { -1 }
       { 
-        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
+        \__nmc_error_what:n 
+            { Integer~$\ge -1$~required~for~double~factorial~in } 
+      }
+      { 
         \__nmc_fpify_double_fact:N \l_tmpa_tl 
         \tl_set:Nx \l_tmpa_tl { \fp_use:N \l__nmc_fact_fp } 
-        \tl_if_eq:VnTF \l__nmc_C_tl { ! }
-          { \tl_set_eq:NN \l__nmc_fact_arg_tl \l_tmpa_tl }
-          { \__nmc_accum_fn_parenth:NNn \l__nmc_accum_tl \l_tmpa_tl {} }
+        \__nmc_accum_fn_parenth:NVn \l__nmc_accum_tl \l_tmpa_tl {} 
+        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
       }
   }
 \cs_new_protected:Npn \__nmc_fpify_double_fact:N #1
@@ -1677,23 +2154,17 @@
       { \fp_set:Nn \l__nmc_fact_fp { 1 } } 
   }
 % multiply nos from #1 to #2, put  in \l__nmc_fact_fp
-% #3 = 1 (!), = 2 (!!)
+% step #3 = 1 (!), = 2 (!!)
 \cs_new_protected:Npn \__nmc_fpify_fact_do:nNn #1#2#3
   { 
-    \fp_set:Nn  \l_tmpa_fp { #1 }
-    \fp_set:Nn  \l_tmpb_fp { #2 }
-    \int_set:Nn \l_tmpb_int { #3 }
-    \fp_set_eq:NN \l__nmc_fact_fp \l_tmpa_fp
-    \fp_while_do:nNnn { \l_tmpa_fp } < { \l_tmpb_fp }
-      {
-        \fp_add:Nn \l_tmpa_fp { \l_tmpb_int }
-        \fp_set:Nn \l__nmc_fact_fp { \l__nmc_fact_fp * \l_tmpa_fp }
-      }
+    \fp_set:Nn \l__nmc_fact_fp { #1 }
+    \int_step_inline:nnnn { #1 + #3 } { #3 } { #2 }
+      { \fp_set:Nn \l__nmc_fact_fp { \l__nmc_fact_fp * ##1 } }
   }
 \cs_new_protected:Npn \__nmc_fpify_nary:
-  {
+  { 
     \bool_set_true:N \l__nmc_comma_nary_bool
-    \str_case:on \l__nmc_B_tl
+    \str_case:on \l__nmcB_tl
       {
         { \gcd } { \__nmc_fpify_nary_gcd: }
         { \max } { \__nmc_fpify_nary_maxmin: }
@@ -1705,10 +2176,10 @@
   {
     \__nmc_insert_aster:
     \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c_max_int }
-    \tl_set:Nx \l__nmc_arg_tl { \tl_range:Nnn \l__nmc_arg_tl { 2 } { -2 } } 
+    \tl_set:Nx \l__nmc_arg_tl { \tl_range:Nnn \l__nmc_arg_tl { 2 } { -2 } }
     \tl_clear:N \l_tmpa_tl
     \__nmc_fpify:VN \l__nmc_arg_tl \l_tmpa_tl
-    \seq_set_split:NnV \l_tmpa_seq {,} \l_tmpa_tl
+    \seq_set_split:NnV \l_tmpa_seq {,} \l_tmpa_tl % , for l3fp
     % eval. 1st expr.
     \seq_pop:NN \l_tmpa_seq \l_tmpb_tl
     \int_set:Nn \l_tmpb_int { \fp_to_int:n \l_tmpb_tl }
@@ -1718,7 +2189,6 @@
         \int_set:Nn \l_tmpa_int { \int_max:nn { \l_tmpd_int } { \l_tmpb_int } }
         \int_set:Nn \l_tmpb_int { \int_min:nn { \l_tmpd_int } { \l_tmpb_int } }
         \int_set:Nn \l_tmpc_int { \int_mod:nn { \l_tmpa_int } { \l_tmpb_int } }
-
         \int_until_do:nNnn { \l_tmpc_int } = { 0 }
           {
             \int_set_eq:NN \l_tmpa_int \l_tmpb_int
@@ -1731,9 +2201,9 @@
     \bool_set_false:N \l__nmc_insert_aster_bool
   }
 \cs_new_protected:Npn \__nmc_fpify_nary_maxmin:
-  {
-    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l__nmc_subst_tl
-    \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c_max_int } 
+  { 
+    \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmcB_tl \l__nmc_subst_tl
+    \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c_max_int }
     \tl_clear:N \l_tmpa_tl
     \__nmc_fpify:VN \l__nmc_arg_tl \l_tmpa_tl 
     % em-brace in case nested
@@ -1742,8 +2212,8 @@
     \bool_set_true:N \l__nmc_insert_aster_bool
   }
 \cs_new_protected:Npn \__nmc_fpify_comma:
-  {
-    \tl_put_right:Nn \l__nmc_accum_tl { , }
+  { 
+    \tl_put_right:Nn \l__nmc_accum_tl {,}
     \bool_set_false:N \l__nmc_insert_aster_bool
   }
 \cs_new_protected:Npn \__nmc_fpify_binom:
@@ -1750,8 +2220,10 @@
   {
     \__nmc_fpify_next_braced:N \l__nmc_binom_top_tl
     \__nmc_fpify_next_braced:N \l__nmc_binom_bot_tl
-    \__nmc_error_where:n { 2nd~argument~of~\__nmc_verb:n { \binom } }
-    \__nmc_intify:Nn \l__nmc_binom_bot_tl { 0 }
+    \__nmc_error_where:n { binomial~coeff }
+    \tl_set:Nx \l__nmc_binom_bot_tl { \fp_to_int:n \l__nmc_binom_bot_tl }
+    \int_compare:nNnT \l__nmc_binom_bot_tl < { 0 }
+      { \__nmc_error_what:n {Integer~$\ge 0$~required~in~\{arg2\}~of } }
     \bool_if:NF \g__nmc_error_bool
       {
         \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
@@ -1765,28 +2237,27 @@
     \int_if_zero:nTF { #2 }
       { \tl_put_right:Nn \l__nmc_accum_tl { 1 } }
       { % calc. top
-        \__nmc_fpify_binom_calc_do:nN { #1 - #2 + 1 } #1
+        \fp_set:Nn \l_tmpa_fp { #1 }
+        \int_step_inline:nnnn { 1 } { 1 } { #2 - 1 }
+          { \fp_set:Nn \l_tmpa_fp { \l_tmpa_fp * ( #1 - ##1 ) } }
+        \tl_put_right:Nx \l__nmc_accum_tl { \fp_use:N \l_tmpa_fp } 
         \tl_put_right:Nn \l__nmc_accum_tl { / }
-        \__nmc_fpify_binom_calc_do:nN { 1 } #2 % calc. bot.
+        \__nmc_fpify_fact_do:nNn { 1 } #2 { 1 }
+        \tl_put_right:Nx \l__nmc_accum_tl { \fp_use:N \l__nmc_fact_fp }
       }
     \tl_put_right:Nn \l__nmc_accum_tl { ) }
   }
-\cs_new_protected:Npn \__nmc_fpify_binom_calc_do:nN #1 #2
-  {
-    \__nmc_fpify_fact_do:nNn { #1 } #2 { 1 }
-    \tl_put_right:Nx \l__nmc_accum_tl { \fp_use:N \l__nmc_fact_fp }
-  }
 \cs_new_protected:Npn \__nmc_fpify_font:
   { 
     \__nmc_next:
-    \__nmc_accum_fpify_parenth:NN \l__nmc_accum_tl \l__nmc_B_tl
+    \__nmc_accum_fpify_parenth:NN \l__nmc_accum_tl \l__nmcB_tl
   }
 \cs_new_protected:Npn \__nmc_fpify_splitfrac:
   {
     \__nmc_next:
-    \tl_set_eq:NN \l_tmpb_tl \l__nmc_B_tl
+    \tl_set_eq:NN \l_tmpb_tl \l__nmcB_tl
     \__nmc_next:
-    \tl_put_right:NV \l_tmpb_tl \l__nmc_B_tl
+    \tl_put_right:NV \l_tmpb_tl \l__nmcB_tl
     \__nmc_accum_fpify_parenth:NN \l__nmc_accum_tl \l_tmpb_tl 
   }
 % \cs { m }, \cs { o m }, \cs { * m }
@@ -1794,7 +2265,7 @@
   { \__nmc_next:  }
 \cs_new_protected:Npn \__nmc_fpify_absorb_om:
   { 
-    \str_if_eq:VnT \l__nmc_C_tl { [ }
+    \str_if_eq:VnT \l__nmcC_tl { [ }
       { 
         \__nmc_next:
         \__nmc_get_arg_LR:NNN [ \l__nmc_toss_tl ] 
@@ -1803,7 +2274,7 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_absorb_sm:
   { 
-    \str_if_eq:VnT \l__nmc_C_tl { * }
+    \str_if_eq:VnT \l__nmcC_tl { * }
       { \__nmc_next: }
     \__nmc_next:
   }
@@ -1813,16 +2284,34 @@
     \__nmc_fpify_next_braced:N \l__nmc_accum_tl
     \bool_set_true:N \l__nmc_insert_aster_bool
   }
+\regex_new:N \l__nmc_glue_regex
+\regex_set:Nn \l__nmc_glue_regex 
+  { (\d+\s*mu)|(\1\s*plus\s*\d+\s*mu)|\2\s*minus\s*\d+\s*mu }
+\cs_new_protected:Npn \__nmc_fpify_mkern:
+  {
+    \exp_args:NV \token_if_eq_catcode:NNTF \l__nmcC_tl \mkern
+      { \__nmc_next: }
+      { 
+        \regex_replace_case_once:nNT
+          {
+            { \d+\s*mu\s*plus\s*\d+\s*mu\s*minus\s*\d+\s*mu } {}
+            { \d+\s*mu\s*plus\s*\d+\s*mu } {}
+            { \d+\s*mu\s*minus\s*\d+\s*mu } {}
+            { \d+\s*mu } {}
+          } \l__nmcA_tl
+          { \tl_set:Nx \l__nmcC_tl { \tl_head:N \l__nmcA_tl } }
+      }
+  }
 \cs_new_protected:Npn \__nmc_fpify_BE:
   { 
     \__nmc_next: 
-    \tl_if_in:VnT \l__nmc_B_tl { alignat }
+    \tl_if_in:VnT \l__nmcB_tl { alignat }
       { \__nmc_next: }
   }
 \cs_new_protected:Npn \__nmc_fpify_cmd:
-  { 
-    \__nmc_insert_aster:
-    \prop_get:NoNT \g__nmc_subst_misc_prop \l__nmc_B_tl \l_tmpa_tl
+  {  % \cm { s O m O O }
+    % \__nmc_insert_aster:
+    \prop_get:NoNT \g__nmc_subst_misc_prop \l__nmcB_tl \l_tmpa_tl
       { 
         \exp_args:NV \__nmc_cmd:n \l_tmpa_tl
         \bool_set_false:N \l__nmc_insert_aster_bool
@@ -1830,51 +2319,64 @@
       }
   }
 \cs_new_protected:Npn \__nmc_cmd:n #1
-  { % \cm { s O m O O }
-    \tl_set:Nn \l__nmc_delim_arg_tl { { #1 } } % cmd
-    \tl_if_eq:VnT \l__nmc_C_tl { * }
+  { % #1=id; \cm { s O m O O }
+    \tl_put_right:Nn \l__nmc_accum_tl { ( }
+    \tl_set:Nn \l__nmc_arg_tl { {#1} }
+    \tl_if_eq:VnT \l__nmcC_tl { * }
       { \__nmc_next: }
     \bool_set_true:N \l__nmc_num_only_bool
-    \__nmc_append_sqbrarg: % settings
+    \__nmc_get_sqbrarg:N \l__nmc_arg_tl % settings
     \__nmc_next:
-    \tl_put_right:Nx \l__nmc_delim_arg_tl { { \exp_not:o \l__nmc_B_tl } }
-    \__nmc_append_sqbrarg: % vv-list
-    \__nmc_append_sqbrarg: % num format
-    \tl_put_right:Nn \l__nmc_accum_tl { ( }
+    \tl_put_right:Nx \l__nmc_arg_tl { { \exp_not:o \l__nmcB_tl } }
+    \__nmc_get_sqbrarg:N \l__nmc_arg_tl % vv
+    \__nmc_get_sqbrarg:N \l__nmc_arg_tl % num format
     \group_begin:
-      \int_add:Nn \l__nmc_depth_int { 2 }
-      \exp_last_unbraced:No \__nmc_inputs_get:nnnnn \l__nmc_delim_arg_tl
+    \int_add:Nn \l__nmc_depth_int { 2 }
+    \exp_last_unbraced:No \__nmc_cmd_aux:nnnnn \l__nmc_arg_tl
+    \bool_if:nT { \l__nmc_round_bool && !\g__nmc_error_bool }
+      { 
+        \tl_set:Nx \l__nmc_result_tl 
+          { \fp_eval:n { round(\l__nmc_result_tl, \l__nmc_round_int) } }
+      }
+    \exp_args:NNNV
+    \group_end:
+      \tl_put_right:Nn \l__nmc_accum_tl \l__nmc_result_tl
+    \tl_put_right:Nn \l__nmc_accum_tl { ) }
+  }
+\cs_new_protected:Npn \__nmc_cmd_aux:nnnnn #1#2#3#4#5
+  { 
+     \__nmc_initialize:n { #1 }
+     \__nmc_formula:nn {#1} {#3}
       \bool_if:NF \g__nmc_error_bool
+        { \__nmc_settings:nn {#1} {#2} }
+      \bool_if:NF \g__nmc_error_bool
+        { \__nmc_trailing_args:nnn {#1} {#4} {#5} }
+      \bool_if:NF \g__nmc_error_bool
         { \use:c { __nmc_#1_process: } }
-      \exp_args:NNNV
-      \group_end:
-          \tl_put_right:Nn \l__nmc_accum_tl \l_nmc_result_tl
-      \tl_put_right:Nn \l__nmc_accum_tl { ) }
   }
-\cs_new_protected:Npn \__nmc_append_sqbrarg:
+\cs_new_protected:Npn \__nmc_get_sqbrarg:N #1
   {
-    \tl_if_eq:VnTF \l__nmc_C_tl { [ }
-      { \__nmc_append_sqbrarg_aux: }
-      { \tl_put_right:Nx \l__nmc_delim_arg_tl { {} } }
+    \tl_if_eq:VnTF \l__nmcC_tl { [ }
+      { 
+        \__nmc_next:
+        \tl_clear:N \l_tmpa_tl
+        \__nmc_get_arg_LR:NNN [ \l_tmpa_tl ]
+        \tl_put_right:Nx #1 { { \exp_not:o \l_tmpa_tl } }
+      }
+      { \tl_put_right:Nn #1 { {} } }
   }
-\cs_new_protected:Npn \__nmc_append_sqbrarg_aux:
-  { 
-    \__nmc_next:
-    \tl_clear:N \l_tmpa_tl
-    \__nmc_get_arg_LR:NNN [ \l_tmpa_tl ]
-    \tl_put_right:Nx \l__nmc_delim_arg_tl { { \exp_not:o \l_tmpa_tl } }
-  }
 % sum/prod %%%%%%%%%%%%%%%%%%
 \cs_new_protected:Npn \__nmc_fpify_sum:
   {
     \__nmc_insert_aster:
     \group_begin:
-    \tl_if_eq:VnTF \l__nmc_B_tl { \sum }
+    \tl_if_eq:VnTF \l__nmcB_tl { \sum }
       { % sum
         \tl_set:Nn \l__nmc_sum_op_tl { + }
         \fp_zero:N \l__nmc_sum_total_fp
         \fp_set:Nn \l__nmc_sum_prev_fp { 1 }
         \tl_set:Nn \l__nmc_sum_type_tl { sum }
+        \tl_set:Nn \l__nmc_sum_typei_tl { summation }
         \bool_set_true:N \l__nmc_sum_bool
       }
       { % product
@@ -1881,7 +2383,8 @@
         \tl_set:Nn \l__nmc_sum_op_tl { * }
         \fp_set:Nn \l__nmc_sum_total_fp { 1 }
         \fp_set:Nn \l__nmc_sum_prev_fp { 2 }
-        \tl_set:Nn \l__nmc_sum_type_tl { prod }
+        \tl_set:Nn \l__nmc_sum_type_tl { product }
+        \tl_set:Nn \l__nmc_sum_typei_tl { product }
         \bool_set_false:N \l__nmc_sum_bool
       }
     \__nmc_error_where:n { \l__nmc_sum_type_tl }
@@ -1888,7 +2391,7 @@
 
     \bool_if:NF \g__nmc_error_bool
       {
-        \__nmc_error_where:n { \l__nmc_sum_type_tl~\ limits }
+        \__nmc_error_where:n { \l__nmc_sum_type_tl }
         \__nmc_sum_get_limits:NNN \l__nmc_sum_var_tl
             \l__nmc_sum_index_int \l__nmc_sum_end_int
         \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
@@ -1897,19 +2400,19 @@
       { \group_end: }
       { % get the summand/multiplicand
         \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c__nmc_sum_int }
-        \tl_if_eq:VnF \l__nmc_C_tl { ( }
+        \tl_if_eq:VnF \l__nmcC_tl { ( }
           { \__nmc_parenth:N \l__nmc_arg_tl }
         \tl_set_eq:NN \l__nmc_summand_tl \l__nmc_arg_tl
         % do the sum/prod
         \__nmc_error_where:n { \l__nmc_sum_type_tl }
         \__nmc_sum_do:nn { \l__nmc_sum_index_int } { \l__nmc_sum_end_int }
-        \tl_gset_eq:NN \g_tmpa_tl \l__nmc_A_tl
-        \tl_gset_eq:NN \g_tmpb_tl \l__nmc_C_tl
+        \tl_gset_eq:NN \g_tmpa_tl \l__nmcA_tl
+        \tl_gset_eq:NN \g_tmpb_tl \l__nmcC_tl
         \exp_args:NNNV
         \group_end:
             \fp_set:Nn \l__nmc_sum_total_fp { \l__nmc_sum_total_fp }
-        \tl_set_eq:NN \l__nmc_A_tl \g_tmpa_tl 
-        \tl_set_eq:NN \l__nmc_C_tl \g_tmpb_tl
+        \tl_set_eq:NN \l__nmcA_tl \g_tmpa_tl 
+        \tl_set_eq:NN \l__nmcC_tl \g_tmpb_tl
         \tl_put_right:Nx \l__nmc_accum_tl { \fp_use:N \l__nmc_sum_total_fp }
         \bool_set_true:N \l__nmc_insert_aster_bool
         \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
@@ -1917,7 +2420,7 @@
   }
 \cs_new_protected:Npn \__nmc_sum_get_limits:NNN #1#2#3
   { % #1 (tl) sum var #2, #3 (ints) lower, upper limits
-    \str_if_eq:VnTF \l__nmc_C_tl { _ }
+    \str_if_eq:VnTF \l__nmcC_tl { _ }
       { 
         \__nmc_sum_limit_lower:NN #1#2 
         \bool_if:NF \g__nmc_error_bool
@@ -1934,32 +2437,31 @@
     \bool_if:NT \l__nmc_multitok_bool
       { % may not be in vv-list
         \seq_clear:N \l_tmpc_seq
-        \seq_push:NV \l_tmpc_seq \l__nmc_B_tl
-        \__nmc_prep_multitok:NN \l_tmpc_seq \l__nmc_A_tl 
-        \seq_pop:NN \l_tmpc_seq \l__nmc_B_tl
+        \seq_push:NV \l_tmpc_seq \l__nmcB_tl
+        \__nmc_prep_multitok:NN \l_tmpc_seq \l__nmcA_tl 
+        \seq_pop:NN \l_tmpc_seq \l__nmcB_tl
       }
-    \str_if_in:NnTF \l__nmc_B_tl { = }
+    \str_if_in:NnTF \l__nmcB_tl { = }
       { 
-        \__nmc_vv_get_vars_vals_lims:NN \l__nmc_B_tl \c_empty_prop
+        \__nmc_vv_get_vars_vals_lims:NN \l__nmcB_tl \c_empty_prop
         \tl_set_eq:NN #1 \l__nmc_eq_var_tl
-        \__nmc_sum_limit_assign:NN #2 \l__nmc_vv_fp_expr_tl
-        \seq_if_in:NVF \l__nmc_calc_fn_seq \l__nmc_B_tl
-          { \seq_put_left:NV \l__nmc_calc_fn_seq \l__nmc_B_tl }
+        \__nmc_sum_limit_assign:NNn #2 \l__nmc_vv_fp_expr_tl { lower }
+        \seq_if_in:NVF \l__nmc_calc_fn_seq \l__nmcB_tl
+          { \seq_put_left:NV \l__nmc_calc_fn_seq \l__nmcB_tl }
       }
       {
         \__nmc_error_what:n 
-           { No~\__nmc_verb:V \l__nmc_sum_type_tl\ variable~in }
+           { No~\l__nmc_sum_typei_tl\ variable~in }
       }
   }
 \cs_new_protected:Npn \__nmc_sum_limit_upper:N #1
   {
     \__nmc_next: \__nmc_next:
-
-    \__nmc_vv_get_vars_vals_lims:NN \l__nmc_B_tl \c_empty_prop
+    \__nmc_vv_get_vars_vals_lims:NN \l__nmcB_tl \c_empty_prop
     \bool_if:NF \g__nmc_error_bool
-      { \__nmc_sum_limit_assign:NN #1 \l__nmc_vv_fp_expr_tl }
+      { \__nmc_sum_limit_assign:NNn #1 \l__nmc_vv_fp_expr_tl { upper } }
   }
-\cs_new_protected:Npn \__nmc_sum_limit_assign:NN #1#2
+\cs_new_protected:Npn \__nmc_sum_limit_assign:NNn #1#2#3
   { 
     \tl_if_in:VnTF #2 { inf }
       { \int_set:Nn #1 { \fp_sign:n { #2 } * \c_max_int } }
@@ -1967,7 +2469,7 @@
         \fp_compare:nNnTF { abs(#2) } > { \c_max_int }
           { \int_set:Nn #1 { \fp_sign:n { #2 } * \c_max_int } }
           { 
-            \__nmc_intify:Nn #2 { -inf }
+            \tl_set:Nx #2 { \fp_to_int:n #2 }
             \bool_if:NF \g__nmc_error_bool
               { \int_set:Nn #1 { #2 } }
           }
@@ -2051,13 +2553,13 @@
 \int_new:N \l__nmc_delim_pos_int
 \bool_new:N \l__nmc_delim_stop_bool
 \bool_new:N \l__nmc_delim_lmod_bool
-\prg_new_conditional:Npnn \__nmc_if_pospas_gtr:nn #1#2 { p, TF }
+\prg_new_conditional:Npnn \__nmc_if_pospas_gtr:n #1 { p, TF }
   {
     \bool_if:nTF
         {
-          \int_compare_p:nNn { \l__nmc_delim_pos_int } > { #1 }
+          \int_compare_p:nNn { \l__nmc_delim_pos_int } > { 1 }
           && 
-          \int_compare_p:nNn { \l__nmc_delim_pas_int } > { #2 }
+          \int_compare_p:nNn { \l__nmc_delim_pas_int } > { #1 }
         }
       { \prg_return_true: }
       { \prg_return_false: }
@@ -2065,36 +2567,43 @@
 % #1 <-- \l__nmc_delim_arg_tl; % #2 (int) initial pos
 % #3 (int) parsing state
 \cs_new_protected:Npn \__nmc_delim_arg:Nnn #1#2#3
-  {
-    \group_begin:
-    \bool_set_false:N \__nmc_delim_stop_bool
-    \bool_set_false:N \l__nmc_delim_lmod_bool
-    \int_set:Nn \l__nmc_delim_pos_int { #2 }
-    \int_set:Nn \l__nmc_delim_pas_int { #3 }
-    \tl_clear:N \l__nmc_delim_arg_tl
-    \bool_until_do:nn 
-        { 
-          \l__nmc_delim_stop_bool ||
-          \quark_if_nil_p:N \l__nmc_C_tl
-        }
-      { 
-        \prop_get:NVNTF \g__nmc_class_prop \l__nmc_C_tl \l__nmc_class_tl
-          { \exp_last_unbraced:NV \use_ii:nn \l__nmc_class_tl }
-          { \__nmc_delim_var: } 
-        \int_incr:N \l__nmc_delim_pos_int
+  { 
+    \tl_if_head_is_group:VTF \l__nmcA_tl
+      {
+        \__nmc_next:
+        \tl_set_eq:NN #1 \l__nmcB_tl
       }
-    \tl_gset_eq:NN \g_tmpa_tl \l__nmc_A_tl
-    \tl_gset_eq:NN \g_tmpb_tl \l__nmc_delim_arg_tl
-    \exp_args:NNNV
-    \group_end: 
-        \tl_set:Nn \l__nmc_C_tl \l__nmc_C_tl 
-    \tl_set_eq:NN \l__nmc_A_tl \g_tmpa_tl
-    \tl_set_eq:NN #1 \g_tmpb_tl
+      {
+        \group_begin:
+        \bool_set_false:N \__nmc_delim_stop_bool
+        \bool_set_false:N \l__nmc_delim_lmod_bool
+        \int_set:Nn \l__nmc_delim_pos_int { #2 }
+        \int_set:Nn \l__nmc_delim_pas_int { #3 }
+        \tl_clear:N \l__nmc_delim_arg_tl
+        \bool_until_do:nn 
+            { 
+              \l__nmc_delim_stop_bool ||
+              \quark_if_nil_p:N \l__nmcC_tl
+            }
+          { 
+            \prop_get:NVNTF \g__nmc_class_prop \l__nmcC_tl \l__nmc_class_tl
+              { \exp_last_unbraced:NV \use_ii:nn \l__nmc_class_tl }
+              { \__nmc_delim_var: } 
+            \int_incr:N \l__nmc_delim_pos_int
+          }
+        \tl_gset_eq:NN \g_tmpa_tl \l__nmcA_tl
+        \tl_gset_eq:NN \g_tmpb_tl \l__nmc_delim_arg_tl
+        \exp_args:NNNV
+        \group_end: 
+            \tl_set:Nn \l__nmcC_tl \l__nmcC_tl 
+        \tl_set_eq:NN \l__nmcA_tl \g_tmpa_tl
+        \tl_set_eq:NN #1 \g_tmpb_tl
+      }
   }
 % delimit arg routines %%%%%%%%%%%%%%%%
 \cs_new_protected:Npn \__nmc_delim_stop:
   { 
-    \tl_if_eq:VnTF \l__nmc_C_tl { \q }  
+    \tl_if_eq:VnTF \l__nmcC_tl { \q }  
       { \bool_set_false:N \l__nmc_delim_stop_bool }
       { \bool_set_true:N  \l__nmc_delim_stop_bool }
   }
@@ -2106,12 +2615,12 @@
 \cs_new_protected:Npn \__nmc_delim_append:
   { 
     \__nmc_next:
-    \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_B_tl
+    \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmcB_tl
   }
 \cs_new_protected:Npn \__nmc_delim_append_braced:
   {
     \__nmc_next:
-    \tl_put_right:Nx \l__nmc_delim_arg_tl { { \exp_not:o\l__nmc_B_tl } }
+    \tl_put_right:Nx \l__nmc_delim_arg_tl { { \exp_not:o\l__nmcB_tl } }
   }
 \cs_new_protected:Npn \__nmc_delim_append_twobraced:
     {
@@ -2129,35 +2638,47 @@
   }
 \cs_new_protected:Npn \__nmc_delim_dec:
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_uny_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_uny_int } 
       { \__nmc_delim_stop: }
       { 
         \__nmc_next:
         \__nmc_get_dec:NN \l_tmpa_tl \c_true_bool
-        \tl_put_right:NV \l__nmc_delim_arg_tl \l_tmpa_tl 
+        \tl_put_right:NV \l__nmc_delim_arg_tl \l_tmpa_tl
+        \bool_if:NT \l__nmc_trig_bool
+          { \__nmc_degrees: }
       }
   }
+\cs_new_protected:Npn \__nmc_degrees:
+  {
+    \tl_if_eq:VnT \l__nmcC_tl { \degree }
+      {
+        \bool_if:NF \l__nmc_deg_bool 
+          { \tl_put_right:Nn \l__nmc_delim_arg_tl 
+              { (0.0174532925199433) } }
+        \__nmc_next: 
+      }
+  }
 \cs_new_protected:Npn \__nmc_delim_var:
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_uny_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_uny_int } 
       { \__nmc_delim_stop: }
       { \__nmc_delim_append: }
   }
 \cs_new_protected:Npn \__nmc_delim_const:
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_uny_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_uny_int } 
       { \__nmc_delim_stop: }
       { \__nmc_delim_append: }
   }
 \cs_new_protected:Npn \__nmc_delim_arith:
-  {   
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int }
+  { 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int }
       { \__nmc_delim_stop: }
       { \__nmc_delim_append: }
   }
 \cs_new_protected:Npn \__nmc_delim_pm:
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_cmp_int }
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_cmp_int }
       { \__nmc_delim_stop: }
       { \__nmc_delim_append: }
   }
@@ -2165,11 +2686,11 @@
   { 
     \int_compare:nNnT { \l__nmc_delim_pas_int } = { \c__nmc_cmp_int }
       {
-        \tl_put_left:NV \l__nmc_A_tl \l__nmc_delim_arg_tl
-        \tl_put_left:Nn \l__nmc_A_tl { \land } 
-        \tl_put_left:Nn \l__nmc_C_tl { \land } 
+        \tl_put_left:NV \l__nmcA_tl \l__nmc_delim_arg_tl
+        \tl_put_left:Nn \l__nmcA_tl { \land } 
+        \tl_put_left:Nn \l__nmcC_tl { \land } 
       }
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_and_int  } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_and_int  } 
       { \__nmc_delim_stop: }
       { 
         \__nmc_delim_append:
@@ -2181,13 +2702,12 @@
   { \__nmc_delim_stop: }
   
 \cs_new_protected:Npn \__nmc_delim_lparen:
-  {
-    \bool_lazy_or:nnTF { \__nmc_if_pospas_gtr_p:nn { 1 } { \c__nmc_trg_int } }
-        { \__nmc_if_pospas_gtr_p:nn { \l__nmc_posi_int } { \c__nmc_sum_int } }
+  { 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int }
       { \__nmc_delim_stop: }
       { 
         \__nmc_next:
-        \str_case:on \l__nmc_B_tl
+        \str_case:on \l__nmcB_tl
           {
             { (  } { \__nmc_delim_lparen:nn { ( } { ) } }
             { [  } { \__nmc_delim_lparen:nn { [ } { ] } }
@@ -2196,7 +2716,7 @@
             { \lbrack } { \__nmc_delim_lparen:nn { \lbrack } { \rbrack } }
             { \lbrace } { \__nmc_delim_lparen:nn { \lbrace } { \rbrace } }
           }
-        \__nmc_delim_lparen_auxi:n { \l__nmc_posi_int }
+        \__nmc_delim_lparen_auxi:
       }
   }
 \cs_new_protected:Npn \__nmc_delim_lparen:nn #1#2
@@ -2213,40 +2733,33 @@
   }
 \cs_generate_variant:Nn \__nmc_delim_lparen:nn { VV }
 
-\cs_new_protected:Npn \__nmc_delim_lparen_auxi:n #1
-  { % #1 is first pos.
-    \int_compare:nNnTF { \l__nmc_delim_pas_int } = { \c__nmc_trg_int }
-      { % +1 to prevent ( )( )
+\cs_new_protected:Npn \__nmc_delim_lparen_auxi:
+  {
+    \int_compare:nNnT { \l__nmc_delim_pas_int } = { \c__nmc_uny_int }
+      {
         \__nmc_delim_arg:Nnn 
-            \l__nmc_delim_argi_tl { #1 + 1 } { \c__nmc_trg_int } 
+          \l__nmc_delim_argi_tl { 2 } { \c__nmc_prn_int } 
       }
-      {
-        \int_compare:nNnT { \l__nmc_delim_pas_int } = { \c__nmc_uny_int }
-          {
-            \__nmc_delim_arg:Nnn 
-              \l__nmc_delim_argi_tl { 2 } { \c__nmc_prn_int } 
-          }
-      }
     \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_delim_argi_tl
     \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
   }
 \cs_new_protected:Npn \__nmc_delim_rparen:
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_cmp_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_cmp_int } 
       { \__nmc_delim_stop: }
       { 
         \__nmc_next:
-        \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_B_tl
+        \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmcB_tl
       }
   }  
 \cs_new_protected:Npn \__nmc_delim_lvert:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int }
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int }
       { \__nmc_delim_stop: }
       { 
         \__nmc_next:
-        \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_B_tl
-        \str_case:on \l__nmc_B_tl
+        \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmcB_tl
+        \str_case:on \l__nmcB_tl
           {
             { \lvert  } { \__nmc_delim_lvert:nn { \lvert  } { \rvert  } }
             { \lceil  } { \__nmc_delim_lvert:nn { \lceil  } { \rceil  } }
@@ -2266,52 +2779,60 @@
     \tl_put_right:Nn \l__nmc_delim_arg_tl { #2 }
   }
 \cs_new_protected:Npn \__nmc_delim_lmod:
-  {
-    \bool_lazy_and:nnT { \int_compare_p:nNn { \l__nmc_posi_int } < { 3 } }
-        { \int_compare_p:nNn { \l__nmc_delim_pas_int } = { \l__nmc_trg_int } }
-      { \int_incr:N \l__nmc_delim_pas_int }
-    \__nmc_if_pospas_gtr:nnTF { \l__nmc_posi_int } { \l__nmc_trg_int }
+  { 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int }
       { \__nmc_delim_stop: }
       { 
         \__nmc_next:
-        \tl_if_in:nVTF { |./ } \l__nmc_C_tl
+        \tl_if_in:nVTF { |/ } \l__nmcC_tl
           {
-            \prop_get:NVN \g__nmc_subst_misc_prop \l__nmc_B_tl \l_tmpb_tl
-            \__nmc_delim_lparen:VV \l__nmc_B_tl \l_tmpb_tl 
+            \prop_get:NVN \g__nmc_subst_misc_prop \l__nmcB_tl \l_tmpb_tl
+            \__nmc_delim_lparen:VV \l__nmcB_tl \l_tmpb_tl 
             \__nmc_next:
-            \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_B_tl
-            \tl_if_eq:VnTF \l__nmc_C_tl { | }
+            \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmcB_tl
+            \tl_if_eq:VnTF \l__nmcC_tl { | }
               { \__nmc_delim_lparen_auxi:n { 0 } }
               {
                 \__nmc_next:
-                \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_B_tl 
+                \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmcB_tl 
                 \__nmc_delim_stop: 
               }
           }
           { 
+            \tl_if_eq:VnTF \l__nmcC_tl { . } 
+              { \__nmc_next: }
+              { \bool_set_true:N \l__nmc_delim_lmod_bool }
             \int_decr:N \l__nmc_delim_pos_int
-            \bool_set_true:N \l__nmc_delim_lmod_bool
           }
       }
   }
-\cs_new_protected:Npn \__nmc_delim_unary:n #1
+\cs_new_protected:Npn \__nmc_delim_unary:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int } 
       { \__nmc_delim_stop: }
       {
         \__nmc_delim_append:
-        \tl_if_eq:VnT \l__nmc_C_tl { ^ }
-          {
-            \__nmc_delim_append:
+        \tl_if_head_is_group:VTF \l__nmcA_tl
+          { 
             \__nmc_delim_append_braced:
+            \__nmc_delim_stop:
           }
-        \__nmc_delim_arg:Nnn \l__nmc_delim_argi_tl { 1 } { #1 }
-        \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_delim_argi_tl
+          { 
+            \tl_if_eq:VnT \l__nmcC_tl { ^ }
+              {
+                \__nmc_delim_append:
+                \__nmc_delim_append_braced:
+              }
+            \__nmc_delim_arg:Nnn 
+                \l__nmc_delim_argi_tl { 1 } { \c__nmc_uny_int }
+            \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_delim_argi_tl
+            \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
+          }
       }
   }
 \cs_new_protected:Npn \__nmc_delim_power:
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_prn_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_prn_int } 
       { \__nmc_delim_stop: }
       { 
         \__nmc_delim_append:
@@ -2321,30 +2842,26 @@
   }
 \cs_new_protected:Npn \__nmc_delim_tfrac:
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_uny_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_uny_int } 
       { \__nmc_delim_stop: }
       { \__nmc_delim_append_twobraced: }
   }
 \cs_new_protected:Npn \__nmc_delim_frac: % also \(d)binom
   { 
-    \int_compare:nNnTF { \l__nmc_posi_int } = { 3 }
-      { \__nmc_delim_tfrac: }
-      {
-        \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
-          { \__nmc_delim_stop: }
-          { 
-            \__nmc_delim_append_twobraced:
-            \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
-          }
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int } 
+      { \__nmc_delim_stop: }
+      { 
+        \__nmc_delim_append_twobraced:
+        \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
       }
   }
 \cs_new_protected:Npn \__nmc_delim_unarybrace:
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int } 
       { \__nmc_delim_stop: }
       {
         \__nmc_delim_append:
-        \str_case:on \l__nmc_C_tl
+        \str_case:on \l__nmcC_tl
           {
             { * } { \__nmc_delim_append: }
             { [ } { \__nmc_delim_append_sqbra: }
@@ -2358,7 +2875,7 @@
   }
 \cs_new_protected:Npn \__nmc_delim_log:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int } 
       { \__nmc_delim_stop: }
       {
         \__nmc_delim_append: 
@@ -2365,34 +2882,41 @@
         \__nmc_delim_append: 
         \__nmc_delim_append_braced:
         \__nmc_delim_arg:Nnn \l__nmc_delim_argi_tl { 1 } { \c__nmc_uny_int }
-        \__nmc_accum_fn_parenth:NNn \l__nmc_delim_arg_tl 
+        \__nmc_accum_fn_parenth:NVn \l__nmc_delim_arg_tl 
             \l__nmc_delim_argi_tl {}
       }
   }
 \cs_new_protected:Npn \__nmc_delim_surd:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_uny_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_uny_int } 
       { \__nmc_delim_stop: }
       { 
         \__nmc_delim_append:
         \tl_clear:N \l__nmc_delim_argi_tl
-        \tl_if_eq:VnT \l__nmc_B_tl { \prod }
+        \tl_if_eq:VnT \l__nmcB_tl { \prod }
           { 
             \prg_replicate:nn { 2 } 
                 { \__nmc_delim_append: \__nmc_delim_append_braced: }
           }
-        \__nmc_delim_arg:Nnn \l__nmc_delim_argi_tl { 1 } { \c__nmc_srd_int }
-        \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_delim_argi_tl
-        \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
+        \tl_if_head_is_group:VTF \l__nmcA_tl
+          { 
+            \__nmc_delim_append_braced:
+            \__nmc_delim_stop:
+          }
+          {
+            \__nmc_delim_arg:Nnn \l__nmc_delim_argi_tl { 1 } { \c__nmc_srd_int }
+            \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_delim_argi_tl
+            \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
+          }
       }
   }
 \cs_new_protected:Npn \__nmc_delim_fact:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_prn_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_prn_int } 
       { \__nmc_delim_stop: }
       { 
         \__nmc_delim_append:
-        \tl_if_eq:VnT \l__nmc_C_tl { ! }
+        \tl_if_eq:VnT \l__nmcC_tl { ! }
           { \__nmc_delim_append: }
         \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
       }
@@ -2400,31 +2924,31 @@
 \cs_new_protected:Npn \__nmc_delim_cleave:
   { 
     \__nmc_next:
-    \tl_if_eq:VnTF \l__nmc_B_tl { \q } 
+    \tl_if_eq:VnTF \l__nmcB_tl { \q } 
       { \int_zero:N \l__nmc_delim_pos_int } % adhere
       { \bool_set_true:N \l__nmc_delim_stop_bool } % sever
   }
 \cs_new_protected:Npn \__nmc_delim_nary:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int } 
       { \__nmc_delim_stop: }
       {
         \__nmc_delim_append:
-        \__nmc_get_arg_LR:NNN ( \l__nmc_B_tl )
+        \__nmc_get_arg_LR:NNN ( \l__nmcB_tl )
         \__nmc_put_right_wrap:NnNn \l__nmc_delim_arg_tl 
-            { ( } \l__nmc_B_tl { ) }
+            { ( } \l__nmcB_tl { ) }
         \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
       }
   }
 \cs_new_protected:Npn \__nmc_delim_comma:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_cmp_int }
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_cmp_int }
       { \__nmc_delim_stop: }
       { \__nmc_delim_append: }
   }
 \cs_new_protected:Npn \__nmc_delim_sum:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int }
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int }
       { \__nmc_delim_stop: }
       {
         \__nmc_delim_append: 
@@ -2450,7 +2974,7 @@
 \cs_new_protected:Npn \__nmc_delim_absorb_ii:
   { 
     \__nmc_delim_absorb_i:
-    \str_case:VnT \l__nmc_B_tl
+    \str_case:VnT \l__nmcB_tl
       {
         { * } { }
         { [ } { \__nmc_get_arg_LR:NNN [ \l__nmc_toss_tl ] }
@@ -2460,7 +2984,7 @@
 \cs_new_protected:Npn \__nmc_delim_color:
   { 
     \__nmc_next:
-    \str_if_eq:VnT \l__nmc_C_tl { [ }
+    \str_if_eq:VnT \l__nmcC_tl { [ }
       { 
         \__nmc_next:
         \__nmc_get_arg_LR:NNN [ \l__nmc_toss_tl ]
@@ -2470,17 +2994,22 @@
 \cs_new_protected:Npn \__nmc_delim_font:
   { 
     \__nmc_next: \__nmc_next:
-    \tl_put_left:NV \l__nmc_A_tl \l__nmc_B_tl
-    \tl_set:Nx \l__nmc_C_tl { \tl_head:N \l__nmc_B_tl }
+    \tl_put_left:NV \l__nmcA_tl \l__nmcB_tl
+    \tl_set:Nx \l__nmcC_tl { \tl_head:N \l__nmcB_tl }
     \int_decr:N \l__nmc_delim_pos_int
   }
+\cs_new_protected:Npn \__nmc_delim_mkern:
+  {
+    \__nmc_delim_absorb:
+    \__nmc_fpify_mkern:
+  }
 \cs_new_protected:Npn \__nmc_delim_BE:
   {
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_cmp_int }
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_cmp_int }
       { \__nmc_delim_stop: }
       {
         \__nmc_next: \__nmc_next:
-        \str_if_in:VnTF \l__nmc_B_tl { alignat }
+        \str_if_in:VnTF \l__nmcB_tl { alignat }
           { \__nmc_next: }
         \tl_put_right:Nn \l__nmc_delim_arg_tl { \c_group_begin_token } 
         \__nmc_get_arg_LR:NNN \begin \l__nmc_delim_arg_tl \end
@@ -2490,18 +3019,18 @@
   }
 \cs_new_protected:Npn \__nmc_delim_cmd:
   { % \cmd { s O m O O }
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
+    \__nmc_if_pospas_gtr:nTF { \c__nmc_sum_int } 
       { \__nmc_delim_stop: }
       {
-        \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmc_C_tl
+        \tl_put_right:NV \l__nmc_delim_arg_tl \l__nmcC_tl
         \__nmc_next:
-        \tl_if_eq:VnT \l__nmc_C_tl { * }
+        \tl_if_eq:VnT \l__nmcC_tl { * }
           { \__nmc_next: }
         \tl_put_right:Nn \l__nmc_delim_arg_tl { * }
         \__nmc_delim_nmcfn_aux:NN [ ]
         \__nmc_next: 
         \tl_put_right:Nx 
-            \l__nmc_delim_arg_tl { { \exp_not:o \l__nmc_B_tl } }
+            \l__nmc_delim_arg_tl { { \exp_not:o \l__nmcB_tl } }
         \__nmc_delim_nmcfn_aux:NN [ ]
         \__nmc_delim_nmcfn_aux:NN [ ]
       }
@@ -2508,7 +3037,7 @@
   }
 \cs_new_protected:Npn \__nmc_delim_nmcfn_aux:NN #1#2
   {
-    \tl_if_eq:VnT \l__nmc_C_tl { [ }
+    \tl_if_eq:VnT \l__nmcC_tl { [ }
       {
         \__nmc_next:
         \tl_clear:N \l_tmpa_tl
@@ -2525,102 +3054,139 @@
     \tl_new:c { g__nmc_info_#1_tl } 
     \tl_gset:cn { g__nmc_info_#1_tl } { 0 }
   }
+\seq_new:N \l_nmc_info_seq
 \clist_new:N \g__nmc_info_proc_clist 
 \clist_gset:Nn \g__nmc_info_proc_clist { sum, prod }
-\cs_gset_protected:Npn \__nmc_info_initialize:
+
+\cs_set_protected:Npn \__nmc_info_initialize:
   { 
     \seq_clear:N \l_tmpa_seq
     \tl_set:Nn \l__nmc_dbg_idii_tl { process } 
     \clist_map_inline:Nn \g__nmc_info_proc_clist
       { 
-        \seq_put_right:Nx \l_tmpa_seq
+        \seq_put_right:Nx \l_nmc_info_seq
             { ##1~{ \use:c { g__nmc_info_##1_tl } } }
       }
-    \tl_set:Nx \l__nmc_dbg_vv_tl { \seq_use:Nn \l_tmpa_seq {,~} }
   }
-\cs_gset_protected:Npn \__nmc_info_process:
-  { \tl_set_eq:Nc \l_nmc_result_tl { g__nmc_info_\l_nmc_formula_tl _tl } 
+\cs_set_protected:Npn \__nmc_info_formula:
+  { \tl_clear:N \l__nmc_formula_dup_tl }
+
+\cs_set_protected:Npn \__nmc_info_process:
+  { 
+    \int_if_zero:nTF \l__nmc_dbg_int
+      {
+        \tl_set_eq:Nc \l__nmc_result_tl 
+            { g__nmc_info_\l__nmc_formula_tl _tl } 
+      }
+      { \tl_set:Nx \l__nmc_formula_tl { \seq_use:Nn \l_nmc_info_seq {,~} } }
   }
-\cs_gset_protected:Npn \__nmc_info_display:
+\cs_set_protected:Npn \__nmc_info_display:
   { 
-    \bool_if:NTF \l__nmc_num_only_bool
-      { \l_nmc_result_tl }
+    \tl_set_eq:NN \l__nmc_show_tl \l__nmc_result_tl
+    \bool_if:NF \l__nmc_num_only_bool
       {
-        \prop_if_in:NVTF \g__nmc_subst_misc_prop \l_nmc_formula_tl
+        \prop_if_in:NVTF \g__nmc_subst_misc_prop \l__nmc_formula_tl
           { 
-            \tl_if_empty:cT { g__nmc_info_\l_nmc_formula_tl _tl }
-              { \tl_set:Nn \l_nmc_result_tl { 0 } }
-            \tl_use:N \l_nmc_result_tl
-            \prop_get:NVN \g__nmc_subst_misc_prop \l_nmc_formula_tl \l_tmpb_tl
-            \ \l_tmpb_tl % pluralise?
-            \int_if_zero:nF { \l_nmc_result_tl - 1 } { s } 
+            \tl_if_empty:cT { g__nmc_info_\l__nmc_formula_tl _tl }
+              { \tl_set:Nn \l__nmc_show_tl { 0 } }
+            \prop_get:NVN \g__nmc_subst_misc_prop \l__nmc_formula_tl \l_tmpb_tl
+            \tl_put_right:Nn \l__nmc_show_tl { \  }
+            \tl_put_right:NV \l__nmc_show_tl \l_tmpb_tl % pluralise?
+            \int_if_zero:nF { \l__nmc_result_tl - 1 } 
+              { \tl_put_right:Nn \l__nmc_show_tl { s } }
             \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
           }
           {
-            \__nmc_error_where:n { \__nmc_verb:n {\nmcInfo}~command }
+            \__nmc_error_where:n { info~command }
             \__nmc_error_what:n 
-                { Unknown~process~\__nmc_verb:V \l_nmc_formula_tl\ in }
+                { Unknown~process~\__nmc_verb:N \l__nmc_formula_tl\ in }
           }
       }
+    \l__nmc_show_tl  
   }
 %%%%%%%%%%%%% user-defined macros %%%%%%%%%%%%%%%
 \clist_new:N \g__nmc_macros_clist
+\clist_new:N \l__nmc_macrosa_clist
+\clist_new:N \l__nmc_macrosb_clist
 \bool_new:N \l__nmc_macros_free_bool
 
 \nmc_define:NnN \nmcMacros { macros } \macros
 
-\cs_gset_protected:Npn \__nmc_macros_initialize:
-  {
-    \tl_set:Nn \l__nmc_dbg_idiii_tl { macros }
+\cs_set_protected:Npn \__nmc_macros_initialize:
+  { 
+    \tl_set:Nn \l__nmc_dbg_idii_tl { macros }
     \tl_set:Nn \l__nmc_dbg_idv_tl { stored }
+    \tl_set_eq:NN \l__nmc_multi_delim_tl \c__nmc_vv_delim_tl
   }
-\cs_gset_protected:Npn \__nmc_macros_vv_digest:N #1
-  { 
-    \__nmc_error_where:n {  \__nmc_verb:n { \nmcMacros }\ command }
-    \clist_set:No \l_tmpa_clist \l_nmc_formula_tl
-    \clist_clear:N \l_tmpb_clist
-    \clist_map_inline:Nn \l_tmpa_clist
+\cs_set_protected:Npn \__nmc_macros_vv_digest:N #1
+  {
+    \__nmc_error_where:n { macros~command }
+    \seq_set_split:NVV \l_tmpa_seq \l__nmc_multi_delim_tl \l__nmc_formula_tl
+    \clist_set:Nx \l__nmc_macrosa_clist { \seq_use:Nn \l_tmpa_seq {,} }
+    \clist_clear:N \l__nmc_macrosb_clist
+    \clist_map_inline:Nn \l__nmc_macrosa_clist
       { 
         \cs_if_exist:NTF ##1
-          {
-            \clist_put_right:Nx \l_tmpb_clist 
-                {\exp_not:N ##1 {~\exp_not:f ##1} } 
-          }
+          { \__nmc_storemacros:NN \l__nmc_macrosb_clist ##1 }
           { 
-            \__nmc_error_what:n { Undefined~macro~\__nmc_verb:n {##1}\ in } 
+            \__nmc_error_what:n { Undefined~macro~\__nmc_verb:n {##1}in }
             \clist_map_break:
           }
-      }
+      } 
     \bool_if:NF \g__nmc_error_bool
       {
-        \tl_set:No \l_nmc_formula_tl \l_tmpb_clist
+        \tl_set:No \l__nmc_formula_tl \l__nmc_macrosb_clist
         \__nmc_vv_digest:N #1
         \int_if_zero:nF \l__nmc_dbg_int
           { \__nmc_dbg_vv_view:n { 0 } }
-        \clist_set:No \l_tmpb_clist \l_nmc_formula_tl
+        \clist_set:No \l__nmc_macrosb_clist \l__nmc_formula_tl
       }
   }
-\cs_gset_protected:Npn \__nmc_macros_process:
+% https://tex.stackexchange.com/questions/683578/storing-the-unknown-contents-of-a-macro-in-a-clist
+% (thanks to David Carlisle) % #1 clist #2 macro
+\cs_new_protected:Npn \__nmc_storemacros:NN #1#2
   {
+    \ifcsname
+      \exp_after:wN \use_none:n \token_to_str:N #2~ code
+      \endcsname
+      \exp_after:wN\exp_after:wN\exp_after:wN \clist_put_right:Nn
+      \exp_after:wN\exp_after:wN\exp_after:wN #1
+      \exp_after:wN\exp_after:wN\exp_after:wN 
+        { 
+          \exp_after:wN\exp_after:wN\exp_after:wN #2
+            \exp_after:wN\exp_after:wN \exp_after:wN 
+          { 
+            \csname 
+            \exp_after:wN \use_none:n \token_to_str:N #2~ code
+            \endcsname 
+          } 
+        }
+    \else
+      \exp_after:wN \clist_put_right:Nn \exp_after:wN #1
+        \exp_after:wN { \exp_after:wN #2 \exp_after:wN { #2 } }
+    \fi
+  }
+\cs_set_protected:Npn \__nmc_macros_process:
+  { 
     \bool_if:NTF \l__nmc_macros_free_bool
-      { \__nmc_macros_deregister:N \l_tmpa_clist }
-      { \__nmc_macros_register:N \l_tmpb_clist  }
+      { \__nmc_macros_deregister:N \l__nmc_macrosa_clist }
+      { \__nmc_macros_register:N \l__nmc_macrosb_clist }
     \clist_gremove_duplicates:N \g__nmc_macros_clist
     \bool_if:NT \l__nmc_num_only_bool
-      { 
-        \tl_set:Nx \l_nmc_result_tl 
-            { \int_eval:n { \clist_count:N \g__nmc_macros_clist } }
-      }
+      { \tl_set:Nx \l__nmc_result_tl {\clist_count:N \g__nmc_macros_clist }}
   }
-\cs_gset:Npn \__nmc_macros_display:
-  { \bool_if:NT \l__nmc_num_only_bool { \l_nmc_result_tl } }
+\cs_set_protected:Npn \__nmc_macros_display:
+  {
+    \bool_if:NT \l__nmc_num_only_bool
+      { \l__nmc_result_tl }
+  }
 %%%%%%%%%%
-\cs_gset_protected:Npn \__nmc_macros_deregister:N #1
+\cs_new_protected:Npn \__nmc_macros_deregister:N #1
   {
     \clist_if_empty:NT #1 
       { 
         \clist_set_eq:NN #1 \g__nmc_macros_clist
-        \tl_set:No \l_nmc_formula_tl \g__nmc_macros_clist
+        \tl_set:No \l__nmc_formula_tl \g__nmc_macros_clist
       }
     \clist_map_inline:Nn #1
       { 
@@ -2632,12 +3198,12 @@
       }
     \__nmc_macros_reg_dbg_aux:Nn \c_true_bool { freed }
   }
-\cs_gset_protected:Npn \__nmc_macros_register:N #1
+\cs_new_protected:Npn \__nmc_macros_register:N #1
   { 
-    \__nmc_error_where:n { \__nmc_verb:n { \nmcMacros } }
+    \__nmc_error_where:n { macros~command }
     \clist_reverse:N #1
     \clist_map_inline:Nn #1
-      { 
+      {
         \__nmc_macros_reg_split:w ##1\q_stop
         \bool_if:NT \g__nmc_error_bool
           { \clist_map_break: }
@@ -2657,10 +3223,11 @@
       }
   }
 \cs_new_protected:Npn \__nmc_macros_reg_props:
-  {
-    \clist_gconcat:NNN \g__nmc_macros_clist \l_tmpa_clist \g__nmc_macros_clist
+  { 
+    \clist_gconcat:NNN \g__nmc_macros_clist 
+        \l__nmc_macrosa_clist \g__nmc_macros_clist
     \clist_remove_duplicates:N \g__nmc_macros_clist
-    \clist_map_inline:Nn \l_tmpa_clist
+    \clist_map_inline:Nn \l__nmc_macrosa_clist
       {
         \prop_get:NnN \l__nmc_subst_var_prop { ##1 } \l_tmpa_tl
         \prop_gput:Nno \g__nmc_subst_var_prop { ##1 } \l_tmpa_tl
@@ -2671,57 +3238,64 @@
   }
 \cs_new_protected:Npn \__nmc_macros_reg_dbg:
   {
-    \tl_if_empty:NTF \l_nmc_formula_tl
+    \tl_if_empty:NTF \l__nmc_formula_tl
       { 
         \__nmc_macros_reg_dbg_aux:Nn \c_true_bool { macros }
-        \clist_clear:N \l_tmpb_clist
+        \clist_clear:N \l__nmc_macrosb_clist
         \clist_map_inline:Nn \g__nmc_macros_clist 
-          { 
-            \clist_put_right:Nx \l_tmpb_clist 
-              { \exp_not:N ##1 {~\exp_not:f ##1} }
-          }
-        \tl_set:No \l_nmc_formula_tl \l_tmpb_clist
+          { \__nmc_storemacros:NN \l__nmc_macrosb_clist ##1 }
+        \tl_set:No \l__nmc_formula_tl \l__nmc_macrosb_clist
       }
       { \__nmc_macros_reg_dbg_aux:Nn \l__nmc_macros_free_bool { added } }
   }
 \cs_new_protected:Npn \__nmc_macros_reg_dbg_aux:Nn #1#2
   { 
-    \tl_set:Nn \l__nmc_dbg_idiii_tl { #2 }
-    \bool_if:NT #1
+    \tl_set:Nn \l__nmc_dbg_idii_tl { #2 }
+    \bool_if:nT { #1 || \seq_if_empty_p:N \l__nmc_vva_seq }
       { 
         \int_if_zero:nF { \l__nmc_dbg_int }
-          { \int_set:Nn \l__nmc_dbg_int { 3*5 } }
+          { \int_set:Nn \l__nmc_dbg_int { 2*5 } }
       }
     \seq_set_from_clist:NN \l__nmc_dbg_stored_seq \g__nmc_macros_clist 
-  }  
+  } 
 %%%%%%%%%%%% user-defined constants %%%%%%%%%%%%%
 \seq_new:N \g__nmc_consts_seq % all
 \seq_new:N \g__nmc_consts_vv_seq % multitok in vv-list
+\seq_new:N \l__nmc_constsa_seq
+\seq_new:N \l__nmc_constsb_seq
 \int_new:N \g__nmc_consts_vv_int % count multitok + 1
+\int_gincr:N \g__nmc_consts_vv_int % the +1 if zero
 \bool_new:N \l__nmc_consts_add_bool
+
 \nmc_define:NnN \nmcConstants { consts } \constants
 
-\cs_gset_protected:Npn \__nmc_consts_initialize:
+\cs_set_protected:Npn \__nmc_consts_initialize:
   {
-    \__nmc_error_where:n { \__nmc_verb:n { \nmcConstants } }
-    \tl_set:Nn \l__nmc_dbg_idiii_tl { added }
+    \tl_set:Nn \l__nmc_dbg_idii_tl { added }
     \tl_set:Nn \l__nmc_dbg_idv_tl { constants }
+    \tl_set_eq:NN \l__nmc_multi_delim_tl \c__nmc_vv_delim_tl
   }
-\cs_gset_protected:Npn \__nmc_consts_vv_digest:N #1
+\cs_set_protected:Npn \__nmc_consts_vv_digest:N #1
   { % #1=*reversed* vv-list
-    \bool_if:nT { !\l__nmc_consts_add_bool &&
-                  !\tl_if_empty_p:N \l_nmc_formula_tl }
+    \bool_if:nF 
+        { \l__nmc_consts_add_bool || \tl_if_empty_p:N \l__nmc_formula_tl }
       { \__nmc_consts_clear: }
-    \clist_set:NV \l_tmpa_clist \l_nmc_formula_tl
-    \clist_reverse:N \l_tmpa_clist
-    \clist_concat:NNN \l_tmpb_clist #1 \l_tmpa_clist
-    \__nmc_vv_digest:N \l_tmpb_clist
-    \clist_set:No \l_nmc_formula_tl \l_nmc_formula_tl
-    \clist_reverse:N \l_nmc_formula_tl
+    \seq_set_split:NVV \l__nmc_constsa_seq 
+        \l__nmc_multi_delim_tl \l__nmc_formula_tl
+    \seq_remove_all:Nn \l__nmc_constsa_seq {}
+    \seq_reverse:N \l__nmc_constsa_seq
+    \seq_concat:NNN \l__nmc_constsb_seq #1 \l__nmc_constsa_seq
+    \__nmc_vv_digest:N \l__nmc_constsb_seq
+    \seq_set_split:NVV \l__nmc_constsb_seq 
+        \l__nmc_multi_delim_tl \l__nmc_formula_tl
+    \seq_remove_all:Nn \l__nmc_constsb_seq {}
+    \seq_reverse:N \l__nmc_constsb_seq
+    \tl_set:Nx \l__nmc_formula_tl 
+        { \seq_use:NV \l__nmc_constsb_seq \c__nmc_vv_delim_tl }
     \int_if_zero:nF \l__nmc_dbg_int
-      { \__nmc_dbg_vv_view:n { \clist_count:N \l_tmpa_clist } }
+      { \__nmc_dbg_vv_view:n { \seq_count:N \l__nmc_constsa_seq } }
   }
-\cs_gset_protected:Npn \__nmc_consts_clear:
+\cs_new_protected:Npn \__nmc_consts_clear:
   {
     \seq_gclear:N \g__nmc_consts_vv_seq 
     \seq_map_inline:Nn \g__nmc_consts_seq
@@ -2731,330 +3305,368 @@
       }
     \seq_gclear:N \g__nmc_consts_seq
   }
-\cs_gset_protected:Npn \__nmc_consts_process:
+\cs_set_protected:Npn \__nmc_consts_process:
   { 
-    \tl_if_empty:NF \l_nmc_formula_tl
-      {
-        \seq_set_from_clist:NN \l_tmpa_seq \l_nmc_formula_tl
-        \seq_map_inline:Nn \l_tmpa_seq
+    \__nmc_error_where:n { constants~command }
+    \tl_if_empty:NF \l__nmc_formula_tl
+      { 
+        \seq_map_inline:Nn \l__nmc_constsb_seq
           { 
             \__nmc_split_eq:w ##1\q_stop
             \prop_get:NVN \l__nmc_subst_var_prop \l__nmc_eq_var_tl \l_tmpb_tl
-            \clist_pop:NN \l_tmpa_clist \l_tmpa_tl
+            \seq_pop:NN \l__nmc_constsa_seq \l_tmpa_tl
             \exp_last_unbraced:No\__nmc_split_eq:w \l_tmpa_tl\q_stop
             \int_compare:nNnTF { \tl_count:N \l__nmc_eq_var_tl } = { 1 }
               { 
                 \prop_gput:NVV \g__nmc_subst_var_prop 
                     \l__nmc_eq_var_tl \l_tmpb_tl
-                \tl_put_right:Nn \l__nmc_eq_var_tl { = }
-                \tl_put_right:NV \l__nmc_eq_var_tl \l_tmpb_tl
+                \tl_set:Nx \l_tmpa_tl 
+                    { \exp_not:o \l__nmc_eq_var_tl = \l_tmpb_tl }
               }
-              {
-                \tl_put_right:Nn \l__nmc_eq_var_tl { = }
+              { 
+                \tl_set:Nx \l_tmpb_tl { \fp_eval:n \l_tmpb_tl } % 1e2 => 100
                 \tl_set:Nx \l_tmpa_tl 
-                    { \exp_not:o\l__nmc_eq_var_tl { \fp_eval:n \l_tmpb_tl } }
-                \tl_put_right:NV \l__nmc_eq_var_tl \l_tmpb_tl
-                \seq_gput_right:NV \g__nmc_consts_vv_seq \l_tmpa_tl
+                    { \exp_not:o \l__nmc_eq_var_tl = \l_tmpb_tl }
+                \bool_if:NT \l__nmc_dec_comma_bool
+                  { \tl_replace_once:Nnn \l_tmpb_tl {.} {,} }
+                \tl_put_left:Nx \l_tmpb_tl { \exp_not:o \l__nmc_eq_var_tl = }
+                \seq_gput_right:NV \g__nmc_consts_vv_seq \l_tmpb_tl % ,
               }
-            \seq_gput_right:NV \g__nmc_consts_seq \l__nmc_eq_var_tl
+            \seq_gput_right:NV \g__nmc_consts_seq \l_tmpa_tl % . 
           }
         \int_gset:Nn \g__nmc_consts_vv_int
             { 1 + \seq_count:N \g__nmc_consts_vv_seq }
       }
-    \bool_if:nT 
-        { 
-          (\tl_if_empty_p:N \l_nmc_formula_tl) && 
-          (\int_compare_p:nNn { \l__nmc_dbg_int } = { 30 })
-        }
-      { \int_set:Nn \l__nmc_dbg_int { 5 } }
+    \int_compare:nNnT { \l__nmc_dbg_int } = { 30 }
+      {
+        \tl_if_empty:NT \l__nmc_formula_tl
+          { \int_set:Nn \l__nmc_dbg_int { \l__nmc_dbg_int / 2 } }
+        \seq_if_empty:NT \l__nmc_vva_seq 
+          { \int_set:Nn \l__nmc_dbg_int { \l__nmc_dbg_int / 3 } }
+      }
     \seq_set_eq:NN \l__nmc_dbg_stored_seq \g__nmc_consts_seq
     \bool_if:NT \l__nmc_num_only_bool
-      { 
-        \tl_set:Nx \l_nmc_result_tl 
-            { \int_eval:n { \seq_count:N \g__nmc_consts_seq }  }
-      }
+      { \tl_set:Nx \l__nmc_result_tl { \seq_count:N \g__nmc_consts_seq } }
   }
-\cs_gset_protected:Npn \__nmc_consts_display:
-  { \bool_if:NT \l__nmc_num_only_bool { \l_nmc_result_tl } }
-
+\cs_set_protected:Npn \__nmc_consts_display:
+  {
+    \bool_if:NT \l__nmc_num_only_bool
+      { \bool_if:NT \l__nmc_num_only_bool { \l__nmc_result_tl } }
+  }
 %%%%%%% save/retrieve results to/from file %%%%%%
 \tl_new:N \g__nmc_reuse_tl
-\tl_new:N \l__nmc_reuse_loaded_tl
-\bool_new:N \l__nmc_reuse_loaded_bool
+\bool_new:N \l__nmc_reuse_named_bool
+\bool_new:N \g__nmc_reuse_filed_bool
+\bool_new:N \g__nmc_reuse_defined_bool
+\tl_new:N \g__nmc_reuse_filed_tl
+\clist_new:N \g__nmc_reuse_exclude_clist
+\seq_new:N \g__nmc_reuse_names_seq
 \int_new:N \l__nmc_reuse_mode_int
 \ior_new:N \g__nmc_ior
 \iow_new:N \g__nmc_iow
 \tl_gset:Nn \g__nmc_reuse_filename_tl { .nmc }
 \tl_gput_left:NV \g__nmc_reuse_filename_tl \jobname
-% save last \eval-uation to \#1
+% save \g__nmc_reuse_tl from last \eval-uation etc to \#1
 \nmc_define:NnN \nmcReuse { reuse } \reuse
 
-\cs_gset_protected:Npn \__nmc_reuse_settings_digest:
+\cs_set_protected:Npn \__nmc_reuse_initialize:
+  { \tl_set:Nn \l__nmc_dbg_idiii_tl { saved } }
+\cs_set_protected:Npn \__nmc_reuse_process:
   { 
-    \tl_set:Nn \l__nmc_dbg_idii_tl { saved }
-    \__nmc_reuse_load: 
-  }
-\cs_gset_protected:Npn \__nmc_reuse_process:
-  {
-    \__nmc_error_where:n { \__nmc_verb:n { \nmcReuse }~command }
-    \tl_if_empty:NTF \l_nmc_formula_tl
-      {
+    \__nmc_error_where:n { reuse~command }
+    \__nmc_reuse_filed:
+    \tl_if_empty:NTF \l__nmc_formula_tl
+      { 
         \int_if_zero:nTF { 1 + \l__nmc_reuse_mode_int }
           { \__nmc_reuse_delete_all: }
-          { \__nmc_reuse_load: }
+          { \__nmc_reuse_define: }
       }
-      { \__nmc_reuse_mode:Nn \l_nmc_formula_tl { \l__nmc_reuse_mode_int } }
+      {
+        \int_case:nn \l__nmc_reuse_mode_int
+          {
+            { -1 } { \__nmc_reuse_delete_one:c \l__nmc_formula_tl }
+            { 0 } { \__nmc_reuse_save_one:c \l__nmc_formula_tl }
+            { 1 } 
+              { 
+                \__nmc_reuse_delete_one:c \l__nmc_formula_tl 
+                \__nmc_reuse_save_one:c \l__nmc_formula_tl 
+              }
+            { 2 } { \__nmc_reuse_load_one: }
+          }
+      }
+    \__nmc_reuse_view:Nn \l__nmc_formula_tl { \l__nmc_dbg_int }
+  }
+\cs_set_protected:Npn \__nmc_reuse_display:
+  {
     \bool_if:NT \l__nmc_num_only_bool
       { 
-        \tl_set:Nx \l_nmc_result_tl
-          { \int_eval:n { \clist_count:N \l__nmc_reuse_loaded_tl } }
+        \bool_if:NF \g__nmc_reuse_filed_bool
+          { \__nmc_reuse_filed: }
+        \clist_count:N \g__nmc_reuse_filed_tl
       }
-    \__nmc_reuse_dbg_display:Nn \l_nmc_formula_tl { \l__nmc_dbg_int }
   }
-\cs_gset_protected:Npn \__nmc_reuse_display:
-  { \bool_if:NT \l__nmc_num_only_bool { \l_nmc_result_tl } }
 %%%%%%%%%%
-\cs_new_protected:Npn \__nmc_reuse_load:
+\cs_new_protected:Npn \__nmc_reuse_filed:
   { 
-    \bool_if:NF \l__nmc_reuse_loaded_bool
+    \bool_gset_false:N \g__nmc_reuse_filed_bool
+    \file_get:VnNT \g__nmc_reuse_filename_tl {} \g__nmc_reuse_filed_tl
       { 
-        \file_get:VnNT \g__nmc_reuse_filename_tl {} \l_tmpa_tl
+        \bool_lazy_or:nnTF 
+            { \tl_if_empty_p:N \g__nmc_reuse_filed_tl }
+            { \tl_if_head_eq_meaning_p:VN \g__nmc_reuse_filed_tl \par }
+          { \tl_gclear:N \g__nmc_reuse_filed_tl }
           { 
-            \clist_set:No \l__nmc_reuse_loaded_tl \l_tmpa_tl
-            \bool_lazy_or:nnTF 
-                { \tl_if_blank_p:V \l__nmc_reuse_loaded_tl }
-                { \tl_if_head_eq_meaning_p:VN \l__nmc_reuse_loaded_tl \par }
-              { \tl_clear:N \l__nmc_reuse_loaded_tl }  
-              { 
-                \seq_set_split:NnV \l_tmpa_seq {,} \l__nmc_reuse_loaded_tl
-                \seq_map_inline:Nn \l_tmpa_seq
-                    { \__nmc_reuse_write_props:Nn ##1 }
-              }
+            \bool_gset_true:N \g__nmc_reuse_filed_bool 
+            \seq_gclear:N \g__nmc_reuse_names_seq
+            \clist_gclear:N \g__nmc_reuse_exclude_clist
+            \clist_gset:NV \g__nmc_reuse_filed_tl \g__nmc_reuse_filed_tl
+            \clist_map_inline:Nn \g__nmc_reuse_filed_tl
+              { \__nmc_reuse_names:Nn ##1 }
           }
-        \bool_set_true:N \l__nmc_reuse_loaded_bool
       }
-  } 
-\cs_new_protected:Npn \__nmc_reuse_mode:Nn #1#2
+  }
+\cs_new_protected:Npn \__nmc_reuse_names:Nn #1#2
   { 
-    \int_if_zero:nTF { 1 + #2 } % if #2=-1
-      { \__nmc_reuse_delete_one:c #1 }
-      {
-        \tl_if_empty:NTF \g__nmc_reuse_tl
-          { \__nmc_error_what:n  { No~result~available~for~\__nmc_verb:V #1\ in } }
-          { 
-            \exp_args:NNc \tl_set:Nn \l_tmpa_tl #1
-            \prop_if_in:NVTF \g__nmc_subst_var_prop \l_tmpa_tl
-              {
-                \int_if_zero:nTF { #2 }
-                  { \__nmc_reuse_already_def:N \l_nmc_formula_tl }
-                  { 
-                    \__nmc_reuse_delete_one:c #1 
-                    \__nmc_reuse_save:c #1
-                  }
-              }
-              { \__nmc_reuse_save:c #1 }
-        }
-      }
+    \seq_gput_right:Nn \g__nmc_reuse_names_seq #1
+    \cs_if_free:NF #1
+      { \clist_gput_right:Nn \g__nmc_reuse_exclude_clist #1 }
   }
-\cs_new_protected:Npn \__nmc_reuse_dbg_display:Nn #1#2
+\cs_new_protected:Npn \__nmc_reuse_define:
   {
-    \bool_if:nTF 
-        { 
-          !\int_if_zero_p:n { #2 } && 
-          ( \int_if_zero_p:n { 1 + \l__nmc_reuse_mode_int } 
-            || \tl_if_empty_p:N #1 ) 
-        }
-      {
-        \tl_set:Nx \l__nmc_dbg_vv_tl 
-            { \clist_use:Nn \l__nmc_reuse_loaded_tl {,~} }  
-      }
-      { \clist_pop:NN \l__nmc_reuse_loaded_tl \l__nmc_dbg_vv_tl }
+    \__nmc_error_where:n { \g__nmc_reuse_filename_tl }
+    \clist_map_inline:Nn \g__nmc_reuse_filed_tl
+      { \__nmc_reuse_gset:Nn ##1 }
+    \bool_gset_true:N \g__nmc_reuse_defined_bool
+    \seq_gpop:NN \g__nmc_error_where_seq \l_tmpa_tl
   }
-\cs_new_protected:Npn \__nmc_reuse_save:N #1
+\cs_new_protected:Npn \__nmc_reuse_gset:Nn #1#2
+  { \cs_if_free:NT #1 { \tl_gset:Nn #1 { #2 } } }
+%%%%%%%%%
+\cs_new_protected:Npn \__nmc_reuse_load_one:
+  { 
+    \clist_map_inline:Nn \g__nmc_reuse_filed_tl
+      { \__nmc_reuse_load_one:cNn  \l__nmc_formula_tl ##1 }
+  }
+\cs_new_protected:Npn \__nmc_reuse_load_one:NNn #1#2#3
   {
-    \__nmc_reuse_load:
-    \tl_set:Nn \l_tmpb_tl { #1 } 
-    \tl_put_right:Nx \l_tmpb_tl { { \exp_not:o \g__nmc_reuse_tl } }
-    \prop_get:NnNTF \l__nmc_subst_var_prop { #1 } \l_tmpa_tl
-      { \exp_last_unbraced:NV\__nmc_reuse_defcmds:Nn \l_tmpb_tl }
+    \tl_if_eq:nnT { #1 } { #2 } 
       { 
-        \cs_if_exist:NTF #1
-          { \__nmc_reuse_already_def:N \l_nmc_formula_tl }
-          { \exp_last_unbraced:NV\__nmc_reuse_defcmds:Nn \l_tmpb_tl }
+        \__nmc_reuse_gset:Nn #2 { #3 } 
+        \clist_map_break:
       }
   }
-\cs_generate_variant:Nn \__nmc_reuse_save:N { c }
-
-\cs_new_protected:Npn \__nmc_reuse_defcmds:Nn #1#2
-  { 
-    \tl_set_rescan:Nnn #1 { \ExplSyntaxOn } { #2 }
-    \__nmc_reuse_write_props:Nn #1{#2}
-    \tl_if_empty:NF \l__nmc_reuse_loaded_tl
-      { \__nmc_reuse_delete:N #1 }
-    \clist_put_left:Nn \l__nmc_reuse_loaded_tl { #1 {#2} }
-    \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
-    \str_set:NV \l_tmpa_str \l__nmc_reuse_loaded_tl
-    \iow_now:NV \g__nmc_iow \l_tmpa_str
-    \iow_close:N \g__nmc_iow
-  }
-\cs_new_protected:Npn \__nmc_reuse_write_props:Nn #1#2
+\cs_generate_variant:Nn \__nmc_reuse_load_one:NNn { c }
+\cs_new_protected:Npn \__nmc_reuse_delete_all:
   {
-    \prop_gput:Nnn \g__nmc_subst_var_prop { #1 } { #2 }
-    \tl_gset:Nn #1 { #2 }
-  }
-\cs_new_protected:Npn \__nmc_reuse_delete:N #1
-  {
-    \seq_clear:N \l_tmpb_seq
-    \seq_set_split:NnV \l_tmpa_seq {,} \l__nmc_reuse_loaded_tl
-    \seq_map_inline:Nn \l_tmpa_seq
+    \seq_map_inline:Nn \g__nmc_reuse_names_seq
       { 
-        \exp_args:No\str_if_eq:nnF { \use_i:nn ##1 } { #1 }
-          { \seq_put_right:Nn \l_tmpb_seq { ##1 } }
+        \clist_if_in:NnF \g__nmc_reuse_exclude_clist { ##1 }
+          { \cs_undefine:N ##1 }
       }
-    \tl_set:Nx \l__nmc_reuse_loaded_tl { \seq_use:Nn \l_tmpb_seq {,} }
+    \tl_gclear:N \g__nmc_reuse_filed_tl
+    \seq_gclear:N \g__nmc_reuse_names_seq
+    \clist_gclear:N \g__nmc_reuse_exclude_clist
+    \bool_gset_false:N \g__nmc_reuse_filed_bool
+    \bool_gset_false:N \g__nmc_reuse_defined_bool
+    \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
+    \iow_close:N \g__nmc_iow 
   }
-\cs_new_protected:Npn \__nmc_reuse_delete:Nn #1#2
-  { 
-    \prop_gremove:Nn \g__nmc_subst_var_prop { #1 }
-    \cs_undefine:N #1
-  }
 \cs_new_protected:Npn \__nmc_reuse_delete_one:N #1
   { 
-    \__nmc_reuse_load:
-    \tl_if_empty:NF \l__nmc_reuse_loaded_tl
-      { \__nmc_reuse_delete:N #1 }
-    \__nmc_reuse_delete:Nn #1 {}
+    \seq_gremove_all:Nn \g__nmc_reuse_names_seq { #1 }
+    \clist_gremove_all:Nn \g__nmc_reuse_exclude_clist { #1 }
+    \tl_gset:NV \g_tmpa_tl \g__nmc_reuse_filed_tl
+    \tl_gclear:N \g__nmc_reuse_filed_tl
+    \clist_map_inline:Nn \g_tmpa_tl
+      { \__nmc_reuse_undefine:NNn #1 ##1 }
     \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
-    \iow_now:NV \g__nmc_iow \l__nmc_reuse_loaded_tl
+    \iow_now:NV \g__nmc_iow \g__nmc_reuse_filed_tl
     \iow_close:N \g__nmc_iow
   }
 \cs_generate_variant:Nn \__nmc_reuse_delete_one:N { c }
 
-\cs_new_protected:Npn \__nmc_reuse_delete_all:
+\cs_new_protected:Npn \__nmc_reuse_undefine:NNn #1#2#3
+  { 
+    \tl_if_eq:nnTF { #1 } { #2 } 
+      { \cs_undefine:N #1 }
+      { \clist_gput_right:Nn \g__nmc_reuse_filed_tl { #2 { #3 } } }
+  }
+\cs_new_protected:Npn \__nmc_reuse_save_one:N #1
+  { 
+    \__nmc_reuse_check_name:N #1
+    \bool_if:nF { \g__nmc_error_bool || \l__nmc_reuse_named_bool }
+      { 
+        \tl_set:Nx \l_tmpa_tl { { \exp_not:o \g__nmc_reuse_tl } }
+        \tl_put_left:Nn \l_tmpa_tl { #1 }
+        \exp_last_unbraced:NV \tl_gset:Nn \l_tmpa_tl
+        \clist_gput_left:NV \g__nmc_reuse_filed_tl \l_tmpa_tl
+        \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
+        \str_set:NV \l_tmpa_str \g__nmc_reuse_filed_tl
+        \iow_now:NV \g__nmc_iow \l_tmpa_str
+        \iow_close:N \g__nmc_iow
+      }
+  }
+\cs_generate_variant:Nn \__nmc_reuse_save_one:N { c }
+
+\cs_new_protected:Npn \__nmc_reuse_check_name:N #1
   {
-    \__nmc_reuse_load:
-    \tl_if_empty:NF \l__nmc_reuse_loaded_tl
-      {
-        \seq_set_split:NnV \l_tmpa_seq {,} \l__nmc_reuse_loaded_tl
-        \seq_map_inline:Nn \l_tmpa_seq { \__nmc_reuse_delete:Nn ##1 }
-        \tl_clear:N \l__nmc_reuse_loaded_tl
+    \seq_if_in:NnTF \g__nmc_reuse_names_seq { #1 }
+      { 
+        \__nmc_error_where:n { \g__nmc_reuse_filename_tl }
+        \tl_set:Nx \l_tmpa_tl { { \exp_not:o \g__nmc_reuse_tl } }
+        \tl_put_left:Nn \l_tmpa_tl { #1 }
+        \str_if_in:NVTF \g__nmc_reuse_filed_tl \l_tmpa_tl
+          {
+            \exp_last_unbraced:NV \tl_gset:Nn \l_tmpa_tl
+            \bool_set_true:N \l__nmc_reuse_named_bool
+          }
+          { 
+            \tl_if_empty:NTF \g__nmc_reuse_tl
+              { 
+                \__nmc_reuse_load_one: 
+                \bool_set_true:N \l__nmc_reuse_named_bool
+                \__nmc_error_what:n 
+                    { Nothing~to~save~to~\__nmc_verb:n { #1 } in }
+              }
+              {  
+                \__nmc_error_what:n { Saved~value~for~\__nmc_verb:n {#1}
+                    already~exists~in~file }
+              }
+          }
+        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
       }
-    \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
-    \iow_close:N \g__nmc_iow  
+      { 
+        \tl_if_empty:NTF \g__nmc_reuse_tl
+          { \__nmc_error_what:n 
+              { Nothing~to~save~to~\__nmc_verb:n {#1} in } }
+          {
+            \cs_if_exist:NT #1
+              { 
+                \__nmc_error_what:n { \__nmc_verb:n { #1 }
+                    defined~elsewhere;~failed~save~in } 
+              }
+          }
+      }
   }
-\cs_new_protected:Npn \__nmc_reuse_already_def:N #1
-  { \__nmc_error_what:n { \__nmc_verb:c #1\ already~defined~in } }
+\cs_new_protected:Npn \__nmc_reuse_view:Nn #1#2
+  {
+    \tl_set:Nx \l__nmc_dbg_vv_tl 
+        { \clist_use:Nn \g__nmc_reuse_filed_tl {,~} }  
+  }
 %%%%%%%%%%%%%%%%%%% settings %%%%%%%%%%%%%%%%%%%%
+\bool_new:N \l__nmc_vv_settings_bool
+\bool_new:N \l__nmc_env_rbrace_bool
+\bool_new:N \l__nmc_num_spaces_bool
 \bool_new:N \l__nmc_multitok_bool
-\bool_new:N \l__nmc_vv_multline_bool
 \bool_new:N \l__nmc_deg_bool 
-\tl_new:N \l__nmc_eqn_num_tl
-\int_new:N \l__nmc_posi_int
-\int_set:Nn \l__nmc_posi_int { 1 }
-\int_new:N \l__nmc_eval_reuse_int
+\bool_new:N \l__nmc_sci_num_in_bool
+\int_new:N \l__nmc_see_force_int
+\tl_new:N  \l__nmc_sci_num_in_tl
+\tl_new:N \l__nmc_s_vv_tl
+\tl_new:N \l__nmc_multi_punc_tl
+\tl_new:N \l__nmc_env_rbrace_tl
+\tl_new:N \l__nmc_env_sp_rbrace_tl
+\tl_new:N \l__nmc_multi_sep_tl 
 \int_new:N \l__nmc_dbg_int
-\cs_new_protected:Npn \__nmc_dbg_int:nn #1#2
+\int_new:N  \l__nmc_prod_extra_int
+\int_new:N  \l__nmc_prod_query_int
+\regex_new:N  \l__nmc_num_regex
+
+\cs_new_protected:Npn \__nmc_num_spaces:n #1
+  {
+    \int_if_zero:nTF { #1 }
+      { \regex_set:Nn \l__nmc_num_regex { (\-?\d*[.,]?\d*) } }
+      { \regex_set:Nn \l__nmc_num_regex { (\-?[\s\d]*[.,]?[\s\d]*) } }
+    \bool_if:NT \l__nmc_sci_num_in_bool
+      { \exp_args:NV \__nmc_sci_num_in:nn \l__nmc_sci_num_in_tl { #1 } }
+  }
+\cs_set_protected:Npn \__nmc_sci_num_in:nn #1#2
   { 
-    \int_set:Nn \l__nmc_dbg_int 
-        { 
-          \int_compare:nNnTF { \int_abs:n { #1 } } = { 1 } 
-            { \int_sign:n { #1 }*#2 } { #1 } 
-        }
+    \int_if_zero:nTF { #2 }
+      { \regex_set:Nn \l__nmc_num_regex 
+            { (\-?\d*[.,]?\d*(?:#1\d+|#1\-\d+)?) } }
+      { \regex_set:Nn \l__nmc_num_regex 
+            { (\-?[\s\d]*[.,]?[\s\d]*(?:#1\d+|#1\-\d+)?) } }
   }
-\cs_new_protected:Npn \__nmc_set_trig_parsing:n #1
-  { % #1=1,2,3
-    \int_set:Nn \l__nmc_posi_int { #1 }
-    \int_compare:nNnTF { #1 } > { 1 }
-      { \int_set_eq:NN \l__nmc_trg_int \c__nmc_trg_int } % #1=2,3
-      { \int_set_eq:NN \l__nmc_trg_int \c__nmc_uny_int } % #1=1
+\cs_new_protected:Npn \__nmc_dbg_int:nn #1#2
+  {  
+    \int_compare:nNnTF { \int_abs:n { #1 } } = { 1 } 
+      {  \int_set:Nn \l__nmc_dbg_int { \int_sign:n { #1 }*#2 } }
+      {  \int_set:Nn \l__nmc_dbg_int { #1 } }
   }
 \cs_new:Npn \__nmc_int_to_bool:Nn #1#2
   { \bool_set:Nn #1 { !\int_if_zero_p:n { #2 } } }
 \cs_new:Npn \__nmc_deg:
   { \bool_if:NT { \l__nmc_deg_bool } { d } } 
-\keys_define:nn { numerica }
-  { 
-    rounding            .int_set:N = \l__nmc_round_int,
-    pad                    .code:n = \__nmc_int_to_bool:Nn
-                                       \l__nmc_pad_zeros_bool { #1 },
-    output-sci-notation    .code:n = \__nmc_int_to_bool:Nn
-                                       \l__nmc_sci_num_out_bool { #1 },
-    output-exponent-char .tl_set:N = \l__nmc_sci_num_out_tl,
-    input-sci-notation     .code:n = \__nmc_int_to_bool:Nn
-                                        \l__nmc_sci_num_in_bool { #1 },
-    input-exponent-char  .tl_set:N = \l__nmc_sci_num_in_tl,
-    multitoken-variables   .code:n = \__nmc_int_to_bool:Nn 
-                                       \l__nmc_multitok_bool { #1 },
-    use-degrees            .code:n = \__nmc_int_to_bool:Nn
-                                       \l__nmc_deg_bool { #1 },
-    logarithm-base       .tl_set:N = \l__nmc_log_base_tl,
-    intify-rounding      .tl_set:N = \l__nmc_intify_round_tl,
-    vv-display           .tl_set:N = \l__nmc_vv_display_tl,
-    vv-inline            .tl_set:N = \l__nmc_vv_inline_tl,
-    sum-extra-rounding  .int_set:N = \l__nmc_sum_extra_int,
-    sum-query-terms     .int_set:N = \l__nmc_sum_query_int,
-    prod-extra-rounding .int_set:N = \l__nmc_prod_extra_int,
-    prod-query-terms    .int_set:N = \l__nmc_prod_query_int,
-    eval-reuse          .int_set:N = \l__nmc_eval_reuse_int,
-%
-    rounding             .default:n = 6,
-    pad                  .default:n = 0, 
-    output-sci-notation  .default:n = 0,
-    output-exponent-char .default:n = e,
-    input-sci-notation   .default:n = 0,
-    input-exponent-char  .default:n = e,
-    multitoken-variables .default:n = 1,
-    use-degrees          .default:n = 0,
-    logarithm-base       .default:n = 10,
-    intify-rounding      .default:n = 14,
-    vv-display           .default:n = {,}\mskip 36mu minus 24mu(vv),
-    vv-inline            .default:n = {,}\mskip 12mu plus 6mu minus 9mu(vv),
-    sum-extra-rounding   .default:n = 2,
-    sum-query-terms      .default:n = 0,
-    prod-extra-rounding  .default:n = 2,
-    prod-query-terms     .default:n = 0,
-    eval-reuse           .default:n = 0,
-  }
-\keys_set_known:nn { numerica } 
-  { 
-    rounding,pad,output-sci-notation,output-exponent-char,
-    input-sci-notation,input-exponent-char,use-degrees,
-    multitoken-variables,logarithm-base,intify-rounding, 
-    vv-display,vv-inline,sum-extra-rounding,sum-query-terms,
-    prod-extra-rounding,prod-query-terms,eval-reuse
-  }
+\cs_new:Npn \__nmc_set_dead:n #1
+  { See~the~documentation;~\__nmc_verb:n {`#1'}~key~discontinued~in }
 \keys_define:nn { numerica/generic }
   {
-    dbg    .code:n = \__nmc_dbg_int:nn { #1 } { 2*3*5*7 },
-    dbg .initial:n = 0,
-    view   .code:n = \__nmc_dbg_int:nn { 1 } { 2*3*5*7 },
-    ^      .code:n = \bool_set_true:N \l__nmc_sci_num_in_bool
-                     \tl_set:Nn \l__nmc_sci_num_in_tl { #1 },
-    xx     .code:n = \__nmc_int_to_bool:Nn \l__nmc_multitok_bool { #1 },
-    ()     .code:n = \__nmc_set_trig_parsing:n { 2+\int_sign:n { #1-1 } },
-    ()  .initial:n = 0,
-    o      .code:n = \__nmc_int_to_bool:Nn \l__nmc_deg_bool { #1 },
-    o   .default:n = 1,
-    log  .tl_set:N = \l__nmc_log_base_tl,
-    vvmode .code:n = \__nmc_calc_mode:n { \int_sign:n { #1*#1 } },
-    vv@    .code:n = \__nmc_calc_mode:n { \int_sign:n { #1*#1 } },
-    vv@ .initial:n = 0,
-    vvd    .code:n = \tl_set:Nn \l__nmc_vv_display_tl { #1 }
-                     \tl_if_in:NnT \l__nmc_vv_display_tl { \\ }
-                       { \bool_set_true:N \l__nmc_vv_multline_bool },
-    vvi  .tl_set:N = \l__nmc_vv_inline_tl,
-    *      .code:n = \tl_set:Nn \l__nmc_eqn_num_tl { * },
-    S+  .int_set:N = \l__nmc_sum_extra_int,
-    S?  .int_set:N = \l__nmc_sum_query_int,
-    P+  .int_set:N = \l__nmc_prod_extra_int,
-    P?  .int_set:N = \l__nmc_prod_query_int,
+    dbg     .code:n = \__nmc_dbg_int:nn { #1 } { 2*3*5*7*11 },
+    dbg  .initial:n = 0,
+    ^       .code:n = \bool_set_true:N \l__nmc_sci_num_in_bool
+                      \tl_set:Nn \l__nmc_sci_num_in_tl { #1 }
+                      \__nmc_sci_num_in:nn { #1 } { 0 },
+    ^    .default:n = e,
+    xx      .code:n = \__nmc_int_to_bool:Nn \l__nmc_multitok_bool { #1 },
+    xx   .initial:n = 1,
+    ff    .tl_set:N = \l__nmc_multi_delim_tl,
+    ff   .default:V = \c__nmc_vv_delim_tl,
+    ff   .initial:n = \prg_do_nothing:,
+    1s2     .code:n = \__nmc_num_spaces:n { #1 },
+    1s2  .default:n = 1,
+    1s2  .initial:n = 0,
+    /min .int_set:N = \l__nmc_frac_denom_min_int,
+    /min .initial:n = 1,
+    /max .int_set:N = \l__nmc_frac_denom_max_int,
+    /max .initial:n = 200,
+    vvmode  .code:n = \__nmc_calc_mode:n { \int_if_zero:nTF { #1 }01 },
+    vv@     .code:n = \__nmc_calc_mode:n { \int_if_zero:nTF { #1 }01 },
+    vv@  .initial:n = 0,
+    o       .code:n = \__nmc_int_to_bool:Nn \l__nmc_deg_bool { #1 },
+    o    .default:n = 1,
+    o    .initial:n = 0,
+    log   .tl_set:N = \l__nmc_log_base_tl,
+    log  .initial:n = 10,
+    S+   .int_set:N = \l__nmc_sum_extra_int,
+    S+   .initial:n = 2,
+    S?   .int_set:N = \l__nmc_sum_query_int,
+    S?   .initial:n = 0,
+    P+   .int_set:N = \l__nmc_prod_extra_int,
+    P+   .initial:n = 2,
+    P?   .int_set:N = \l__nmc_prod_query_int,
+    P?   .initial:n = 0,
+%
+    env  .tl_set:N = \l__nmc_env_s_tl,
+    arg  .tl_set:N = \l__nmc_env_s_arg_tl,
+    eq   .tl_set:N = \l__nmc_s_equals_tl,
+    eq  .default:n = {=},
+    vvi    .code:n = \bool_set_true:N \l__nmc_vv_settings_bool
+                      \tl_set:Nn \l__nmc_s_vv_tl { #1 }, % deprecated
+    vvd    .code:n = \bool_set_true:N \l__nmc_vv_settings_bool
+                      \tl_set:Nn \l__nmc_s_vv_tl { #1 }, % deprecated
+    vv     .code:n = \bool_set_true:N \l__nmc_vv_settings_bool
+                      \tl_set:Nn \l__nmc_s_vv_tl { #1 },
+    pp   .tl_set:N = \l__nmc_multi_punc_tl,
+    pp  .default:n = {,},
+    sep  .tl_set:N = \l__nmc_s_multi_sep_tl,
+    \}    .code:n  = \tl_set:Nn \l__nmc_env_rbrace_tl { #1 }
+                     \bool_set_true:N \l__nmc_env_rbrace_bool,
+    \}  .default:n = \ \},
+    p    .tl_set:N = \l__nmc_punc_tl,
+    p   .default:n = {,},
+    f   .int_set:N = \l__nmc_see_force_int,
+    f   .initial:n = -1,
+%
+    ()    .code:n = \__nmc_error_what:n { \__nmc_set_dead:n { () } }
+                    \int_zero:N \l__nmc_dbg_int, 
+    reuse .code:n = \__nmc_error_what:n { \__nmc_set_dead:n { reuse } },
+    *     .code:n = \msg_warning:nnn {numerica} {base} 
+                { settings:~*~key~discontinued;~use~e.g.~env=multline* }
   }
-\keys_define:nn { numerica/eval }
-  { 
-    p      .tl_set:N = \l__nmc_punc_tl,
-    p     .default:n = {,},
-    reuse .int_set:N = \l__nmc_eval_reuse_int
-  }
+% display related
+\keys_define:nn { numerica/eval } 
+  { view    .code:n = \__nmc_dbg_int:nn { 1 } { 2*3*5*7*11 } }
 \keys_define:nn { numerica/info }
   { view .code:n = \__nmc_dbg_int:nn { 1 } { 2 } }
 \keys_define:nn { numerica/macros }
@@ -3069,13 +3681,22 @@
   } 
 \keys_define:nn { numerica/reuse }
   {
-    view   .code:n = \__nmc_dbg_int:nn { 1 } { 2 },
-    delete .code:n = \int_set:Nn \l__nmc_reuse_mode_int { -1 },
-    renew  .code:n = \int_set:Nn \l__nmc_reuse_mode_int { 1 }
+    view    .code:n = \__nmc_dbg_int:nn { 1 } { 3 },
+    delete  .code:n = \int_set:Nn \l__nmc_reuse_mode_int { -1 },
+    save    .code:n = \int_set:Nn \l__nmc_reuse_mode_int { 0 },
+    renew   .code:n = \int_set:Nn \l__nmc_reuse_mode_int { 1 },
+    load    .code:n = \int_set:Nn \l__nmc_reuse_mode_int { 2 }
   }
-\file_if_exist:nT { numerica.cfg }
-  { 
-    \file_get:nnN { numerica.cfg } {} \l_tmpa_tl
-    \exp_args:NnV \keys_set_known:nn { numerica } \l_tmpa_tl
-  }
-% end of file `numerica.sty'
\ No newline at end of file
+%%%%%%%%%%
+% for debugging \__nmc_fpify:nN & \__nmc_delim_arg:Nnn
+% A, B, C generated by \__nmc_next:
+% \ProvideDocumentCommand \abc {} 
+  % { 
+    % \exp_args:Nx \clist_show:n
+      % { 
+        % { A~=~\exp_not:o \l__nmcA_tl },
+        % { B~=~\exp_not:o \l__nmcB_tl },
+        % { C~=~\exp_not:o \l__nmcC_tl }
+      % }
+  % }
+% end of file `numerica.sty'



More information about the tex-live-commits mailing list.