summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/piff/ams.dtx
blob: 21eba8ad40cdbc7b552db903429bb351cff59e29 (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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
%    \iffalse meta-comment
%    \begin{macrocode}
%<*ams>
\def\fileversion{3.16}
\def\filedate{09 Jan 1996 13:53:56 BST}
\def\filename{ams.dtx}
\def\Copyright{Copyright (C) 1990,1995 Mike Piff, University of Sheffield, England}
%</ams>
%    \end{macrocode}
%
%You are not allowed to change this file.
%
%You are NOT ALLOWED to distribute this file alone.  You are NOT
%ALLOWED to take money for the distribution or use of this
%file except for a nominal charge for copying etc.
%
%Please address any problems to:
%
%M.Piff@sheffield.ac.uk
%
%For updates, contact your nearest CTAN site.
%
%    \fi
%
%    \CheckSum{139}
%
%    \title{Use of common American Mathematical Society fonts in \LaTeXe}
%    \author{Copyright (C) 1994 by Mike Piff}
%
%    \maketitle
%    \tableofcontents
%
%    \section{The documentation driver file}
%
%    This is the driver file that produces this documentation.
%    We use the document class provided by the \LaTeXe\ distribution
%    for producing the documentation.
%    \begin{macrocode}
%<*driver>
\documentclass[12pt]{ltxdoc}
\usepackage[defs]{ams}
\usepackage{verbatim}
\begin{document}
  \DocInput{ams.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%    \section{Introduction}
%
%    This package is a minimal one that allows access to the three
%    common AMS symbol font families.  To use it, you will need the
%    |amsfonts| package.
%
%    \section{User interface}
%
%    The package needs to be included with the command
%    \begin{verbatim}
%             \usepackage[defs]{ams}
%    \end{verbatim}
%    Its effect is to prepare the symbol fonts |msam| and |msbm|
%    and the fraktur font |eufm|.  Specification of option |defs|
%    causes all the usual AMS symbol definitions to be made.
%    For instance, after this one can obtain $\curvearrowright$ by
%    typing |$\curvearrowright$|.
%
%
%    \DescribeMacro{\Bbb}
%    \newcommand{\SF}{$\langle$\textit{sub-formula}$\rangle$}
%    The command |\Bbb{|\SF|}| typesets \SF\ in blackboard bold.
%    For instance, |\Bbb{ANYTHING}| produces \Bbb{ANYTHING}.
%    Care must be taken to ensure that \SF\ contains only uppercase
%    letters.  The math style modifier is |\mathbb|.
%
%    The commonest letters in mathematics are defined by the commands
%    |\C|, |\F|, |\N|, |\Q|, |\R|, |\T| and |\Z|, producing \C, \F,
%    \N, \Q, \R, \T, \Z\ respectively.
%
%    \DescribeMacro{\frak}
%    \DescribeMacro{\goth}
%    |\frak| and |\goth| are similar to |\Bbb| except that they use the
%    fractur font, and are not limited to uppercase. Thus |\frak{K}|
%    produces \frak{K}.  There is a math style modifier |\mathfrak| too.
%
%    |\Bbb|, |\frak| and |\goth| work in text and math modes.
%
%    \DescribeMacro{\MakeBbb}
%    The command |\MakeBbb{X}| has the effect of setting |\X| to expand
%    to |\Bbb{X}|, and thus further blackboard bold symbols are easily
%    defined.
%    \StopEventually{}
%
%
%    \section{Identification}
%
%    This package can only be used with \LaTeXe, so
%    an appropriate message is displayed when another
%    format is used.
%    \begin{macrocode}
%<*ams>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%    \end{macrocode}
%
%
%    Announce the package name and its version:
%    \begin{macrocode}
\ProvidesPackage{ams}[1996/01/09]
%    \end{macrocode}
%
%     And display it on the terminal (and the log file):
%    \begin{macrocode}
\typeout{Package `ams' <\filedate>.}
\typeout{\Copyright}
%    \end{macrocode}
%
%    \section{The definition option}
%
%    There is a single option |defs| that is recognized.
%    \begin{macrocode}
\DeclareOption{defs}{\AtEndOfPackage{\RequirePackage{amssymb}}}
\ProcessOptions
%    \end{macrocode}
%
%    \section{Defining the interface}
%
%    We load the |amsfonts| package.
%    \begin{macrocode}
\RequirePackage{amsfonts}
%    \end{macrocode}
%    We make |\Bbb|, |\goth| and |\frak| work in text mode too.
%    \begin{macrocode}
\def\frak#1{\ensuremath{\mathfrak{#1}}}
\def\Bbb#1{\ensuremath{\mathbb{#1}}}
\let\goth\frak
%    \end{macrocode}
%
%    The next command is a little trickier, but is worth the effort.
%    \begin{macrocode}
\def\MakeBbb#1{%
   \edef\tmp{%
      \noexpand\def\csname#1\endcsname
         {\noexpand\protect\csname p#1\endcsname}%
      \noexpand\def\csname p#1\endcsname
         {\noexpand\Bbb{#1}}%
   }%
   \tmp
}
%    \end{macrocode}
%    We can now define short forms of standard symbols.
%    \begin{macrocode}
\MakeBbb{C}
\MakeBbb{F}
\MakeBbb{N}
\MakeBbb{Q}
\MakeBbb{R}
\MakeBbb{T}
\MakeBbb{Z}
%    \end{macrocode}
%
%    We tell the user how to define all of the AMS symbols by name.
%    \begin{macrocode}
\typeout{Use option defs to define all the AMS symbol names}
%    \end{macrocode}
%
%    Another job is to replace the awful |cm| inequality symbols.
%    Thus, |a\leq b| will now produce $a\leq b$.  We also define the
%    symbols in package |latexsym|, but taking equivalents from the
%    AMS fonts. ($\mho$, $\Join$, $\Box$, $\Diamond$, $\leadsto$
%    $\sqsubset$, $\sqsupset$, $\lhd$, $\unlhd$, $\rhd$ and $\unrhd$.)
%    \begin{macrocode}
\let\leq\undefined  \let\geq\undefined
\DeclareMathSymbol{\leq}     {\mathrel}{AMSa}{"36}
\DeclareMathSymbol{\geq}     {\mathrel}{AMSa}{"3E}
\let\le\leq   \let\ge\geq
  \let\mho\undefined            \let\sqsupset\undefined
  \let\Join\undefined           \let\lhd\undefined
  \let\Box\undefined            \let\unlhd\undefined
  \let\Diamond\undefined        \let\rhd\undefined
  \let\leadsto\undefined        \let\unrhd\undefined
  \let\sqsubset\undefined

  \DeclareMathSymbol\mho     {\mathord}{AMSb}{"66}
  \DeclareMathSymbol\Box     {\mathord}{AMSa}{"03}
  \let\square\Box
  \DeclareMathSymbol\Diamond {\mathord}{AMSa}{"06}
  \DeclareMathSymbol\leadsto {\mathrel}{AMSa}{"20}
  \DeclareMathSymbol\sqsubset{\mathrel}{AMSa}{"40}
  \DeclareMathSymbol\sqsupset{\mathrel}{AMSa}{"41}
  \DeclareMathSymbol\lhd     {\mathrel}{AMSa}{"43}
  \DeclareMathSymbol\unlhd   {\mathrel}{AMSa}{"45}
  \DeclareMathSymbol\rhd     {\mathrel}{AMSa}{"42}
  \DeclareMathSymbol\unrhd   {\mathrel}{AMSa}{"44}
  \def\Join{\mathrel{{\rhd}\mkern-4mu{\lhd}}}
%</ams>
%    \end{macrocode}
%\section{The symbol definitions}
%
%Here is a listing of the definition file supplied by the AMS.
%Use the corresponding |\DeclareMathSymbol| line to define a single symbol.
%If you want all of them, use the |defs| package option.
%\verbatiminput{amssymb.sty}
%
% \Finale
%
\endinput
%