-% \begin{meta-comment}
-%
-% $Id: mdwmath.dtx,v 1.2 2003/09/05 16:14:36 mdw Exp $
-%
-% Various nicer mathematical things
-%
-% (c) 2003 Mark Wooding
-%
-% \end{meta-comment}
-%
% \begin{meta-comment} <general public licence>
%%
%% mdwmath package -- various nicer mathematical things
-%% Copyright (c) 2003 Mark Wooding
+%% Copyright (c) 2003, 2020 Mark Wooding
%%
-%% This program is free software; you can redistribute it and/or modify
-%% it under the terms of the GNU General Public License as published by
-%% the Free Software Foundation; either version 2 of the License, or
-%% (at your option) any later version.
+%% This file is part of the `mdwtools' LaTeX package collection.
%%
-%% This program is distributed in the hope that it will be useful,
-%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-%% GNU General Public License for more details.
+%% `mdwtools' is free software: you can redistribute it and/or modify it
+%% under the terms of the GNU General Public License as published by the
+%% Free Software Foundation; either version 2 of the License, or (at your
+%% option) any later version.
+%%
+%% `mdwtools' is distributed in the hope that it will be useful, but
+%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%% General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
-%% along with this program; if not, write to the Free Software
-%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%% along with `mdwtools'. If not, write to the Free Software Foundation,
+%% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%%
% \end{meta-comment}
%
% \begin{meta-comment} <Package preamble>
%<+package>\NeedsTeXFormat{LaTeX2e}
%<+package>\ProvidesPackage{mdwmath}
-%<+package> [2003/08/25 1.3 Nice mathematical things]
+%<+package> [2020/09/06 1.14.0 Nice mathematical things]
%<+oldeqnarray>\NeedsTeXFormat{LaTeX2e}
%<+oldeqnarray>\ProvidesPackage{eqnarray}
-%<+oldeqnarray> [1996/04/11 1.1 Old enhanced eqnarray]
+%<+oldeqnarray> [2020/09/06 1.14.0 Old enhanced eqnarray]
% \end{meta-comment}
%
-% \CheckSum{729}
+% \CheckSum{740}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% This also sets |\qedsymbol| if it's not set already.
% \qed
%
+% \subsection{Punctuation in displays}
+%
+% It's conventional to follow displayed equations with the necessary
+% punctuation for them to fit into the surrounding prose. This isn't
+% universal: Ian Stewart says in the preface to the third edition of his
+% \emph{Galois Theory}:\footnote{^^A
+% Chapman \& Hall/CRC Mathematics, 2004; ISBN 1-58488-393-6.} ^^A
+% \begin{quote}
+% Along the way I made once change that may raise a few eyebrows. I have
+% spent much of my career telling students that written mathematics should
+% have punctuation as well as symbols. If a symbol or a formula would be
+% followed by a comma if it were replaced by a word or phrase, then it
+% should be followed by a comma; however strange the formula then looks.
+%
+% I still think that punctuation is essential for formulas in the main body
+% of the text. If the formula is $t^2 + 1$, say, then it should have its
+% terminating comma. But I have come to the conclusion that eliminating
+% visual junk from the printed page is more important than punctuatory
+% pedantry, so that when the same formula is \emph{displayed}, for example
+% \[ t^2 + 1 \]
+% then it looks silly if the comma is included, like this,
+% \[ t^2 + 1 \mpunct{,} \]
+% and everything is much cleaner and less ambiguous without punctuation.
+%
+% Purists will hate this, though many of them would not have noticed had I
+% not pointed it out here. Until recently, I would have agreed. But I
+% think it is time we accepted that the act of displaying a formula equips
+% it with \emph{implicit} (invisible) punctuation. This is the 21st
+% century, and typography has moved on.
+% \end{quote}%
+%
+% \DescribeMacro\mpunct
+% I tended to agree with Prof.\ Stewart, even before I read his preface; but
+% now I'm not so sure, and it's clear that we're in the minority. Therefore,
+% the command |\mpunct| sets its argument as text, a little distance from
+% the preceding mathematics.
+%
% \begin{ignore}
% There used to be an eqnarray here, but that's migrated its way into the
% \package{mdwtab} package. Maybe the original version, without dependency
% \end{macro}
% \end{macro}
%
+% \subsection{Punctuation in displays}
+%
+% \begin{macro}{\mpunct}
+%
+% This is actually a little more subtle than you'd expect. If the
+% \package{amstext} package is loaded, or something else has defined the
+% |\text| command, then we should use that; otherwise, just drop a box in and
+% hope for the best.
+%
+% \begin{macrocode}
+\def\mpunct#1{%
+ \,%
+ \ifx\text\@@undefined\hbox%
+ \else\expandafter\text\fi%
+ {#1}%
+}
+% \end{macrocode}
+%
+%\end{macro}
+%
% \begin{ignore}
% The following is the original definition of the enhanced eqnarray
% environment. It's not supported, although if you can figure out how to