# [texhax] Sentence end after \uppercase

Mon Jan 1 23:33:43 CET 2007

On Mon, Jan 01, 2007 at 03:51:57PM -0500, Joel Salomon wrote:
> I want the end-of-sentence algorithm to see the original case of
> the letter inside the macro argument, not the upper case it's been
> forced to.

I see now.  Then what you need is to get the space factor of the last
letter in the argument of \uppercase.  Something like this:

------------------------------%<------------------------------
\def\uc#1{%
\setbox0=\hbox{#1\xdef\ucsf{\spacefactor\the\spacefactor}}%
\uppercase{#1}\ucsf
}%

\uppercase{m}. m\par
\uc{m}. m\par

\bigskip

\uppercase{M}. m\par
\uc{M}. m\par

\bye
------------------------------%<------------------------------

Best,
Oleg