X-Git-Url: https://git.distorted.org.uk/~mdw/mdwtools/blobdiff_plain/baa9f3563a25ec9040d59b44a86d62f4d9786258..456186fc35e79d0fffb05bb7165ccc7c08dc0d35:/mdwmath.dtx

diff --git a/mdwmath.dtx b/mdwmath.dtx
index 01be386..b77aff0 100644
--- a/mdwmath.dtx
+++ b/mdwmath.dtx
@@ -38,7 +38,7 @@
 %<+oldeqnarray>                [1996/04/11 1.1 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
@@ -119,8 +119,8 @@
 % Having just tried to do some simple things, I've found that there are maths
 % symbols missing.  Here they are, in all their glory:
 % \begin{center} \unverb\| \begin{tabular}{cl|cl|cl}
-% $\&$ & "\&"		& $\bitor$ & "\bitor"	& $\dbland$ & "\dbland" \\
-% $\bitand$ & "\bitand"	& $\dblor$ & "\dblor"	& 
+% $\&$ & "\&"           & $\bitor$ & "\bitor"   & $\dbland$ & "\dbland" \\
+% $\bitand$ & "\bitand" & $\dblor$ & "\dblor"   &
 % \end{tabular} \end{center}
 %
 % \DescribeMacro\xor
@@ -219,9 +219,9 @@
 % \DescribeMacro\negl
 % A few esoteric new operator names are supplied.
 % \begin{center} \unverb\| \begin{tabular}{cl|cl|cl}
-% $\keys$ & "\keys"	& $\dom$ & "\dom"	& $\ran$ & "\ran" \\
-% $\supp$ & "\supp"	& $\lcm$ & "\lcm"       & $\ord$ & "\ord" \\
-% $\poly$ & "\poly"	& $\negl$ & "\negl"
+% $\keys$ & "\keys"     & $\dom$ & "\dom"       & $\ran$ & "\ran" \\
+% $\supp$ & "\supp"     & $\lcm$ & "\lcm"       & $\ord$ & "\ord" \\
+% $\poly$ & "\poly"     & $\negl$ & "\negl"
 % \end{tabular} \end{center}
 % I think |\lcm| ought to be self-explanatory.  The |\dom| and |\ran|
 % operators pick out the domain and range of a function, respectively; thus,
@@ -286,6 +286,43 @@
 % 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
@@ -318,7 +355,7 @@
 % The types provided (and it's easy-ish to add more) are:
 %
 % \def\ch{\char`}
-% \begin{description} \def\makelabel{\hskip\labelsep\normalfont\ttfamily}
+% \begin{description} \setdescriptionlabel{\normalfont\ttfamily#1}
 % \item [r] Right aligned equation
 % \item [c] Centre-aligned equation
 % \item [l] Left aligned equation
@@ -360,7 +397,7 @@
 %
 % \begin{demo}[w]{Lots of equations}
 %\begin{eqnarray}[rl:rl:l]
-% V_i &= v_i - q_i v_j,	& X_i &= x_i - q_i x_j,	&
+% V_i &= v_i - q_i v_j, & X_i &= x_i - q_i x_j, &
 %       U_i = u_i, \qquad \mbox{for $i \ne j$}  \label{eq:A} \\
 % V_j &= v_j,           & X_j &= x_j            &
 %       U_j u_j + \sum_{i \ne j} q_i u_i.
@@ -506,7 +543,7 @@
 %
 % Now we need to do some more calculating (don't you hate it?).  As far as
 % Appendix~G is concerned, $\theta=h(y)=0$, because we want no rule over the
-% top.  
+% top.
 %
 %    \begin{macrocode}
   \@tempdima\ht\tw@%
@@ -1035,7 +1072,7 @@
 % \item |\hfill| glue to push the little rule to the end of the line.
 % \item A little square rule `\qedrule', with some small kerns around it.
 % \item A glue item to counter the effect of glue added at the paragraph
-%   boundary. 
+%   boundary.
 % \end{itemize}
 %
 % The vertical mode case is simpler, but less universal.  It copes with
@@ -1081,6 +1118,26 @@
 % \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
