%\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 % % This package can redistributed and/or modified under the terms of the % LaTeX Project Public License Distributed from CTAN archives in % directory macros/latex/base/lppl.txt; either version 1 of the License, % or (at your option) any later version. % % Copyright 1994-1999 Torsten Hilbrich % \fi \def\fileversion{1.2} \def\filedate{1999/03/15} % \CheckSum{56} %% \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 \~} % % \Finale % %\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.01}{1994/12/22}{Now uses doc for documentation} % \changes{1.02}{1995/06/20}{Corrected some typos and mistakes} % \changes{1.1}{1997/07/24}{Changed to new font naming scheme, ubbm.fd instead of Ubbm.fd} % \changes{1.2}{1999/03/13}{Added copyright and license information} % % \title{A package for using the \texttt{bbm} fonts in math environment} % \author{Torsten Hilbrich\thanks{Torsten.Hilbrich@gmx.net}} % \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 used as index or superscript as well. 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: % \par\nopagebreak % \begin{tabular}{ll} % \verb|\mathbbm{N}| & $\mathbbm{N}$\\ % \verb|\mathbbmss{N}| & $\mathbbmss{N}$\\ % \verb|\mathbbmtt{N}| & $\mathbbmtt{N}$\\ % \end{tabular} % % Some often used sets can be described with the following letters: % $\mathbbm{N}$, $\mathbbm{R}$, $\mathbbm{Z}$, % $\mathbbm{R}$, $\mathbbm{Q}$, and $\mathbbm{C}$. % % \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. Two 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: % \par\nopagebreak % \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}. The BBM directory % on CTAN contains a link to this location. % \mathversion{normal} % \StopEventually{\PrintChanges} % \section{Implementation} % % Here the driver file for the documentation. % \begin{macrocode} %<*driver> \documentclass{ltxdoc} \setlength{\parskip}{1ex plus 0,5ex minus 0,2ex} \setlength{\parindent}{0pt} \usepackage{bbm} \begin{document} \DocInput{bbm.dtx} \end{document} % % \end{macrocode} % \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} % % \end{macrocode} % \subsection{The font definition files} % % \LaTeXe{} knows now new math alphabets called \texttt{bbm}, \texttt{bbmss} % and \texttt{bbmtt}. But it don't know, which files contains the information % of the fonts. Font definition files (the files with extension % \texttt{.fd}) are needed to inform \LaTeXe{} about the new fonts. % The whole mechanism % of these files can be 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}{} % \end{macrocode} % As an example I will explain the following part. % \begin{macrocode} \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}{} % \end{macrocode} % The first line means: the sizes 5, 6, 7, 8, 9, 10, 12 point can % be directly generated because these fonts are available. The next % line replaces the 10.95pt by the 10pt sized font scaled to 10.95pt % size. % All fonts greater than 12pt are scaled to the proper size using the 12pt % font. % \begin{macrocode} \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}{} % % \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}{} % % \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}{} % % \end{macrocode} % % \Finale % \endinput