summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mathalfa/mathalfa.sty
blob: 6c5fe5d3eb14f2e85ba6da4c7dec0e4340c29a80 (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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mathalfa}[2012/03/15 mathalfa (mjs)]
\RequirePackage{xkeyval}
% available choices
\def\bb@lst{ams, lucida, mathpi, mma, mt, mth, pazo, fourier, esstix, boondox, px, tx, txof}
\def\cal@lst{cm, euler, rsfso, rsfs, lucida, mathpi, mma, mt, mtc, zapfc, esstix, boondox, boondoxo, dutchcal, pxtx, bickham}
\def\frak@lst{euler, lucida, mathpi, mma, mt, esstix, boondox, pxtx}
\def\scr@lst{rsfs, rsfso, euler, lucida, mathpi, mma, mtc, zapfc, esstix, boondox, boondoxo, dutchcal, pxtx, bickham}
\def\mathalfa@bbnr{-1}\def\mathalfa@calnr{-1}
\def\mathalfa@fraknr{-1}\def\mathalfa@scrnr{-1}
% scaled
\define@key{mathalfa}{scaled}[1.0]{\def\mathalfa@bbscaled{s*[#1]}\def\mathalfa@calscaled{s*[#1]}\def\mathalfa@frakscaled{s*[#1]}\def\mathalfa@scrscaled{s*[#1]}}% all at once
% or separately
\def\@cmd{}
\define@key{mathalfa}{bbscaled}[1.0]{\def\mathalfa@bbscaled{s*[#1]}}
\define@key{mathalfa}{calscaled}[1.0]{\def\mathalfa@calscaled{s*[#1]}}
\define@key{mathalfa}{frakscaled}[1.0]{\def\mathalfa@frakscaled{s*[#1]}}
\define@key{mathalfa}{scrscaled}[1.0]{\def\mathalfa@scrscaled{s*[#1]}}
% alphabets
\edef\@cmd{\noexpand\define@choicekey*{mathalfa}{bb}[\noexpand\mathalfa@val\noexpand\mathalfa@bbnr]{\bb@lst}{}}
\@cmd
\edef\@cmd{\noexpand\define@choicekey*{mathalfa}{cal}[\noexpand\mathalfa@val\noexpand\mathalfa@calnr]{\cal@lst}{}}
\@cmd
\edef\@cmd{\noexpand\define@choicekey*{mathalfa}{frak}[\noexpand\mathalfa@val\noexpand\mathalfa@fraknr]{\frak@lst}{}}
\@cmd
\edef\@cmd{\noexpand\define@choicekey*{mathalfa}{scr}[\noexpand\mathalfa@val\noexpand\mathalfa@scrnr]{\scr@lst}{}}
\@cmd
% showoptions
\DeclareOption{showoptions}{\PackageError{mathalfa}{Package Options:\MessageBreak bb=\bb@lst\MessageBreak cal=\cal@lst\MessageBreak frak=\frak@lst\MessageBreak scr=\scr@lst\MessageBreak bbscaled=1.0, calscaled=1.0, frakscaled=1.0, scrscaled=1.0}{}}
\DeclareOption*{%
  \begingroup
  \edef\x{\endgroup
    \noexpand\setkeys{mathalfa}{\CurrentOption}}%
  \x}
\ProcessOptions* % run \DeclareOption* on each option specified, in order
% Convert scaled choices to macros
\expandafter\ifx\csname mathalfa@bbscaled\endcsname\relax \let\mathalfa@bbscaled\@empty
\fi
\expandafter\ifx\csname mathalfa@calscaled\endcsname\relax \let\mathalfa@calscaled\@empty\fi
\expandafter\ifx\csname mathalfa@frakscaled\endcsname\relax \let\mathalfa@frakscaled\@empty\fi
\expandafter\ifx\csname mathalfa@scrscaled\endcsname\relax \let\mathalfa@scrscaled\@empty\fi
% Check for lucida loaded
\newif\iflucid@loaded \lucid@loadedfalse
\expandafter\ifx\csname DeclareLucidaFontShape\endcsname\relax\else\lucid@loadedtrue\fi% 
% Check for mtpro2 loaded
%\newif\ifmtp@loaded \mtp@loadedfalse
\def\mtp@loadedError{\PackageError{mathalfa}{You have already loaded the mtpro2 package. You should not use mathalfa to load additional mtpro2 options.}{}}%
% Check for amsfonts
\def\amsloaded{}
\@ifpackageloaded{amsfonts}{%
  \let\amsloaded=Y%
}{}%
% Code to set up the math alphabets specified, not necessarily using the fd files
% Blackboard Bold
\ifcase\mathalfa@bbnr\relax% item 0 of {ams, lucida, mathpi, mma, mt, mth, pazo, fourier, esstix, boondox, px, tx, txof}
  \DeclareFontFamily{U}{msb}{}%
  \DeclareFontShape{U}{msb}{m}{n}{<-7>\mathalfa@bbscaled msbm5
    <7-9>\mathalfa@bbscaled msbm7
    <9->\mathalfa@bbscaled msbm10}{}%
  \DeclareMathAlphabet{\mathbb}{U}{msb}{m}{n}
\or % lucida
  \iflucid@loaded \PackageError{mathalfa}{Do not use lucida as an option to mathalfa after loading a lucida package}{}\fi
%  \DeclareFontFamily{OMS}{lbm}{\skewchar\font48}
%  \DeclareFontShape{OMS}{lbm}{m}{n}{<->\mathalfa@bbscaled hlcry}{}
%  \DeclareFontShape{OMS}{lbm}{b}{n}{<->\mathalfa@bbscaled hlcdy}{}  
%  \DeclareMathAlphabet{\mathcal}  {OMS}{lbm}{m}{n}
%  \SetMathAlphabet{\mathcal}{bold}{OMS}{lbm}{b}{n}
%  \DeclareMathAlphabet{\mathbcal} {OMS}{lbm}{b}{n}
  \DeclareFontFamily{U}{hlcm}{}
  \DeclareFontShape{U}{hlcm}{m}{n}{<->\mathalfa@bbscaled hlcra}{}
  \DeclareMathAlphabet{\mathbb}{U}{hlcm}{m}{n}
\or % mathpi
  \DeclareFontFamily{U}{mathpibb}{\skewchar \font =45}
  \DeclareFontShape{U}{mathpibb}{m}{n}{
    <-> \mathalfa@bbscaled mathpibb}{}
  \DeclareMathAlphabet{\mathbb}{U}{mathpibb}{m}{n}
\or % mma
  \DeclareFontFamily{U}{mmambb}{\skewchar \font =45}
  \DeclareFontShape{U}{mmambb}{m}{n}{
    <-> \mathalfa@bbscaled  mmambb}{}
  \DeclareFontShape{U}{mmambb}{b}{n}{
    <-> \mathalfa@bbscaled  mmambbb}{}
  \DeclareMathAlphabet{\mathbb}{U}{mmambb}{m}{n}
  \SetMathAlphabet{\mathbb}{bold}{U}{mmambb}{b}{n}
  \DeclareMathAlphabet{\mathbbb} {U}{mmambb}{b}{n}
\or % mt
  \@ifpackageloaded{mtpro2}{\mtp@loadedError}{}
  \DeclareFontFamily{U}{mtbb}{\skewchar\font45}%
  \DeclareFontShape{U}{mtbb}{m}{n}{<-7>\mathalfa@bbscaled mt2bbf
    <7-9>\mathalfa@bbscaled mt2bbs
    <9->\mathalfa@bbscaled mt2bbt}{}%
  \DeclareFontShape{U}{mtbb}{b}{n}{<-7>\mathalfa@bbscaled mt2bbdf
    <7-9>\mathalfa@bbscaled mt2bbds
    <9->\mathalfa@bbscaled mt2bbdt}{}%
  \DeclareMathAlphabet{\mathbb}  {U}{mtbb}{m}{n}
  \SetMathAlphabet{\mathbb}{bold}{U}{mtbb}{b}{n}
  \DeclareMathAlphabet{\mathbbb} {U}{mtbb}{b}{n}
\or % mth--hollowed out letters with more shape---' Holey Roman'
  \@ifpackageloaded{mtpro2}{\mtp@loadedError}{}
  \DeclareFontFamily{U}{mthrb}{\skewchar\font45}%
  \DeclareFontShape{U}{mthrb}{m}{n}{<-7>\mathalfa@bbscaled mt2hrbf
    <7-9>\mathalfa@bbscaled mt2hrbs
    <9->\mathalfa@bbscaled mt2hrbt}{}%
  \DeclareFontShape{U}{mthrb}{b}{n}{<-7>\mathalfa@bbscaled mt2hrbdf
    <7-9>\mathalfa@bbscaled mt2hrbds
    <9->\mathalfa@bbscaled mt2hrbdt}{}%
  \DeclareMathAlphabet{\mathbb}  {U}{mthrb}{m}{n}
  \SetMathAlphabet{\mathbb}{bold}{U}{mthrb}{b}{n}
  \DeclareMathAlphabet{\mathbbb} {U}{mthrb}{b}{n}
\or % pazo
  \DeclareFontFamily{U}{fplmbb}{}
  \DeclareFontShape{U}{fplmbb}{m}{n}{
    <->\mathalfa@bbscaled fplmbb}{}
  \DeclareMathAlphabet{\mathbb}  {U}{fplmbb}{m}{n}
\or % fourier
  \DeclareFontFamily{U}{futm}{}
  \DeclareFontShape{U}{futm}{m}{n}{
    <-> \mathalfa@bbscaled fourier-bb}{}
  \DeclareMathAlphabet{\mathbb}{U}{futm}{m}{n}% should this be a symbol font?
\or % esstix
  \DeclareFontFamily{U}{esstixbb}{\skewchar \font =45}
  \DeclareFontShape{U}{esstixbb}{m}{n}{
    <-> \mathalfa@bbscaled esstixbb}{}
  \DeclareMathAlphabet{\mathbb}{U}{esstixbb}{m}{n}
\or %boondox
  \DeclareFontFamily{U}{BOONDOX-ds}{\skewchar \font =45}
  \DeclareFontShape{U}{BOONDOX-ds}{m}{n}{
    <-> \mathalfa@bbscaled  BOONDOX-r-ds}{}
  \DeclareFontShape{U}{BOONDOX-ds}{b}{n}{
    <-> \mathalfa@bbscaled  BOONDOX-b-ds}{}
  \DeclareMathAlphabet{\mathbb}{U}{BOONDOX-ds}{m}{n}
  \SetMathAlphabet{\mathbb}{bold}{U}{BOONDOX-ds}{b}{n}
  \DeclareMathAlphabet{\mathbbb} {U}{BOONDOX-ds}{b}{n}
\or %px
  \DeclareFontFamily{U}{px-math-ds}{\skewchar \font =45}% double-struck
  \DeclareFontShape{U}{px-math-ds}{m}{n}{
   <-> \mathalfa@bbscaled  pxr-ds}{}
  \DeclareFontShape{U}{px-math-ds}{b}{n}{
   <-> \mathalfa@bbscaled  pxb-ds}{}
  \DeclareMathAlphabet{\mathbb}{U}{px-math-ds}{m}{n}
  \SetMathAlphabet{\mathbb}{bold}{U}{px-math-ds}{b}{n}
  \DeclareMathAlphabet{\mathbbb} {U}{px-math-ds}{b}{n}
\or %tx
  \DeclareFontFamily{U}{tx-math-ds}{\skewchar \font =45}% double-struck
  \DeclareFontShape{U}{tx-math-ds}{m}{n}{
   <-> \mathalfa@bbscaled  txr-ds}{}
  \DeclareMathAlphabet{\mathbb}{U}{tx-math-ds}{m}{n}
\or %txof
  \DeclareFontFamily{U}{tx-math-of}{\skewchar \font =45}% openface
  \DeclareFontShape{U}{tx-math-of}{m}{n}{
   <-> \mathalfa@bbscaled  txr-of}{}
  \DeclareFontShape{U}{tx-math-of}{b}{n}{
   <-> \mathalfa@bbscaled  txb-of}{}
  \DeclareMathAlphabet{\mathbb}{U}{tx-math-of}{m}{n}
  \SetMathAlphabet{\mathbb}{bold}{U}{tx-math-of}{b}{n}
  \DeclareMathAlphabet{\mathbbb} {U}{tx-math-of}{b}{n}
\fi
% \mathcal
\ifcase\mathalfa@calnr\relax% item 0 of {cm, euler, rsfso, rsfs, lucida, mathpi, mma, mt, mtc, zapfc, esstix, boondox, boondoxo, dutchcal,pxtx,bickham}
  \DeclareFontFamily{U}{cmsy}{\skewchar\font48 }
  \DeclareFontShape{U}{cmsy}{m}{n}{%
      <-5.5>\mathalfa@calscaled cmsy5%
      <5.5-6.5>\mathalfa@calscaled cmsy6%
      <6.5-7.5>\mathalfa@calscaled cmsy7%
      <7.5-8.5>\mathalfa@calscaled cmsy8%
      <8.5-9.5>\mathalfa@calscaled cmsy9%
      <9.5->\mathalfa@calscaled cmsy10}{}
  \DeclareFontShape{U}{cmsy}{b}{n}{%
      <-5.5>\mathalfa@calscaled cmbsy5%
      <5.5-6.5>\mathalfa@calscaled cmbsy6%
      <6.5-7.5>\mathalfa@calscaled cmbsy7%
      <7.5-8.5>\mathalfa@calscaled cmbsy8%
      <8.5-9.5>\mathalfa@calscaled cmbsy9%
      <9.5->\mathalfa@calscaled cmbsy10}{}
  \DeclareMathAlphabet{\mathcal}  {U}{cmsy}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{U}{cmsy}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {U}{cmsy}{b}{n}
\or % euler
  \DeclareFontFamily{U}{eus}{\skewchar\font'60}
  \DeclareFontShape{U}{eus}{m}{n}{<-6>\mathalfa@calscaled eusm5
    <6-8>\mathalfa@calscaled eusm7
    <8->\mathalfa@calscaled eusm10}{}
  \DeclareFontShape{U}{eus}{b}{n}{<-6>\mathalfa@calscaled eusb5
    <6-8>\mathalfa@calscaled eusb7
    <8->\mathalfa@calscaled eusb10}{}
  \DeclareMathAlphabet{\mathcal}  {U}{eus}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{U}{eus}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {U}{eus}{b}{n}
\or % rsfso
   \DeclareFontFamily{U}{rsfso}{\skewchar \font =45}
   \DeclareFontShape{U}{rsfso}{m}{n}{
     <-6> \mathalfa@calscaled  rsfso5
     <6-8> \mathalfa@calscaled  rsfso7
     <8-> \mathalfa@calscaled  rsfso10}{}
   \DeclareMathAlphabet{\mathcal}{U}{rsfso}{m}{n}
\or % rsfs
   \DeclareFontFamily{U}{rsfs}{\skewchar\font127 }
   \DeclareFontShape{U}{rsfs}{m}{n}{%
     <-6>\mathalfa@calscaled rsfs5%
     <6-8>\mathalfa@calscaled rsfs7%
     <8->\mathalfa@calscaled rsfs10}{}
   \DeclareSymbolFont{rsfs}{U}{rsfs}{m}{n}
   \DeclareSymbolFontAlphabet{\mathcal}{rsfs}
\or % lucida
  \iflucid@loaded \PackageError{mathalfa}{Do not use lucida as an option to mathalfa after loading a lucida package}{}\fi
  \DeclareFontFamily{OMS}{lbm}{\skewchar\font48}
  \DeclareFontShape{OMS}{lbm}{m}{n}{<->\mathalfa@calscaled hlcry}{}
  \DeclareFontShape{OMS}{lbm}{b}{n}{<->\mathalfa@calscaled hlcdy}{}  
  \DeclareMathAlphabet{\mathcal}  {OMS}{lbm}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{OMS}{lbm}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {OMS}{lbm}{b}{n}
\or % mathpi
   \DeclareFontFamily{U}{mathpical}{\skewchar \font =45}
   \DeclareFontShape{U}{mathpical}{m}{n}{
     <-> \mathalfa@calscaled  mathpical}{}
   \DeclareMathAlphabet{\mathcal}{U}{mathpical}{m}{n}
\or % mma
   \DeclareFontFamily{U}{mmamcal}{\skewchar \font =45}
   \DeclareFontShape{U}{mmamcal}{m}{n}{
      <-> \mathalfa@calscaled  mmamcal}{}
   \DeclareFontShape{U}{mmamcal}{b}{n}{
      <-> \mathalfa@calscaled  mmambcal}{}
  \DeclareMathAlphabet{\mathcal}{U}{mmamcal}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{U}{mmamcal}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {U}{mmamcal}{b}{n}
\or % mt
   \@ifpackageloaded{mtpro2}{\mtp@loadedError}{}
   \DeclareFontFamily{U}{mt2ms}{\skewchar\font42}%
%   \DeclareFontShape{U}{mt2ms}{m}{n}{<-7>\mathalfa@calscaled mt2mcf%
%     <7-9>\mathalfa@calscaled mt2mcs%
%      <9->\mathalfa@calscaled mt2mct}{}%
   \DeclareFontShape{U}{mt2ms}{m}{it}{<-7>\mathalfa@calscaled mt2msf%
     <7-9>\mathalfa@calscaled mt2mss%
     <9->\mathalfa@calscaled mt2mst}{}%
   \DeclareFontShape{U}{mt2ms}{b}{it}{<-7>\mathalfa@calscaled mt2bmsf%
     <7-9>\mathalfa@calscaled mt2bmss%
     <9->\mathalfa@calscaled mt2bmst}{}%
   \DeclareMathAlphabet{\mathcal}  {U}{mt2ms}{m}{it}
   \SetMathAlphabet{\mathcal}{bold}{U}{mt2ms}{b}{it}
   \DeclareMathAlphabet{\mathbcal} {U}{mt2ms}{b}{it}  
\or % mtc
   \@ifpackageloaded{mtpro2}{\mtp@loadedError}{}
   \DeclareFontFamily{U}{mt2ms}{\skewchar\font42}%
   \DeclareFontShape{U}{mt2ms}{m}{n}{<-7>\mathalfa@calscaled mt2mcf%
     <7-9>\mathalfa@calscaled mt2mcs%
     <9->\mathalfa@calscaled mt2mct}{}%
   \DeclareMathAlphabet{\mathcal}  {U}{mt2ms}{m}{n}
\or % zapfc
  \DeclareFontFamily{U}{urwchancal}{\skewchar \font =45}
  \DeclareFontShape{U}{urwchancal}{m}{n}{%
     <-> \mathalfa@calscaled  urwchancal}{}
  \DeclareMathAlphabet{\mathcal}{U}{urwchancal}{m}{n}%
\or % esstix
   \DeclareFontFamily{U}{esstixcal}{\skewchar \font =45}
   \DeclareFontShape{U}{esstixcal}{m}{n}{
     <-> \mathalfa@calscaled  esstixcal}{}
   \DeclareMathAlphabet{\mathcal}{U}{esstixcal}{m}{n}
\or %boondox
  \DeclareFontFamily{U}{BOONDOX-cal}{\skewchar \font =45}
  \DeclareFontShape{U}{BOONDOX-cal}{m}{n}{
    <-> \mathalfa@calscaled  BOONDOX-r-cal}{}
  \DeclareFontShape{U}{BOONDOX-cal}{b}{n}{
    <-> \mathalfa@calscaled  BOONDOX-b-cal}{}
  \DeclareMathAlphabet{\mathcal}{U}{BOONDOX-cal}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{U}{BOONDOX-cal}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {U}{BOONDOX-cal}{b}{n}
\or %boondoxo
  \DeclareFontFamily{U}{BOONDOX-calo}{\skewchar \font =45}
  \DeclareFontShape{U}{BOONDOX-calo}{m}{n}{
    <-> \mathalfa@calscaled  BOONDOX-r-calo}{}
  \DeclareFontShape{U}{BOONDOX-calo}{b}{n}{
    <-> \mathalfa@calscaled  BOONDOX-b-calo}{}
  \DeclareMathAlphabet{\mathcal}{U}{BOONDOX-calo}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{U}{BOONDOX-calo}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {U}{BOONDOX-calo}{b}{n}
\or %dutchcal
  \DeclareFontFamily{U}{dutchcal}{\skewchar \font =45}
  \DeclareFontShape{U}{dutchcal}{m}{n}{
    <-> \mathalfa@calscaled  dutchcal-r}{}
  \DeclareFontShape{U}{dutchcal}{b}{n}{
    <-> \mathalfa@calscaled  dutchcal-b}{}
  \DeclareMathAlphabet{\mathcal}{U}{dutchcal}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{U}{dutchcal}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {U}{dutchcal}{b}{n}
\or %pxtx
  \DeclareFontFamily{U}{txcal}{\skewchar \font =45}
  \DeclareFontShape{U}{txcal}{m}{n}{
    <-> \mathalfa@calscaled  txr-cal}{}
  \DeclareFontShape{U}{txcal}{b}{n}{
    <-> \mathalfa@calscaled  txb-cal}{}
  \DeclareMathAlphabet{\mathcal}{U}{txcal}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{U}{txcal}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {U}{txcal}{b}{n}
\or %bickham
  \DeclareFontFamily{U}{bickhamcal}{\skewchar \font =45}
  \DeclareFontShape{U}{bickhamcal}{m}{n}{
    <-> \mathalfa@calscaled  bickham-r}{}
  \DeclareFontShape{U}{bickhamcal}{b}{n}{
    <-> \mathalfa@calscaled  bickham-b}{}
  \DeclareMathAlphabet{\mathcal}{U}{bickhamcal}{m}{n}
  \SetMathAlphabet{\mathcal}{bold}{U}{bickhamcal}{b}{n}
  \DeclareMathAlphabet{\mathbcal} {U}{bickhamcal}{b}{n}
\fi
% \mathfrak
\ifcase\mathalfa@fraknr\relax% item 0 of {euler, lucida, mathpi, mma, mt, esstix, boondox, pxtx}
  \DeclareFontFamily{U}{euf}{}%
  \DeclareFontShape{U}{euf}{m}{n}{<-7>\mathalfa@frakscaled eufm5
     <7-9>\mathalfa@frakscaled eufm7
     <9->\mathalfa@frakscaled eufm10}{}%
  \DeclareFontShape{U}{euf}{b}{n}{<-7>\mathalfa@frakscaled eufb5
     <7-9>\mathalfa@frakscaled eufb7
     <9->\mathalfa@frakscaled eufb10}{}%
  \DeclareMathAlphabet{\mathfrak}{U}{euf}{m}{n}
  \SetMathAlphabet{\mathfrak}{bold}{U}{euf}{b}{n}
  \DeclareMathAlphabet{\mathbfrak}{U}{euf}{b}{n}
\or % lucida
  \iflucid@loaded \PackageError{mathalfa}{Do not use lucida as an option to mathalfa after loading a lucida package}{}\fi
  \DeclareFontFamily{U}{hlcf}{}
  \DeclareFontShape{U}{hlcf}{m}{n}{<->\mathalfa@frakscaled hlcrf8r}{}
  \DeclareMathAlphabet{\mathfrak}{U}{hlcf}{m}{n}
\or % mathpi
  \DeclareFontFamily{U}{mathpifrak}{\skewchar \font =45}
  \DeclareFontShape{U}{mathpifrak}{m}{n}{
    <-> \mathalfa@frakscaled mathpifrak}{}
  \DeclareMathAlphabet{\mathfrak}{U}{mathpifrak}{m}{n}
\or % mma
  \DeclareFontFamily{U}{mmamfrak}{\skewchar \font =45}
  \DeclareFontShape{U}{mmamfrak}{m}{n}{
    <-> \mathalfa@frakscaled  mmamfrak}{}
  \DeclareFontShape{U}{mmamfrak}{b}{n}{
    <-> \mathalfa@frakscaled  mmambfrak}{}
  \DeclareMathAlphabet{\mathfrak}{U}{mmamfrak}{m}{n}
  \SetMathAlphabet{\mathfrak}{bold}{U}{mmamfrak}{b}{n}
  \DeclareMathAlphabet{\mathbfrak}{U}{mmamfrak}{b}{n}
\or % mt
  %\@ifpackageloaded{mtpro2}{\mtp@loadedError}{} %allow use with mtpro2
  \DeclareFontFamily{U}{mt2mf}{}%
  \DeclareFontShape{U}{mt2mf}{m}{n}{<-7>\mathalfa@frakscaled mt2mff%
    <7-9>\mathalfa@frakscaled mt2mfs%
    <9->\mathalfa@frakscaled mt2mft}{}%
  \DeclareFontShape{U}{mt2mf}{b}{n}{<-7>\mathalfa@frakscaled mt2bmff%
    <7-9>\mathalfa@frakscaled mt2bmfs%
    <9->\mathalfa@frakscaled mt2bmft}{}%
  \DeclareMathAlphabet{\mathfrak}{U}{mt2mf}{m}{n}
  \SetMathAlphabet{\mathfrak}{bold}{U}{mt2mf}{b}{n}
  \DeclareMathAlphabet{\mathbfrak}{U}{mt2mf}{b}{n}
\or % esstix
  \DeclareFontFamily{U}{esstixfrak}{\skewchar \font =45}
  \DeclareFontShape{U}{esstixfrak}{m}{n}{
    <-> \mathalfa@frakscaled esstixfrak}{}
  \DeclareMathAlphabet{\mathfrak}{U}{esstixfrak}{m}{n}
\or % boondox
  \DeclareFontFamily{U}{BOONDOX-frak}{\skewchar \font =45}
  \DeclareFontShape{U}{BOONDOX-frak}{m}{n}{
    <-> \mathalfa@frakscaled  BOONDOX-r-frak}{}
  \DeclareFontShape{U}{BOONDOX-frak}{b}{n}{
    <-> \mathalfa@frakscaled  BOONDOX-b-frak}{}
  \DeclareMathAlphabet{\mathfrak}{U}{BOONDOX-frak}{m}{n}
  \SetMathAlphabet{\mathfrak}{bold}{U}{BOONDOX-frak}{b}{n}
  \DeclareMathAlphabet{\mathbfrak} {U}{BOONDOX-frak}{b}{n}
\or % pxtx
  \DeclareFontFamily{U}{txfrak}{\skewchar \font =45}
  \DeclareFontShape{U}{txfrak}{m}{n}{
    <-> \mathalfa@frakscaled  txr-frak}{}
  \DeclareFontShape{U}{txfrak}{b}{n}{
    <-> \mathalfa@frakscaled  txb-frak}{}
  \DeclareMathAlphabet{\mathfrak}{U}{txfrak}{m}{n}
  \SetMathAlphabet{\mathfrak}{bold}{U}{txfrak}{b}{n}
  \DeclareMathAlphabet{\mathbfrak} {U}{txfrak}{b}{n}
\fi
% \mathscr
\ifcase\mathalfa@scrnr\relax% item 0 of {rsfs, rsfso, euler, lucida, mathpi, mma, mtc, zapfc, esstix, boondox, boondoxo, dutchcal}
   %rsfs--avoid using mathrsfs so as to avoid rounding of sizes and to get scaling
   \DeclareFontFamily{U}{rsfs}{\skewchar\font127 }
   \DeclareFontShape{U}{rsfs}{m}{n}{%
   <-6>\mathalfa@scrscaled rsfs5%
   <6-8>\mathalfa@scrscaled rsfs7%
   <8->\mathalfa@scrscaled rsfs10}{}
   \DeclareSymbolFont{rsfs}{U}{rsfs}{m}{n}
   \DeclareSymbolFontAlphabet{\mathscr}{rsfs}
\or % rsfso
   \DeclareFontFamily{U}{rsfso}{\skewchar \font =45}
   \DeclareFontShape{U}{rsfso}{m}{n}{
     <-6> \mathalfa@scrscaled  rsfso5
     <6-8> \mathalfa@scrscaled  rsfso7
     <8-> \mathalfa@scrscaled  rsfso10}{}
   \DeclareMathAlphabet{\mathscr}{U}{rsfso}{m}{n}
\or % euler
  \DeclareFontFamily{U}{eus}{\skewchar\font'60}
  \DeclareFontShape{U}{eus}{m}{n}{<-6>\mathalfa@scrscaled eusm5
    <6-8>\mathalfa@scrscaled eusm7
    <8->\mathalfa@scrscaled eusm10}{}
  \DeclareFontShape{U}{eus}{b}{n}{\mathalfa@scrscaled<-6>eusb5<6-8>eusb7<8->eusb10}{}
  \DeclareMathAlphabet{\mathscr}  {U}{eus}{m}{n}
  \SetMathAlphabet{\mathscr}{bold}{U}{eus}{b}{n}
  \DeclareMathAlphabet{\mathbscr} {U}{eus}{b}{n}
\or % lucida
  \iflucid@loaded \PackageError{mathalfa}{Do not use lucida as an option to mathalfa after loading a lucida package}{}\fi
  \DeclareFontFamily{OMS}{lbm}{\skewchar\font48}
  \DeclareFontShape{OMS}{lbm}{m}{n}{<->\mathalfa@scrscaled hlcry}{}
  \DeclareFontShape{OMS}{lbm}{b}{n}{<->\mathalfa@scrscaled hlcdy}{}  
  \DeclareMathAlphabet{\mathscr}  {OMS}{lbm}{m}{n}
  \SetMathAlphabet{\mathscr}{bold}{OMS}{lbm}{b}{n}
  \DeclareMathAlphabet{\mathbscr} {OMS}{lbm}{b}{n}
\or % mathpi
   \DeclareFontFamily{U}{mathpical}{\skewchar \font =45}
   \DeclareFontShape{U}{mathpical}{m}{n}{
     <-> \mathalfa@scrscaled  mathpical}{}
   \DeclareMathAlphabet{\mathscr}{U}{mathpical}{m}{n}
\or % mma
   \DeclareFontFamily{U}{mmamcal}{\skewchar \font =45}
   \DeclareFontShape{U}{mmamcal}{m}{n}{
      <-> \mathalfa@scrscaled  mmamcal}{}
   \DeclareFontShape{U}{mmamcal}{b}{n}{
      <-> \mathalfa@scrscaled  mmambcal}{}
   \DeclareMathAlphabet{\mathscr}{U}{mmacal}{m}{n}
  \SetMathAlphabet{\mathscr}{bold}{U}{mmacal}{b}{n}
  \DeclareMathAlphabet{\mathbscr} {U}{mmacal}{b}{n}
\or % mtc
   \@ifpackageloaded{mtpro2}{\mtp@loadedError}{}
   \DeclareFontFamily{U}{mt2msc}{\skewchar\font42}%
   \DeclareFontShape{U}{mt2msc}{m}{n}{<-7>\mathalfa@scrscaled mt2mcf%
     <7-9>\mathalfa@scrscaled mt2mcs%
     <9->\mathalfa@scrscaled mt2mct}{}%
   \DeclareMathAlphabet{\mathscr}  {U}{mt2msc}{m}{n}
\or % zapfc->urwchancal
  \DeclareFontFamily{U}{urwchanscr}{\skewchar \font =45}
  \DeclareFontShape{U}{urwchanscr}{m}{n}{%
     <-> \mathalfa@scrscaled  urwchancal}{}
  \DeclareMathAlphabet{\mathscr}{U}{urwchanscr}{m}{n}%
\or % esstix
   \DeclareFontFamily{U}{esstixscr}{\skewchar \font =45}
   \DeclareFontShape{U}{esstixscr}{m}{n}{
     <-> \mathalfa@scrscaled  esstixcal}{}
   \DeclareMathAlphabet{\mathscr}{U}{esstixscr}{m}{n}
\or %boondox
  \DeclareFontFamily{U}{BOONDOX-scr}{\skewchar \font =45}
  \DeclareFontShape{U}{BOONDOX-scr}{m}{n}{
    <-> \mathalfa@scrscaled  BOONDOX-r-cal}{}
  \DeclareFontShape{U}{BOONDOX-scr}{b}{n}{
    <-> \mathalfa@scrscaled  BOONDOX-b-cal}{}
  \DeclareMathAlphabet{\mathscr}{U}{BOONDOX-scr}{m}{n}
  \SetMathAlphabet{\mathscr}{bold}{U}{BOONDOX-scr}{b}{n}
  \DeclareMathAlphabet{\mathbscr} {U}{BOONDOX-scr}{b}{n}
\or %boondoxo
  \DeclareFontFamily{U}{BOONDOX-scro}{\skewchar \font =45}
  \DeclareFontShape{U}{BOONDOX-scro}{m}{n}{
    <-> \mathalfa@scrscaled  BOONDOX-r-calo}{}
  \DeclareFontShape{U}{BOONDOX-scro}{b}{n}{
    <-> \mathalfa@scrscaled  BOONDOX-b-calo}{}
  \DeclareMathAlphabet{\mathscr}{U}{BOONDOX-scro}{m}{n}
  \SetMathAlphabet{\mathscr}{bold}{U}{BOONDOX-scro}{b}{n}
  \DeclareMathAlphabet{\mathbscr} {U}{BOONDOX-scro}{b}{n}
\or %dutchcal
  \DeclareFontFamily{U}{dutchscr}{\skewchar \font =45}
  \DeclareFontShape{U}{dutchscr}{m}{n}{
    <-> \mathalfa@scrscaled  dutchcal-r}{}
  \DeclareFontShape{U}{dutchscr}{b}{n}{
    <-> \mathalfa@scrscaled  dutchcal-b}{}
  \DeclareMathAlphabet{\mathscr}{U}{dutchscr}{m}{n}
  \SetMathAlphabet{\mathscr}{bold}{U}{dutchscr}{b}{n}
  \DeclareMathAlphabet{\mathbscr}{U}{dutchscr}{b}{n}
\or %pxtx
  \DeclareFontFamily{U}{txscr}{\skewchar \font =45}
  \DeclareFontShape{U}{txscr}{m}{n}{
    <-> \mathalfa@scrscaled  txr-cal}{}
  \DeclareFontShape{U}{txscr}{b}{n}{
    <-> \mathalfa@scrscaled  txb-cal}{}
  \DeclareMathAlphabet{\mathscr}{U}{txscr}{m}{n}
  \SetMathAlphabet{\mathscr}{bold}{U}{txscr}{b}{n}
  \DeclareMathAlphabet{\mathbscr} {U}{txscr}{b}{n}
\or %bickham
  \DeclareFontFamily{U}{bickhamscr}{\skewchar \font =45}
  \DeclareFontShape{U}{bickhamscr}{m}{n}{
    <-> \mathalfa@scrscaled  bickham-r}{}
  \DeclareFontShape{U}{bickhamscr}{b}{n}{
    <-> \mathalfa@scrscaled  bickham-b}{}
  \DeclareMathAlphabet{\mathscr}{U}{bickhamscr}{m}{n}
  \SetMathAlphabet{\mathscr}{bold}{U}{bickhamscr}{b}{n}
  \DeclareMathAlphabet{\mathbscr} {U}{bickhamscr}{b}{n}
\fi
\ifnum\mathalfa@bbnr>-1\relax \def\Bbb{}\let\Bbb\mathbb\fi
\ifx\mathbcal\@undefined\def\mathbcal{\PackageError{mathalfa}
    {There is no bold variant of the calligraphic font}
    {Type <return> to proceed; \protect\mathbcal\space will be ignored.}
  }\fi%
\ifx\mathbbb\@undefined\def\mathbbb{\PackageError{mathalfa}
    {There is no bold variant of the blackboard bold font}
    {Type <return> to proceed; \protect\mathbbb\space will be ignored.}
  }\fi%
\ifx\mathbfrak\@undefined\def\mathbfrak{\PackageError{mathalfa}
    {There is no bold variant of the fraktur font}
    {Type <return> to proceed; \protect\mathbfrak\space will be ignored.}
  }\fi%
\ifx\mathbscr\@undefined\def\mathbscr{\PackageError{mathalfa}
    {There is no bold variant of the script font}
    {Type <return> to proceed; \protect\mathbscr\space will be ignored.}
  }\fi%

\endinput