% dec-comma.sty
%
% from a comp.text.tex post by david carlisle, of 1996-09-10

% makes ',' an ordinary Symbol in decimal numbers, but retains its use
% as a list separator.  more or less...  (see examples after \endinput)

\mathchardef\oc@omma="013B
\mathchardef\pc@mma=\the\mathcode`\,
\mathcode`\,="8000
{\catcode`\,=\active
\gdef,{\bgroup\obeyspaces\futurelet\reserved@a\sm@rtcomma}}
\def\sm@rtcomma{\expandafter\egroup
  \if\space\reserved@a\pc@mma\else\oc@omma\fi}

\endinput

example of use as comma in lists of mathematical things:

$a, b, c, \dots$ % note spaces after commas (not ordinarily needed in
                 % maths mode)

example of use as decimal point in numbers:

$x=2,5y^2$
