The package amsmath
loads the package amsgen
which redefines \frenchspacing
as:
\def\frenchspacing{\sfcode`\.1006\sfcode`\?1005\sfcode`\!1004%
\sfcode`\:1003\sfcode`\;1002\sfcode`\,1001 }
The reason is explained in the file amsgen.dtx:
Change \frenchspacing
to ensure that
\@addpunct
will continue to work
properly even when ‘french’ spacing is
in effect.
You can see the effect of this redefinition in the following code (comment/uncomment the lines with \def\frenchspacing
to see the difference):
\documentclass{article}
\makeatletter
\def\@addpunct#1{\ifnum\spacefactor>\@m \else#1\fi}
\def\frenchspacing{\sfcode`\.1006\sfcode`\?1005\sfcode`\!1004 \sfcode`\:1003\sfcode`\;1002\sfcode`\,1001 }
%\def\frenchspacing{\sfcode `\.\@m \sfcode `\?\@m \sfcode `\!\@m \sfcode `\:\@m \sfcode `\;\@m \sfcode `\,\@m}
\makeatother
\frenchspacing
\begin{document}
\texttt{\meaning\frenchspacing}\par
\makeatletter
Title\@addpunct{.} Text\par
Title.\@addpunct{.} Text\par
Title,\@addpunct{.} Text\par
Title?\@addpunct{.} Text\par
Title!\@addpunct{.} Text\par
Title:\@addpunct{.} Text\par
Title;\@addpunct{.} Text\par
\makeatother
\end{document}
The \@addpunct
command only adds its argument if there wasn't a punctuation before it, which is useful to ensure that a punctuation is always present even if the user didn't provide it (in inline section titles, for example). This does not work if all the \sfcodes
of the punctuation are equal to 1000
so amsgen.sty
puts them to something bigger. The reason why the \sfcodes
are all different instead of all equal to 1001
is to be able to differentiate between all the punctuation signs if needed.