summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex-dev/amsmath/amsxtra.dtx
blob: 2165dde41ad049a6cd8a41f3178ce706a691c003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
%
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
%   https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
% 
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
%
%\iffalse
%<*driver>
\documentclass{amsdtx}
\def\MaintainedByLaTeXTeam#1{%
\begin{center}%
\fbox{\fbox{\begin{tabular}{@{}l@{}}%
This file is maintained by the \LaTeX{} Project team.\\%
Bug reports can be opened (category \texttt{#1}) at\\%
\url{https://latex-project.org/bugs/}.\end{tabular}}}\end{center}}
\usepackage{amsxtra}
\GetFileInfo{amsxtra.sty}
\begin{document}
\title{The \pkg{amsxtra} package}
\author{American Mathematical Society\\Michael Downes}
\date{Version \fileversion, \filedate}
\DocInput{amsxtra.dtx}
\end{document}
%</driver>
%\fi
%
% \maketitle
% \MaintainedByLaTeXTeam{amslatex}
%
% \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}[1999/11/15 v1.2c AMS extra commands]
%    \end{macrocode}
%    We need to ensure that either the \pkg{amstex} package or the
%    \pkg{amsmath} package is loaded. This means we need something a
%    little more complicated than \cn{RequirePackage}.
%    \begin{macrocode}
\@ifpackageloaded{amstex}{}{%
  \RequirePackage{amsmath}[1996/10/01 v1.2]}
%    \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}
%
%    The \cn{fracwithdelims} command is skipped if the base package is
%    \pkg{amsmath}; it is only needed if the base package is
%    \pkg{amstex}.
%    \begin{macrocode}
\@ifpackageloaded{amstex}{%
\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}
%
%    Change the definition of \qc{\~} to automatically remove a
%    preceding space as well as a following space, if present.
%    \begin{macrocode}
\def~{\nobreakspace}
\DeclareRobustCommand{\nobreakspace}{\unskip\nobreak\ \ignorespaces}
%    \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{113}
% \Finale