2 % \iffalse meta-comment
4 % Copyright 1995, 1999 American Mathematical Society.
5 % Copyright 2016 LaTeX3 Project and American Mathematical Society.
7 % This work may be distributed and/or modified under the
8 % conditions of the LaTeX Project Public License, either version 1.3c
9 % of this license or (at your option) any later version.
10 % The latest version of this license is in
11 % http://www.latex-project.org/lppl.txt
12 % and version 1.3c or later is part of all distributions of LaTeX
13 % version 2005/12/01 or later.
15 % This work has the LPPL maintenance status `maintained'.
17 % The Current Maintainer of this work is the LaTeX3 Project.
23 \documentclass{amsdtx}
24 \def\MaintainedByLaTeXTeam#1{%
26 \fbox{\fbox{\begin{tabular}{@{}l@{}}%
27 This file is maintained by the \LaTeX{} Project team.\\%
28 Bug reports can be opened (category \texttt{#1}) at\\%
29 \url{http://latex-project.org/bugs.html}.\end{tabular}}}\end{center}}
31 \GetFileInfo{amsxtra.sty}
33 \title{The \pkg{amsxtra} package}
34 \author{American Mathematical Society\\Michael Downes}
35 \date{Version \fileversion, \filedate}
36 \DocInput{amsxtra.dtx}
42 % \MaintainedByLaTeXTeam{amslatex}
46 % \section{Introduction}
47 % The \pkg{amsxtra} package contains a few rarely used commands that
48 % were present in version 1.1 of the \pkg{amstex} package:
49 % \cn{fracwithdelims}, {accentedsymbol}, \cn{sphat}, \cn{spcheck},
50 % \cn{sptilde}, \cn{spdot}, \cn{spddot}, \cn{spdddot}, \cn{spbreve}.
51 % If any of these commands were used in existing documents, the
52 % \pkg{amsxtra} package provides a way to get them. But for 99\% of
53 % documents using the \pkg{amstex} package these commands are just
59 \ProvidesPackage{amsxtra}[1999/11/15 v1.2c AMS extra commands]
61 % We need to ensure that either the \pkg{amstex} package or the
62 % \pkg{amsmath} package is loaded. This means we need something a
63 % little more complicated than \cn{RequirePackage}.
65 \@ifpackageloaded{amstex}{}{%
66 \RequirePackage{amsmath}[1996/10/01 v1.2]}
69 % Superscripted accent characters.
71 \def\sphat{^{\mathchoice{}{}%
72 {\,\,\smash[b]{\hbox{\lower4\ex@\hbox{$\m@th\widehat{\null}$}}}}%
73 {\,\smash[b]{\hbox{\lower3\ex@\hbox{$\m@th\hat{\null}$}}}}}}
76 \def\spdot{^{\hbox{\raise\ex@\hbox{\normalfont .}}}}
77 \def\spddot{^{\hbox{\raise\ex@\hbox{\normalfont ..}}}}
78 \def\spdddot{^{\hbox{\raise\ex@\hbox{\normalfont...}}}}
79 \def\spbreve{^{\!\smash[b]{\hbox{\lower4\ex@\hbox{\u{}}}}}}
82 % The \cn{fracwithdelims} command is skipped if the base package is
83 % \pkg{amsmath}; it is only needed if the base package is
86 \@ifpackageloaded{amstex}{%
87 \def\fracwithdelims#1#2{\new@ifnextchar[{\fracwithdelims@#1#2}%
88 {\fracwithdelims@#1#2[\@empty]}}
89 \def\fracwithdelims@#1#2[#3]#4#5{\relax
90 \ifx\@empty#3{#4\overwithdelims#1#2#5}\else
91 {#4\abovewithdelims#1#2#3\relax#5}\fi}
95 % Perhaps |\accentedsymbol| should use |\newsavebox|, but I don't
96 % know of any compelling reason at the moment.[mjd,5-Sep-1994]
97 % |\accentedsymbol| can only produce a single size of
98 % the given symbol, so you'd need two different versions for main
99 % size and subscript size.
101 \def\accentedsymbol#1#2{%
103 \csname\expandafter\@gobble\string#1@box\endcsname
105 \csname\expandafter\@gobble\string#1@box\endcsname
109 \csname\expandafter\@gobble\string#1@box\endcsname{}}%
113 % Change the definition of \qc{\~} to automatically remove a
114 % preceding space as well as a following space, if present.
117 \DeclareRobustCommand{\nobreakspace}{\unskip\nobreak\ \ignorespaces}
120 % The usual \cs{endinput} to ensure that random garbage at the end of
121 % the file doesn't get copied by \fn{docstrip}.