Sie sind auf Seite 1von 3

Te

hni al notes on

AMS

AT X version 1.2
-L
E

Ameri an Mathemati al So iety


Mi hael Downes
De ember 1994
1

Introdu tion

These notes are mis ellaneous remarks on some te hni al questions that arose
during the work on version 1.2 of AMS-LATEX. We expe t to add more se tions
as further questions arise.
2

Why an't I use abbreviations for the

equation

environment?

Many users have dis overed to their dismay that when swit hing from ordinary
LATEX to the amsmath pa kage, they are no longer able to use abbreviations
su h as \beq \eeq for \begin{equation} \end{equation}. This has to do
with unfortunately nontrivial te hni al ompli ations: the environments su h as
align must read their ontents as a delimited ma ro argument be ause they do
multipass pro essing of the ontents using algorithms inherited from Spivak's
amstex.tex. The obvious solution|substitution of di erent algorithms that
do box shuing instead of token shuing for the multipass al ulations|would
require rewriting these display environments from the ground up; while that is a
worthy goal, it was beyond the original s ope of the AMS-LATEX proje t. Some
progress has in fa t been made on su h a solution [time of writing: January
1995, but not yet to the point of being ready for release.
3

The

upref

pa kage

The reason for splitting out the upref pa kage instead of automati ally in orporating it in the amsart and amsbook lasses is this: It involves low-level
surgery on an important LATEX ommand. This means that if ever this ommand hanges in the future (as it did between versions 2.09 and 2e of LATEX)
we have a maintenan e problem. And the bene t that upref provides is something that most users don't are mu h about. It an be used for in-house AMS
produ tion but it need not be in i ted on all users. Instead we leave the hoi e
to the individual user.
4

The

amsintx

pa kage

The amsintx pa kage is still in the experimental stage. The variety of notation
for integrals and sums is so great it's di ult to pi k one's way through all the
ompli ations.
1

2
5

TECHNICAL NOTES ON

AMS-LATEX VERSION 1.2

Depre ated and disallowed ommands

Certain ommands were moved out of amstex into amsxtra be ause they seemed
to be little-used reli s: \a entedsymbol, `sup a ents' (\sptilde, \sphat,
et .). The primitive ommands \over, \atop, \above were disallowed by the
amsmath pa kage when it superseded amstex (see below).
6

Hyphenation in the do umentation

Hyphenation was allowed for ertain long ommand names in amsldo .tex; this
presented te hni al di ulties be ause LATEX normally dea tivates hyphenation
for tt fonts. The method hosen to reinstate hyphenation was to turn o the
en oding-spe i fun tion \OT1+ mtt that disables the \hyphen har for tt fonts;
see the de nition of \allowtthyphens in amsdtx.dtx. Then a list of all tt words
in the do ument was gathered (from the .idx le, produ ed by the \ n, \fn,
\pkg, et . ommands) and \showhyphens was applied to this list. The result
was another list in the resulting TEX log, ontaining those words in a form
suitable for the argument of \hyphenation. That list was then edited by hand
to overrule undesirable hyphenations; words with a eptable hyphenations were
dropped from the list, as they don't need to be repeated there.
7

\matrix, \pmatrix, and \ ases stop working when I added


amsmath pa kage?

Why did
the

If you used the plain.tex versions of \matrix, \pmatrix, or \ ases in a do ument and then later onverted the do ument to use the amsmath pa kage (or
one of the AMS do ument lasses, whi h automati ally all the amsmath pa kage internally), the instan es of those ommands will produ e error messages.
The problem is that when LATEX was originally reated, it adopted most of its
mathemati s features straight from plain.tex. But in the ase of \matrix,
\pmatrix, \ ases this was a mistake|the plain.tex syntax for them is de idedly non-LATEX in style, for example the fa t that they use \ r instead of
\\ to mark line breaks, and they don't use \begin and \end. In basi LATEX
this mistake will be perpetuated at least until LATEX3 appears, in order to avoid
breaking existing do uments. But no existing do uments that were written with
the amsmath pa kage have that synta ti problem, as amsmath provides proper
LATEX-syntax versions of \matrix and the others. The possibility of optionally allowing the plain.tex variants to make do ument onversion easier seems
ill-advised sin e those variants are so blatantly wrong in a LATEX ontext.
8

Why did

\over, \atop, \above [. . . withdelims stop


amsmath pa kage?

working when I

added the

The six generalized fra tion ommands \over, \overwithdelims, \atop,


\atopwithdelims, \above, \abovewithdelims are expressly forbidden by the
amsmath pa kage; use of the re ommended forms \fra (and variants) is now
required, instead of merely re ommended. (I tend to onstrue LATEX's provision of \fra , and the la k of any mention in the LATEX book of the primitive
fra tion ommands, as an impli it injun tion against their use, although I don't

TECHNICAL NOTES ON

AMS-LATEX VERSION 1.2

think Lamport a tually spent a lot of time pondering the issue, and the basi
LATEX version of \fra provides a ess only to \over, not to \atop, \above, or
the withdelims variants.)
Not only is the unusual syntax of the TEX primitives rather out of pla e in
LATEX, but furthermore that syntax seems to be responsible for one of the most
signi ant aws in TEX's mathemati al typesetting apabilities: the fa t that
the urrent mathstyle at any given point in a math formula annot be determined until the end of the formula, be ause of the possibility that a following
generalized fra tion ommand will hange the mathstyle of the pre eding material. To ite two of the worst side e e ts: \math hoi e must a tually typeset
all four of its arguments, instead of being able to immediately sele t only one;
and, were it possible to always know the urrent math style at a given point,
math font sele tion would be greatly simpli ed and the upper limit of 16 di erent math font \fams would never be a problem as \text,s ript[s riptfont
assignments for any \fam ould take immediate e e t and therefore ould be
hanged arbitrarily often within a single formula. More on retely, math font
sele tion di ulties are responsible for many of the more onvoluted passages
in the sour e ode of LATEX's NFSS (that does font loading on demand) and of
the amsmath pa kage, and by extension it has histori ally been responsible for
signi ant delays in making new features available to end users and for making
those features more prone to bugs.
There are additional bad onsequen es following from the syntax of those
generalized fra tion ommands that only be ome evident when you do some
writing of nontrivial ma ros for math use. For example, as things urrently
stand you annot measure the size of any obje t in math without going through
\math hoi e and leaving and reentering math mode via \hbox{$ (whi h then
introdu es ompli ations regarding \everymath and \mathsurround). And it
seems that un ertainty about the urrent mathstyle is the only barrier to allowing the use of mu units with \vrule, to make verti al struts in onstru ting
ompound symbols or notation. And so on and so forth.

Das könnte Ihnen auch gefallen