%%% ====================================================================
%%%  @LaTeX-file{
%%%     filename        = "amsxtra.dtx",
%%%     version         = "1.2beta",
%%%     date            = "1994/10/27",
%%%     time            = "15:35:28 EDT",
%%%     author          = "American Mathematical Society",
%%%     copyright       = "Copyright (C) 1994 American Mathematical Society,
%%%                        all rights reserved.  Copying of this file is
%%%                        authorized only if either:
%%%                        (1) you make absolutely no changes to your copy,
%%%                        including name; OR
%%%                        (2) if you do make changes, you first rename it
%%%                        to some other name.",
%%%     address         = "American Mathematical Society,
%%%                        Technical Support,
%%%                        Electronic Products and Services,
%%%                        P. O. Box 6248,
%%%                        Providence, RI 02940,
%%%                        USA",
%%%     telephone       = "401-455-4080 or (in the USA and Canada)
%%%                        800-321-4AMS (321-4267)",
%%%     FAX             = "401-331-3842",
%%%     checksum        = "37192 132 515 5258",
%%%     email           = "tech-support@math.ams.org (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "latex, amslatex, ams-latex",
%%%     supported       = "yes",
%%%     abstract        = "This is part of the AMS-\LaTeX{} distribution.
%%%                        It contains some rarely used user-level commands",
%%%     docstring       = "The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%  }
%%% ====================================================================
%\iffalse
%<*driver>
\documentclass{amsdtx}
\begin{document}
\title{The \pkg{amsxtra} package}
\author{American Mathematical Society\\Michael Downes}
\date{Version \fileversion, \filedate}
\hDocInput{amsxtra.dtx}
\end{document}
%</driver>
%\fi
%
% \maketitle
%
% \MakeShortVerb\|
%
% \section{Introduction}
%    The \pkg{amsxtra} package contains a few rarely used commands that
%    were present in version 1.1 of the \pkg{amstex} package:
%    \cn{fracwithdelims}, {accentedsymbol}, \cn{sphat}, \cn{spcheck},
%    \cn{sptilde}, \cn{spdot}, \cn{spddot}, \cn{spdddot}, \cn{spbreve},
%    |@)))|, |@(((|. If any of
%    these commands were used in existing documents, the \pkg{amsxtra}
%    package provides a way to get them. But for 99\% of documents using
%    the \pkg{amstex} package these commands are just wasted overhead.
%
% \StopEventually{}
%
%    \begin{macrocode}
\ProvidesPackage{amsxtra}[1994/10/27 v1.2beta]
%    \end{macrocode}
%    Since we need some support functions from the \pkg{amstex} package,
%    we should make sure that it is loaded.
%    \begin{macrocode}
\RequirePackage{amstex}[1994/10/12 v1.2beta]
%    \end{macrocode}
%
%    Superscripted accent characters.
%    \begin{macrocode}
\def\sphat{^{\mathchoice{}{}%
 {\,\,\smash[b]{\hbox{\lower4\ex@\hbox{$\m@th\widehat{\null}$}}}}%
 {\,\smash[b]{\hbox{\lower3\ex@\hbox{$\m@th\hat{\null}$}}}}}}
\def\spcheck{^\vee}
\def\sptilde{^\sim}
\def\spdot{^{\hbox{\raise\ex@\hbox{\normalfont .}}}}
\def\spddot{^{\hbox{\raise\ex@\hbox{\normalfont ..}}}}
\def\spdddot{^{\hbox{\raise\ex@\hbox{\normalfont...}}}}
\def\spbreve{^{\!\smash[b]{\hbox{\lower4\ex@\hbox{\u{}}}}}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\fracwithdelims#1#2{\new@ifnextchar[{\fracwithdelims@#1#2}%
  {\fracwithdelims@#1#2[\@empty]}}
\def\fracwithdelims@#1#2[#3]#4#5{\relax
  \ifx\@empty#3{#4\overwithdelims#1#2#5}\else
  {#4\abovewithdelims#1#2#3\relax#5}\fi}
%    \end{macrocode}
%
%    Perhaps |\accentedsymbol| should use |\newsavebox|, but I don't
%    know of any compelling reason at the moment.[mjd,5-Sep-1994]
%    |\accentedsymbol| can only produce a single size of
%    the given symbol, so you'd need two different versions for main
%    size and subscript size.
%    \begin{macrocode}
\def\accentedsymbol#1#2{\expandafter\newbox\csname\expandafter
  \@gobble\string#1@box\endcsname
 \expandafter\setbox\csname\expandafter\@gobble
   \string#1@box\endcsname\hbox{$\m@th#2$}%
  \newcommand{#1}{%
    \expandafter\copy\csname\expandafter\@gobble\string#1@box
    \endcsname{}}%
}
%    \end{macrocode}
%
%    Variants of the two extensible arrows, using \verb|(| and \verb|)|
%    characters instead of \verb|<| and \verb|>| characters, are
%    provided for those whose keyboards don't have the latter.
%    \begin{macrocode}
\begingroup \catcode`\~=\active \lccode`\~=`\@
\lowercase{%
  \global\atdef@)#1)#2){~>#1>#2>}
  \global\atdef@(#1(#2({~<#1<#2<}
}% end lowercase
\endgroup
%    \end{macrocode}
%
%    The usual \cs{endinput} to ensure that random garbage at the end of
%    the file doesn't get copied by \fn{docstrip}.
%    \begin{macrocode}
\endinput
%    \end{macrocode}
%
% \CheckSum{116}
% \Finale
