changed itmath trickery to be compatible with NFSS (itmath.sty)
authornipkow
Tue, 23 Nov 1993 10:47:33 +0100
changeset 140 3a8c68d1d466
parent 139 4f83c0a0c3f4
child 141 a133921366cb
changed itmath trickery to be compatible with NFSS (itmath.sty)
doc-src/iman.sty
--- a/doc-src/iman.sty	Mon Nov 22 18:26:46 1993 +0100
+++ b/doc-src/iman.sty	Tue Nov 23 10:47:33 1993 +0100
@@ -142,18 +142,40 @@
 \def\@makeschapterhead#1{ { \parindent 0pt \raggedright 
  \@rulehead{#1} \par \nobreak \vskip 40pt } }
 
+% "itmath.sty" use cmr italic for letters in math mode and get the
+%	       usual letter spacing of text mode.
+%
+% Michael Lawley, April 1993
+% (lawley@cit.gu.edu.au)
+%
+% Derived from itma.sty (of unknown origin).
 %
 % MATHCODES
 %
 % The mathcodes for the letters A, ..., Z, a, ..., z are changed to
-% generate text italic font rather than math italic by default. This makes
+% generate text italic rather than math italic by default. This makes
 % multi-letter identifiers look better. The mathcode for character c
-% is set to "7000 (variable family) + "400 (text italic) + c.
-% See the TeXBook, page 154.
+% is set to "7000 (variable class) + "400 (text italic) + c.
+%
+% For NFSS the mathcode is "7000 (variable class) + (hex)\itfam + c
+% \itfam is probably equal to 7.
+%
+
+\ifx\undefined\hexnumber@
+  \def\hexnumber@#1{\ifcase#1 \z@
+  \or \@ne \or \tw@ \or \thr@@
+  \or 4\or 5\or 6\or 7\or 8\or
+  9\or A\or B\or C\or D\or E\or F\fi}
+\fi
 
 \def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
-	\loop \global\mathcode\count0=\count1 \ifnum \count0<#2
-	\advance\count0 by1 \advance\count1 by1 \repeat}}
+        \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
+        \advance\count0 by1 \advance\count1 by1 \repeat}}
+
+\edef\@tempa{\hexnumber@\itfam}
 
-\@setmcodes{`A}{`Z}{"7441}
-\@setmcodes{`a}{`z}{"7461}
+\@setmcodes{`A}{`Z}{"7\@tempa 41}
+\@setmcodes{`a}{`z}{"7\@tempa 61}
+
+\ifx\define@mathgroup\undefined\else
+	\define@mathgroup\mv@normal{\itfam}{cmr}{m}{it}\fi