%%% ====================================================================
%%%  @LaTeX-style-file{
%%%     author          = "Alan Jeffrey",
%%%     version         = "1.1",
%%%     date            = "02 June 1992",
%%%     time            = "15:02:39 BST",
%%%     filename        = "msbm.sty",
%%%     address         = "School of Cognitive and Computing Sciences
%%%                        University of Sussex
%%%                        Brighton BN1 9QH
%%%                        UK",
%%%     telephone       = "+44 273 606755 x 3238",
%%%     FAX             = "+44 273 678188",
%%%     checksum        = "39778 253 543 9329",
%%%     email           = "alanje@cogs.sussex.ac.uk",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "LaTeX fonts AMS",
%%%     supported       = "yes",
%%%     abstract        = "This module imports the AMS B symbol font.",
%%%     docstring       = "This module imports the AMS B symbol font.
%%%                        It uses the module document style option,
%%%                        which allows symbols to be loaded
%%%                        individually, thus bypassing the need for
%%%                        \newsymbol, and for the user to need to
%%%                        know where each symbol is in the font
%%%                        layout.
%%%
%%%                        It is described in stmaryrd.tex.
%%%
%%%                        Copyright 1992 Alan Jeffrey.
%%%
%%%                        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.",
%%%     package         = "St Mary's Road",
%%%     dependencies    = "module.sty",
%%%  }
%%% ====================================================================
%%%
%%% 24 May 1991, v1.0: file created.
%%%
%%% 21 Jun 1991, v1.01: Updated for the new module.sty.
%%%
%%% 2 Jun 1992, v1.1: Added the file headers.

% This is the module for importing the AMS B symbol font.
% It's pretty incomplete at the moment, and specifically doesn't
% understand the \substitutesymbols tag.
%
% But it's a start.

\@ifundefined{modulemoduleloaded}{\input module.sty}{}

% The first time the module is loaded, we grab the fonts.

\iftest \tagisset\modulemsbmloaded \then \else

   \iftest \tagisset\newfontselection \then

      \new@mathgroup\msb@group
      \define@mathgroup\mv@normal\msb@group{msb}{m}{n}
      \define@mathgroup\mv@bold\msb@group{msb}{m}{n}

      \new@fontshape{msb}{m}{n}{%
         <5>msbm5%
         <6>msbm6%
         <7>msbm7%
         <8>msbm8%
         <9>msbm9%
         <10>msbm10%
         <11>msbm10 at10.95pt%
         <12>msbm10 at12pt%
         <14>msbm10 at14.4pt%
         <17>msbm10 at17.28pt%
         <20>msbm10 at20.736pt%
         <25>msbm10 at24.8832pt}{}

   \else

      \newfam\msb@group

      \font\msbmfiv  msbm5
      \font\msbmsix  msbm6
      \font\msbmsev  msbm7
      \font\msbmegt  msbm8
      \font\msbmnin  msbm9
      \font\msbmten  msbm10
      \font\msbmelv  msbm10 at10.95pt
      \font\msbmtwl  msbm10 at12pt
      \font\msbmfrtn msbm10 at14.4pt
      \font\msbmsvtn msbm10 at17.28pt
      \font\msbmtwty msbm10 at20.736pt
      \font\msbmtwfv msbm10 at24.8832pt

      \@addfontinfo\@vpt{\textfont\msb@group\msbmfiv
         \scriptfont\msb@group\msbmfiv
         \scriptscriptfont\msb@group\msbmfiv}
      \@addfontinfo\@vipt{\textfont\msb@group\msbmsix
         \scriptfont\msb@group\msbmsix
         \scriptscriptfont\msb@group\msbmsix}
      \@addfontinfo\@viipt{\textfont\msb@group\msbmsev
         \scriptfont\msb@group\msbmsix
         \scriptscriptfont\msb@group\msbmfiv}
      \@addfontinfo\@viiipt{\textfont\msb@group\msbmegt
         \scriptfont\msb@group\msbmsix
         \scriptscriptfont\msb@group\msbmfiv}
      \@addfontinfo\@ixpt{\textfont\msb@group\msbmnin
         \scriptfont\msb@group\msbmsix
         \scriptscriptfont\msb@group\msbmfiv}
      \@addfontinfo\@xpt{\textfont\msb@group\msbmten
         \scriptfont\msb@group\msbmsev
         \scriptscriptfont\msb@group\msbmfiv}
      \@addfontinfo\@xipt{\textfont\msb@group\msbmelv
         \scriptfont\msb@group\msbmsev
         \scriptscriptfont\msb@group\msbmfiv}
      \@addfontinfo\@xiipt{\textfont\msb@group\msbmtwl
         \scriptfont\msb@group\msbmegt
         \scriptscriptfont\msb@group\msbmsix}
      \@addfontinfo\@xivpt{\textfont\msb@group\msbmfrtn
         \scriptfont\msb@group\msbmten
         \scriptscriptfont\msb@group\msbmsev}
      \@addfontinfo\@xviipt{\textfont\msb@group\msbmsvtn
         \scriptfont\msb@group\msbmtwl
         \scriptscriptfont\msb@group\msbmten}
      \@addfontinfo\@xxpt{\textfont\msb@group\msbmtwty
         \scriptfont\msb@group\msbmfrtn
         \scriptscriptfont\msb@group\msbmtwl}
      \@addfontinfo\@xxvpt{\textfont\msb@group\msbmtwfv
         \scriptfont\msb@group\msbmtwty
         \scriptscriptfont\msb@group\msbmsvtn}
   \fi

\fi

% For the rest of the style, ! is the hex number of the family.

\catcode`\!\active
\edef!{\hexnumber@\msb@group}

% Then we load those symbols!

\ifdef\then\mathchardef\varnothing"0!3F\fi
\ifdef\then\mathchardef\nexists"0!40\fi
\ifdef\then\mathchardef\eth"0!67\fi
\ifdef\then\mathchardef\beth"0!69\fi
\ifdef\then\mathchardef\gimel"0!6A\fi
\ifdef\then\mathchardef\daleth"0!6B\fi
\ifdef\then\mathchardef\digamma"0!7A\fi
\ifdef\then\mathchardef\varkappa"0!7B\fi
\ifdef\then\mathchardef\hslash"0!7D\fi

\ifdef\then\mathchardef\divideontimes"2!3E\fi
\ifdef\then\mathchardef\ltimes"2!6E\fi
\ifdef\then\mathchardef\rtimes"2!6F\fi
\ifdef\then\mathchardef\smallsetminus"2!72\fi

\ifdef\then\mathchardef\lvertneqq"3!00\fi
\ifdef\then\mathchardef\gvertneqq"3!01\fi
\ifdef\then\mathchardef\nleq"3!02\fi
\ifdef\then\mathchardef\ngeq"3!03\fi
\ifdef\then\mathchardef\nless"3!04\fi
\ifdef\then\mathchardef\ngtr"3!05\fi
\ifdef\then\mathchardef\nprec"3!06\fi
\ifdef\then\mathchardef\nsucc"3!07\fi
\ifdef\then\mathchardef\lneqq"3!08\fi
\ifdef\then\mathchardef\gneqq"3!09\fi
\ifdef\then\mathchardef\nleqslant"3!0A\fi
\ifdef\then\mathchardef\ngeqslant"3!0B\fi
\ifdef\then\mathchardef\lneq"3!0C\fi
\ifdef\then\mathchardef\gneq"3!0D\fi
\ifdef\then\mathchardef\npreceq"3!0E\fi
\ifdef\then\mathchardef\nsucceq"3!0F\fi
\ifdef\then\mathchardef\precnsim"3!10\fi
\ifdef\then\mathchardef\succnsim"3!11\fi
\ifdef\then\mathchardef\lnsim"3!12\fi
\ifdef\then\mathchardef\gnsim"3!13\fi
\ifdef\then\mathchardef\nleqq"3!14\fi
\ifdef\then\mathchardef\ngeqq"3!15\fi
\ifdef\then\mathchardef\precneqq"3!16\fi
\ifdef\then\mathchardef\succneqq"3!17\fi
\ifdef\then\mathchardef\precnapprox"3!18\fi
\ifdef\then\mathchardef\succnapprox"3!19\fi
\ifdef\then\mathchardef\lnapprox"3!1A\fi
\ifdef\then\mathchardef\gnapprox"3!1B\fi
\ifdef\then\mathchardef\nsim"3!1C\fi
\ifdef\then\mathchardef\ncong"3!1D\fi
\ifdef\then\mathchardef\varsubsetneq"3!20\fi
\ifdef\then\mathchardef\varsupsetneq"3!21\fi
\ifdef\then\mathchardef\nsubseteqq"3!22\fi
\ifdef\then\mathchardef\nsupseteqq"3!23\fi
\ifdef\then\mathchardef\subsetneqq"3!24\fi
\ifdef\then\mathchardef\supsetneqq"3!25\fi
\ifdef\then\mathchardef\varsubsetneqq"3!26\fi
\ifdef\then\mathchardef\varsupsetneqq"3!27\fi
\ifdef\then\mathchardef\subsetneq"3!28\fi
\ifdef\then\mathchardef\supsetneq"3!29\fi
\ifdef\then\mathchardef\nsubseteq"3!2A\fi
\ifdef\then\mathchardef\nsupseteq"3!2B\fi
\ifdef\then\mathchardef\nparallel"3!2C\fi
\ifdef\then\mathchardef\nmid"3!2D\fi
\ifdef\then\mathchardef\nshortmid"3!2E\fi
\ifdef\then\mathchardef\nshortparallel"3!2F\fi
\ifdef\then\mathchardef\nvdash"3!30\fi
\ifdef\then\mathchardef\nVdash"3!31\fi
\ifdef\then\mathchardef\nvDash"3!32\fi
\ifdef\then\mathchardef\nVDash"3!33\fi
\ifdef\then\mathchardef\ntrianglerighteq"3!34\fi
\ifdef\then\mathchardef\ntrianglelefteq"3!35\fi
\ifdef\then\mathchardef\ntriangleleft"3!36\fi
\ifdef\then\mathchardef\ntriangleright"3!37\fi
\ifdef\then\mathchardef\nleftarrow"3!38\fi
\ifdef\then\mathchardef\nrightarrow"3!39\fi
\ifdef\then\mathchardef\nLeftarrow"3!3A\fi
\ifdef\then\mathchardef\nRightarrow"3!3B\fi
\ifdef\then\mathchardef\nLeftrightarrow"3!3C\fi
\ifdef\then\mathchardef\nleftrightarrow"3!3D\fi
\ifdef\then\mathchardef\eqsim"3!68\fi
\ifdef\then\mathchardef\lessdot"3!6C\fi
\ifdef\then\mathchardef\gtrdot"3!6D\fi
\ifdef\then\mathchardef\shortmid"3!70\fi
\ifdef\then\mathchardef\shortparallel"3!71\fi
\ifdef\then\mathchardef\thicksim"3!73\fi
\ifdef\then\mathchardef\thickapprox"3!74\fi
\ifdef\then\mathchardef\approxeq"3!75\fi
\ifdef\then\mathchardef\succapprox"3!76\fi
\ifdef\then\mathchardef\precapprox"3!77\fi
\ifdef\then\mathchardef\curvearrowleft"3!78\fi
\ifdef\then\mathchardef\curvearrowright"3!79\fi
\ifdef\then\mathchardef\backepsilon"3!7F\fi

% Change the catcode of ! back to other.

\catcode`\!=12

% A hack from amsfonts.sty to define \Bbb

\ifdef\then\def\Bbb{\protect\pBbb}
   \def\pBbb{\RIfM@\expandafter\Bbb@\else
                 \expandafter\nonmatherr@\expandafter\Bbb\fi}
   \edef\Bbb@{\noexpand\use@mathgroup
          \expandafter\noexpand\csname =msb\endcsname
          \msb@group}
   \def\RIfM@{\relax\protect\ifmmode}
\fi

% Set our own name:

\settag\modulemsbmloaded

% And that's it.
