%\iffalse
%
% A readme file and the file bbm.ins should be part of this package.
%
% Run bbm.ins through latex2e for generating the needed file and
% use bbm.drv to get a user documentation
%
% \fi
\def\fileversion{1.01}
\def\filedate{1994/12/22}
% \CheckSum{59}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%
%\iffalse
%
% This package provides font information and math alphabets declaration
% for the bbm fonts
%
%\fi
%
% \changes{1.0}{1994/10/14}{First version}
% \changes{1.011}{1994/12/22}{Now uses doc for documentation}
%
% \title{A package for using the \texttt{bbm} fonts in math environment}
% \author{Torsten Hilbrich\thanks{hilbrich@informatik.hu-berlin.de}}
% \date{Printed \today}
% \maketitle
% \section{Introduction}
%
% Did you ever write mathematical text and needed a character specifying the
% set of natural numbers? One opportunity is to use the \texttt{bbold} font
% of AMS. But this is rather an outlined than a double-striked font.
%
% I found some fonts, called \texttt{bbm} which are available in roman,
% sans serif and typewrite type and look like those you would write on
% paper, double-striked left side and normal right side.
%
% \section{How to use these fonts?}
%
% You simple have to input the package \texttt{bbm} by typing the following:
% \begin{verbatim}
% \usepackage{bbm}
% \end{verbatim}
%
% \DescribeMacro{\mathbbm}
% The fonts can now be used in math environment by typing
% \verb|$\mathbbm{N}$| for getting the symbol for natural numbers:
% $\mathbbm{N}$. This is the same methode like for getting a calligraphic
% $\mathcal{N}$ where you use \verb|$\mathcal{N}$|.
%
% The characters can be uses as index or superscript too. Let's
% see: $M_\mathbbm{i}$ was created with the following sequence.
% \begin{verbatim}
% $M_\mathbbm{i}$
% \end{verbatim}
%
% Do you prefer a sans serif font for sets, or even a typewrite style? No
% problem, the commands
% \DescribeMacro{\mathbbmss}
% \verb|\mathbbmss|
% and
% \DescribeMacro{\mathbbmtt}
% \verb|\mathbbmtt| do the same
% like \verb|\mathbbm| except of using the specified font.
%
% Examples:
%
% \begin{tabular}{ll}
% \verb|\mathbbm{N}| & $\mathbbm{N}$\\
% \verb|\mathbbmss{N}| & $\mathbbmss{N}$\\
% \verb|\mathbbmtt{N}| & $\mathbbmtt{N}$\\
% \end{tabular}
%
% \subsection{What about bold symbols?}
%
% By typing \verb|\mathbold| or \verb|\mathversion{bold}| you switch to the
% bold variant of some
% math symbols. The selection of math version must be done
% \emph{outside} the math environment. 2 of the fonts described above are
% available in
% bold extended series too, the roman and sans serif family.
% If you specify \verb|\mathbold| before using the symbols,\mathversion{bold}
% you can use bold letters. Let's see the examples again, now in bold version:
% \begin{tabular}{ll}
% \verb|\mathbbm{N}| & $\mathbbm{N}$\\
% \verb|\mathbbmss{N}| & $\mathbbmss{N}$\\
% \verb|\mathbbmtt{N}| & $\mathbbmtt{N}$\\
% \end{tabular}
% \section{Where to get the fonts?}
%
% The fonts can be found at CTAN\footnote{e.g. \texttt{ftp.dante.de}}, 
% the directory is \texttt{/tex-archive/fonts/cm/bbm}.
% You need the whole directory the fonts are located in.
% \mathversion{normal}
% \StopEventually{\PrintChanges}
% \section{Implementation}
%
% \subsection{The style file}
% I simply declare some new math alphabets. If you want to now more about
% the font selection used by \LaTeXe{} you should read \texttt{fntguide.tex}
% which is part of the distribution.
%
% Some identification stuff
%    \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bbm}[\filedate\space V\space\fileversion
                      \space provides fonts for set symbols - TH]
%    \end{macrocode}
% First I declare \verb|\mathbbm| as new math alphabet:
%    \begin{macrocode}
\DeclareMathAlphabet{\mathbbm}{U}{bbm}{m}{n}
%    \end{macrocode}
% and set the bold version of this font:
%    \begin{macrocode}
\SetMathAlphabet\mathbbm{bold}{U}{bbm}{bx}{n}
%    \end{macrocode}
% I decided to use the encoding \texttt{U} because the fonts aint
% complete. The contain lower and upper letters, the digits 1 and 2,
% brackets and parentheses.
%
% The same definition is repeated for \texttt{bbmss}
%    \begin{macrocode}
\DeclareMathAlphabet{\mathbbmss}{U}{bbmss}{m}{n}
\SetMathAlphabet\mathbbmss{bold}{U}{bbmss}{bx}{n}
%    \end{macrocode}
%
% The typewrite font has no bold version those it's declared by
%    \begin{macrocode}
\DeclareMathAlphabet{\mathbbmtt}{U}{bbmtt}{m}{n}
%</package>
%    \end{macrocode}
% \subsection{The font definition files}
%
% Now \LaTeXe{} knows new math alphabets called \texttt{bbm}, \texttt{bbmss}
% and \texttt{bbmtt}. But it don't know, which files contains the information
% about this font. Those some font definition files (the files with extension
% \texttt{.fd}) are needed to inform \LaTeXe{} about the new fonts. 
% The whole mechanism
% of these files you can found in \texttt{fntguide.tex} in section 4.
%    \begin{macrocode}
%<*bbm>
\ProvidesFile{Ubbm.fd}[\filedate\space V\space\fileversion
                      \space Font definition for bbm font - TH]
\DeclareFontFamily{U}{bbm}{}
\DeclareFontShape{U}{bbm}{m}{n}
   {  <5> <6> <7> <8> <9> <10> <12> gen * bbm
      <10.95> bbm10%
      <14.4>  bbm12%
      <17.28><20.74><24.88> bbm17}{}
\DeclareFontShape{U}{bbm}{m}{sl}
   {  <5> <6> <7> bbmsl8%
      <8> <9> <10> <12> gen * bbmsl
      <10.95> bbmsl10%
      <14.4> <17.28> <20.74> <24.88> bbmsl12}{}
\DeclareFontShape{U}{bbm}{bx}{n}
   {  <5> <6> <7> <8> <9> <10> <12> gen * bbmbx
      <10.95> bbmbx10%
      <14.4> <17.28> <20.74> <24.88> bbmbx12}{}
\DeclareFontShape{U}{bbm}{bx}{sl}
   {  <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28>%
      <20.74> <24.88> bbmbxsl10}{}
\DeclareFontShape{U}{bbm}{b}{n}
   {  <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28>%
      <20.74> <24.88> bbmb10}{}
%</bbm>
%    \end{macrocode}
% The definitions are quite long, I know. Let's pick out the definition
% \begin{verbatim}
% \DeclareFontShape{U}{bbm}{bx}{n}
% \end{verbatim}
% The first line means: in the sizes 5, 6, 7, 8, 9, 10, 12 point you can
% directly generate the fonts because this sizes are available. The next
% line replaces the 10.95pt by the 10pt sized font scaled to the needed
% size. 14.4pt sized font can be generated using 12pt size at magstep 1.
% All sizes greater than 14.4pt are scaled using the 17pt font.
%
% Here are the other definitions:
%    \begin{macrocode}
%<*bbmss>
\ProvidesFile{Ubbmss.fd}[\filedate\space V\space\fileversion
                         \space Font definition for bbmss font - TH]
\DeclareFontFamily{U}{bbmss}{}
\DeclareFontShape{U}{bbmss}{m}{n}
   {  <5> <6> <7> bbmss8%
      <8> <9> <10> <12> gen * bbmss
      <10.95> bbmss10%
      <14.4> bbmss12%
      <17.28> <20.74> <24.88> bbmss17}{}
\DeclareFontShape{U}{bbmss}{m}{it}
   {  <5> <6> <7> bbmssi8%
      <8> <9> <10> <12> gen * bbmssi
      <10.95> bbmssi10%
      <14.4> bbmssi12%
      <17.28> <20.74> <24.88> bbmssi17}{}
\DeclareFontShape{U}{bbmss}{bx}{n}
   {  <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28>%
      <20.74> <24.88> bbmssbx10}{}
%</bbmss>
%    \end{macrocode}
%
% The typewrite font is even purer since it contains only the medium series
% normal shape characters.
%    \begin{macrocode}
%<*bbmtt>
\ProvidesFile{Ubbmtt.fd}[\filedate\space V\space\fileversion
                         \space Font definition for bbmss font - TH]
\DeclareFontFamily{U}{bbmtt}{}
\DeclareFontShape{U}{bbmtt}{m}{n}
   {  <5> <6> <7> bbmtt8%
      <8> <9> <10> <12> gen * bbmtt
      <10.95> bbmtt10%
      <14.4> <17.28> <20.74> <24.88> bbmtt12}{}
%</bbmtt>
%    \end{macrocode}
%    \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
\setlength{\parskip}{1ex plus 0,5ex minus 0,2ex}
\setlength{\parindent}{0pt}
%\RecordChanges
%\EnableCrossref
\usepackage{bbm}
\OnlyDescription  % comment this line for a complete doc
\begin{document}
 \DocInput{bbm.dtx}
\end{document}
%</driver>
%    \end{macrocode}
% \Finale
%
\endinput
