| 1 |
% |
| 2 |
% \iffalse meta-comment |
| 3 |
% |
| 4 |
% Copyright (C) 1995, 1999 American Mathematical Society. |
| 5 |
% Copyright (C) 2016-2025 LaTeX Project and American Mathematical Society. |
| 6 |
% |
| 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 |
% https://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. |
| 14 |
% |
| 15 |
% This work has the LPPL maintenance status `maintained'. |
| 16 |
% |
| 17 |
% The Current Maintainer of this work is the LaTeX Project. |
| 18 |
% |
| 19 |
% \fi |
| 20 |
% |
| 21 |
%\iffalse |
| 22 |
%<*driver> |
| 23 |
\documentclass{amsdtx} |
| 24 |
\def\MaintainedByLaTeXTeam#1{% |
| 25 |
\begin{center}% |
| 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{https://latex-project.org/bugs/}.\end{tabular}}}\end{center}} |
| 30 |
\usepackage{amsxtra} |
| 31 |
\GetFileInfo{amsxtra.sty} |
| 32 |
\begin{document} |
| 33 |
\title{The \pkg{amsxtra} package} |
| 34 |
\author{American Mathematical Society\\Michael Downes} |
| 35 |
\date{Version \fileversion, \filedate} |
| 36 |
\DocInput{amsxtra.dtx} |
| 37 |
\end{document} |
| 38 |
%</driver> |
| 39 |
%\fi |
| 40 |
% |
| 41 |
% \maketitle |
| 42 |
% \MaintainedByLaTeXTeam{amslatex} |
| 43 |
% |
| 44 |
% \MakeShortVerb\| |
| 45 |
% |
| 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 |
| 54 |
% wasted overhead. |
| 55 |
% |
| 56 |
% \MaybeStop{} |
| 57 |
% |
| 58 |
% \begin{macrocode} |
| 59 |
\ProvidesPackage{amsxtra}[1999/11/15 v1.2c AMS extra commands] |
| 60 |
% \end{macrocode} |
| 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}. |
| 64 |
% \begin{macrocode} |
| 65 |
\@ifpackageloaded{amstex}{}{% |
| 66 |
\RequirePackage{amsmath}[1996/10/01 v1.2]} |
| 67 |
% \end{macrocode} |
| 68 |
% |
| 69 |
% Superscripted accent characters. |
| 70 |
% \begin{macrocode} |
| 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}$}}}}}} |
| 74 |
\def\spcheck{^\vee} |
| 75 |
\def\sptilde{^\sim} |
| 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{}}}}}} |
| 80 |
% \end{macrocode} |
| 81 |
% |
| 82 |
% The \cn{fracwithdelims} command is skipped if the base package is |
| 83 |
% \pkg{amsmath}; it is only needed if the base package is |
| 84 |
% \pkg{amstex}. |
| 85 |
% \begin{macrocode} |
| 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} |
| 92 |
}{} |
| 93 |
% \end{macrocode} |
| 94 |
% |
| 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. |
| 100 |
% \begin{macrocode} |
| 101 |
\def\accentedsymbol#1#2{% |
| 102 |
\expandafter\newbox |
| 103 |
\csname\expandafter\@gobble\string#1@box\endcsname |
| 104 |
\expandafter\setbox |
| 105 |
\csname\expandafter\@gobble\string#1@box\endcsname |
| 106 |
\hbox{$\m@th#2$}% |
| 107 |
\newcommand{#1}{% |
| 108 |
\expandafter\copy |
| 109 |
\csname\expandafter\@gobble\string#1@box\endcsname{}}% |
| 110 |
} |
| 111 |
% \end{macrocode} |
| 112 |
% |
| 113 |
% Change the definition of \qc{\~} to automatically remove a |
| 114 |
% preceding space as well as a following space, if present. |
| 115 |
% \begin{macrocode} |
| 116 |
\def~{\nobreakspace} |
| 117 |
\DeclareRobustCommand{\nobreakspace}{\unskip\nobreak\ \ignorespaces} |
| 118 |
% \end{macrocode} |
| 119 |
% |
| 120 |
% The usual \cs{endinput} to ensure that random garbage at the end of |
| 121 |
% the file doesn't get copied by \fn{docstrip}. |
| 122 |
% \begin{macrocode} |
| 123 |
\endinput |
| 124 |
% \end{macrocode} |
| 125 |
% |
| 126 |
% \CheckSum{113} |
| 127 |
% \Finale |