[texhax] Is redefining primitives a good idea?

Barbara Beeton bnb at ams.org
Wed Apr 25 00:17:14 CEST 2012


On Tue, 24 Apr 2012, Reinhard Kotucha wrote:

    On 2012-04-24 at 09:04:42 -0400, Michael Barr wrote:
    
     > IMHO, redefining primitives is a kind of vandalism, that the AMS
     > (and AFAIK only the AMS) does all too often.  They "undefined"
     > \over and its relatives (\overwithdelimiters,...) on the grounds (I
     > got this explanation from the late Michael Downes) that \over as
     > defined caused the engine to overwork because it could not know
     > which of the four possible font sizes to use until it was finished,
     > hence had to essentially use \mathchoice internally.  This may have
     > been a reason in 1990, but is no longer a reason today.  A book I
     > published then took about to tex; now it compiles in less than a
     > minute.
     > 
     > I was helping a colleague prepare a book for AMS publication and he
     > had used \over over and over.  Eventually, by delving deep into
     > amstex, I discovered that they had \let\over something else and
     > used that something else to define \frac.  So what this was was
     > discipline for the use of some future program that would replace
     > tex.  Some of those future programs now exist; I wonder whether
     > they have eliminated \over.

the preceding definitely refers to ams-latex.

     > Another thing the AMS has done is outlaw the use of the plain
     > \matrix and its relatives.  In a book I published in 2002, with the
     > AMS, there were dozens of instances of \pmatrix and the book
     > wouldn't compile under amstex.  I just copied Knuth's original
     > definition into my file.  But this cannot be done with primitives.

\pmatrix et al were redefined in amstex.  this
was then carried over into ams-latex.

     > Bottom line: it is a terrible thing to redefine or undefine
     > primitives.

    Michael, do you really mean amstex or are you talking about amslatex?
    As far as LaTeX is concerned, it has its own syntax and thus it's
    consequent to disable things which are not part of its specification.

i'm not michael, but i've investigated the
background via the relevant documentation,
some of which isn't public.

    Using non-LaTeX commands in LaTeX often cause a lot of trouble, at
    least unless you know _exactly_ what you are doing.

agreed.
i've already responded regarding the reasons
for changing how \eqno and \leqno behave.
						-- bb


More information about the texhax mailing list