🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #11583

Re: itma.sty and nfss problem

#11583
From: michael lawley
Date: Thu, 06 May 1993 00:53
70 lines
3681 bytes
gohlke@lise.physik.tu-berlin.de (Sven Gohlke) writes:
>In <D.LOVE.93May4182033@dlpx1.dl.ac.uk> d.love@dl.ac.uk (Dave Love) writes:

>You are using internal comands of the NFSS in Your itma.sty. Those comands
>are privat and they may change. So when the next release of the NFSS will
>be published Your new style may have to be rewritten. The best way is to
>write a new environment which uses only the exported commands or its own
>privat font selection. In Modula2 (or Oberon) You will find the same thing
>as `opaque' data types. It's a `save' way because You can change the NFSS
>as You like until You never change the global seen comands.

If you can show me how to do this with NFSS as it stands, I would be very
grateful.  As has been mentioned earlier, having to use
\begin{something}...\end{something}, or $\something ...$ all over the
document instead of just $...$ (and \[...\], eqnarrays etc) is not an
option.  Until then, the version of itmath.sty which I posted (and is
appended here in case some people missed it) does exactly what I, and
others, want.  It depends on exactly one internal command from NFSS and I
will be happy to rewrite it if, and when, a new release of NFSS breaks it.
(Perhaps someone in the know could pass on the necessary information about
NFSS2 so that I can write an itmath.sty which works under all versions.)

mike

------------------cut here--------------
%
% "itmath.sty" use cmr italic for letters in math mode and get the
%	       usual letter spacing of text mode.  Works both with,
%	       and without NFSS.
%
% 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

-- 
    michael lawley (lawley@cit.gu.EDU.AU).        The Unicycling Postgrad
    Phone: (BH) 875 5041
	   (AH) 846 1387
Technical Details
Message-ID: <lawley.736649597@citadel.cit.gu.edu.au>
Path: arc1-ca.pugleaf.net!gmd.de!ira.uka.de!howland.reston.ans.net!darwin.sura.net!sgiblab!munnari.oz.au!bunyip.cc.uq.oz.au!griffin!citadel!kurango!lawley
References: <C5IKu3.Krz@kurango.cit.gu.edu.au> <1qjqi4$dgm@mailgzrz.TU-Berlin.DE> <D.LOVE.93Apr28182313@dlpx1.dl.ac.uk> <1rrjro$e5f@mailgzrz.TU-Berlin.DE> <D.LOVE.93May4182033@dlpx1.dl.ac.uk> <1s6dgu$7dh@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-05-05 19:42:23 PST
Newsgroups: comp.text.tex,aus.tex
Path: arc1-ca.pugleaf.net!gmd.de!ira.uka.de!howland.reston.ans.net!darwin.sura.net!sgiblab!munnari.oz.au!bunyip.cc.uq.oz.au!griffin!citadel!kurango!lawley
From: lawley@kurango.cit.gu.edu.au (michael lawley)
Subject: Re: itma.sty and nfss problem
Message-ID: <lawley.736649597@citadel.cit.gu.edu.au>
Sender: news@citadel.cit.gu.edu.au
Organization: Griffith University.
References: <C5IKu3.Krz@kurango.cit.gu.edu.au> <1qjqi4$dgm@mailgzrz.TU-Berlin.DE>  <D.LOVE.93Apr28182313@dlpx1.dl.ac.uk>  <1rrjro$e5f@mailgzrz.TU-Berlin.DE> <D.LOVE.93May4182033@dlpx1.dl.ac.uk> <1s6dgu$7dh@mailgzrz.TU-Berlin.DE>
Date: Thu, 6 May 1993 00:53:17 GMT
Lines: 70