%
%  File:	ITALIC.TEX
%
%  Author:	Hunter Goatley
%		goathunter@goatley.com
%
%  Date:	August 21, 1991
%
%  Abstract:
%
%	The macros \ital and \slant are defined to typeset tex in italic
%	(\it) and slanted (\sl) fonts, automatically inserting the italic
%	correction (\/) if necessary.  The correction is not inserted if
%	the token following the parameter is a period or a comma, as
%	suggested on page 14 of _The TeXbook_.
%
%	Based on the \predict macro presented in _TeX for the Impatient_,
%	p. 233.
%
%	These macros use \toks0 as a temporary.
%
%	The \futurelet\it@next in \ital and \slant defines \it@next to be
%	whatever the character following the parameter is.  \d@slant checks
%	to see if \it@next is a comma or period; if it is neither, the
%	italic correction (\/) is included.
%
\catcode`\@=11				% Temporarily make @ a letter
\def\ital#1{\toks0={#1}\let\slf@nt=\it\futurelet\it@next\d@slant}
\def\slant#1{\toks0={#1}\let\slf@nt=\sl\futurelet\it@next\d@slant}
\def\d@slant{{\slf@nt\the\toks0}%
	\ifx\it@next,%			% If \it@next is not a comma
	\else\ifx\it@next.%		% ... and is not a period
	\else\/%			% ... insert the correction (\/)
	\fi\fi%				% ...
	\let\it@next=\relax%		% "Undefine" \it@next
	}
\catcode`\@=12				% Reset @ as other
