summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bbm-macros/bbm.dtx
blob: a6a077d9cb51ebea2e1fd3e851361ca9a9140b42 (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
%\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 <Torsten.Hilbrich@gmx.net>
% \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}
%</driver>
%    \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}
%</package>
%    \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}{}
%</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}
%
% \Finale
%

\endinput