🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #11578

No more funny spacing in math mode (was Re: itma.sty and nfss problem)

#11578
From: michael lawley
Date: Wed, 21 Apr 1993 04:57
71 lines
3254 bytes
gohlke@lise.physik.tu-berlin.de (Sven Gohlke) writes:

>In <C5IKu3.Krz@kurango.cit.gu.edu.au> rwt@kurango.cit.gu.edu.au (Rodney Topor) writes:

>>I am trying to use the LaTeX style file itma.sty, listed below, to display
>>all letters occurring in formulas in italic instead of math italic.
>>It works correctly with the old font selection scheme (and with SliTeX), 
>>but with the new font selection scheme (in LaTeX), commas appear as
>>semicolons in formulas, full stops as colons, and other characters 
>>also appear incorrectly.

>>Can anyone tell me the cause of this problem and how to cure it?

>You should never use the internal commands like '\define@mathgroup'. A
>better way to do is described in the manual to the NFSS. With the following
>lines you can define a new command '\itmath', which switch to the normal
>italic like $\itmath{asc}$.

>% itma.sty
>% clear for NFSS
>\newmathalphabet{\itmath}
>\addtoversion{normal}{\itmath}{cmr}{m}{it}
>\addtoversion{bold}{\itmath}{cmr}{bx}{it}
>\mathversion{normal}

But this just avoids the problem as it forces you to switch fonts every
time you enter math mode.  Here is a new style, itmath.sty, based on
itma.sty which does what Rodney was looking for and works both with and
without NFSS.

mike

-----------------------cut here-------------------
%
% "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 rather than math italic by default. This makes
% multi-letter identifiers look better. The mathcode for character c
% 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}}

\edef\@tempa{\hexnumber@\itfam}

\@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
Technical Details
Message-ID: <C5tHru.1v9@kurango.cit.gu.edu.au>
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!caen!batcomputer!munnari.oz.au!bunyip.cc.uq.oz.au!griffin!kurango!lawley
References: <C5IKu3.Krz@kurango.cit.gu.edu.au> <1qjqi4$dgm@mailgzrz.TU-Berlin.DE>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f9e16,64a2fa9ad29b7621
X-Google-Attributes: gidf9e16,public
X-Google-Thread: f4a99,64a2fa9ad29b7621
X-Google-Attributes: gidf4a99,public
X-Google-ArrivalTime: 1993-04-20 22:35:05 PST
Newsgroups: comp.text.tex,aus.tex
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!caen!batcomputer!munnari.oz.au!bunyip.cc.uq.oz.au!griffin!kurango!lawley
From: lawley@kurango.cit.gu.edu.au (michael lawley)
Subject: No more funny spacing in math mode (was Re: itma.sty and nfss problem)
Message-ID: <C5tHru.1v9@kurango.cit.gu.edu.au>
Organization: Griffith University.
References: <C5IKu3.Krz@kurango.cit.gu.edu.au> <1qjqi4$dgm@mailgzrz.TU-Berlin.DE>
Date: Wed, 21 Apr 1993 04:57:29 GMT
Lines: 72