Debian Codegraph @

texmf-dist/source/latex/bbm-macros/bbm.dtx

raw
1 %\iffalse
2 %
3 % A readme file and the file bbm.ins should be part of this package.
4 %
5 % Run bbm.ins through latex2e for generating the needed file and
6 % use bbm.drv to get a user documentation
7 %
8 % This package can redistributed and/or modified under the terms of the
9 % LaTeX Project Public License Distributed from CTAN archives in
10 % directory macros/latex/base/lppl.txt; either version 1 of the License,
11 % or (at your option) any later version.
12 %
13 % Copyright 1994-1999 Torsten Hilbrich <[email protected]>
14 % \fi
15 \def\fileversion{1.2}
16 \def\filedate{1999/03/15}
17 % \CheckSum{56}
18 %% \CharacterTable
19 %% {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
20 %% 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
21 %% Digits \0\1\2\3\4\5\6\7\8\9
22 %% Exclamation \! Double quote \" Hash (number) \#
23 %% Dollar \$ Percent \% Ampersand \&
24 %% Acute accent \' Left paren \( Right paren \)
25 %% Asterisk \* Plus \+ Comma \,
26 %% Minus \- Point \. Solidus \/
27 %% Colon \: Semicolon \; Less than \<
28 %% Equals \= Greater than \> Question mark \?
29 %% Commercial at \@ Left bracket \[ Backslash \\
30 %% Right bracket \] Circumflex \^ Underscore \_
31 %% Grave accent \` Left brace \{ Vertical bar \|
32 %% Right brace \} Tilde \~}
33 %
34 % \Finale
35 %
36 %\iffalse
37 %
38 % This package provides font information and math alphabets declaration
39 % for the bbm fonts
40 %
41 %\fi
42 %
43 % \changes{1.0}{1994/10/14}{First version}
44 % \changes{1.01}{1994/12/22}{Now uses doc for documentation}
45 % \changes{1.02}{1995/06/20}{Corrected some typos and mistakes}
46 % \changes{1.1}{1997/07/24}{Changed to new font naming scheme, ubbm.fd instead of Ubbm.fd}
47 % \changes{1.2}{1999/03/13}{Added copyright and license information}
48 %
49 % \title{A package for using the \texttt{bbm} fonts in math environment}
50 % \author{Torsten Hilbrich\thanks{[email protected]}}
51 % \date{Printed \today}
52 % \maketitle
53 % \section{Introduction}
54 %
55 % Did you ever write mathematical text and needed a character specifying the
56 % set of natural numbers? One opportunity is to use the \texttt{bbold} font
57 % of AMS. But this is rather an outlined than a double-striked font.
58 %
59 % I found some fonts, called \texttt{bbm} which are available in roman,
60 % sans serif and typewrite type and look like those you would write on
61 % paper, double-striked left side and normal right side.
62 %
63 % \section{How to use these fonts?}
64 %
65 % You simple have to input the package \texttt{bbm} by typing the following:
66 % \begin{verbatim}
67 % \usepackage{bbm}
68 % \end{verbatim}
69 %
70 % \DescribeMacro{\mathbbm}
71 % The fonts can now be used in math environment by typing
72 % \verb|$\mathbbm{N}$| for getting the symbol for natural numbers:
73 % $\mathbbm{N}$. This is the same methode like for getting a calligraphic
74 % $\mathcal{N}$ where you use \verb|$\mathcal{N}$|.
75 %
76 % The characters can be used as index or superscript as well. Let's
77 % see: $M_\mathbbm{i}$ was created with the following sequence.
78 % \begin{verbatim}
79 % $M_\mathbbm{i}$
80 % \end{verbatim}
81 %
82 % Do you prefer a sans serif font for sets, or even a typewrite style? No
83 % problem, the commands
84 % \DescribeMacro{\mathbbmss}
85 % \verb|\mathbbmss|
86 % and
87 % \DescribeMacro{\mathbbmtt}
88 % \verb|\mathbbmtt| do the same
89 % like \verb|\mathbbm| except of using the specified font.
90 %
91 % Examples:
92 % \par\nopagebreak
93 % \begin{tabular}{ll}
94 % \verb|\mathbbm{N}| & $\mathbbm{N}$\\
95 % \verb|\mathbbmss{N}| & $\mathbbmss{N}$\\
96 % \verb|\mathbbmtt{N}| & $\mathbbmtt{N}$\\
97 % \end{tabular}
98 %
99 % Some often used sets can be described with the following letters:
100 % $\mathbbm{N}$, $\mathbbm{R}$, $\mathbbm{Z}$,
101 % $\mathbbm{R}$, $\mathbbm{Q}$, and $\mathbbm{C}$.
102 %
103 % \subsection{What about bold symbols?}
104 %
105 % By typing \verb|\mathbold| or \verb|\mathversion{bold}| you switch to the
106 % bold variant of some
107 % math symbols. The selection of math version must be done
108 % \emph{outside} the math environment. Two of the fonts described above are
109 % available in
110 % bold extended series too, the roman and sans serif family.
111 % If you specify \verb|\mathbold| before using the symbols,\mathversion{bold}
112 % you can use bold letters. Let's see the examples again, now in bold version:
113 % \par\nopagebreak
114 % \begin{tabular}{ll}
115 % \verb|\mathbbm{N}| & $\mathbbm{N}$\\
116 % \verb|\mathbbmss{N}| & $\mathbbmss{N}$\\
117 % \verb|\mathbbmtt{N}| & $\mathbbmtt{N}$\\
118 % \end{tabular}
119 % \section{Where to get the fonts?}
120 %
121 % The fonts can be found at CTAN\footnote{e.g. \texttt{ftp.dante.de}},
122 % the directory is \texttt{/tex-archive/fonts/cm/bbm}. The BBM directory
123 % on CTAN contains a link to this location.
124 % \mathversion{normal}
125 % \StopEventually{\PrintChanges}
126 % \section{Implementation}
127 %
128 % Here the driver file for the documentation.
129 % \begin{macrocode}
130 %<*driver>
131 \documentclass{ltxdoc}
132 \setlength{\parskip}{1ex plus 0,5ex minus 0,2ex}
133 \setlength{\parindent}{0pt}
134 \usepackage{bbm}
135 \begin{document}
136 \DocInput{bbm.dtx}
137 \end{document}
138 %</driver>
139 % \end{macrocode}
140 % \subsection{The style file}
141 % I simply declare some new math alphabets. If you want to now more about
142 % the font selection used by \LaTeXe{} you should read \texttt{fntguide.tex}
143 % which is part of the distribution.
144 %
145 % Some identification stuff
146 % \begin{macrocode}
147 %<*package>
148 \NeedsTeXFormat{LaTeX2e}
149 \ProvidesPackage{bbm}[\filedate\space V\space\fileversion
150 \space provides fonts for set symbols - TH]
151 % \end{macrocode}
152 % First I declare \verb|\mathbbm| as new math alphabet:
153 % \begin{macrocode}
154 \DeclareMathAlphabet{\mathbbm}{U}{bbm}{m}{n}
155 % \end{macrocode}
156 % and set the bold version of this font:
157 % \begin{macrocode}
158 \SetMathAlphabet\mathbbm{bold}{U}{bbm}{bx}{n}
159 % \end{macrocode}
160 % I decided to use the encoding \texttt{U} because the fonts aint
161 % complete. The contain lower and upper letters, the digits 1 and 2,
162 % brackets and parentheses.
163 %
164 % The same definition is repeated for \texttt{bbmss}
165 % \begin{macrocode}
166 \DeclareMathAlphabet{\mathbbmss}{U}{bbmss}{m}{n}
167 \SetMathAlphabet\mathbbmss{bold}{U}{bbmss}{bx}{n}
168 % \end{macrocode}
169 %
170 % The typewrite font has no bold version those it's declared by
171 % \begin{macrocode}
172 \DeclareMathAlphabet{\mathbbmtt}{U}{bbmtt}{m}{n}
173 %</package>
174 % \end{macrocode}
175 % \subsection{The font definition files}
176 %
177 % \LaTeXe{} knows now new math alphabets called \texttt{bbm}, \texttt{bbmss}
178 % and \texttt{bbmtt}. But it don't know, which files contains the information
179 % of the fonts. Font definition files (the files with extension
180 % \texttt{.fd}) are needed to inform \LaTeXe{} about the new fonts.
181 % The whole mechanism
182 % of these files can be found in \texttt{fntguide.tex} in section 4.
183 % \begin{macrocode}
184 %<*bbm>
185 \ProvidesFile{ubbm.fd}[\filedate\space V\space\fileversion
186 \space Font definition for bbm font - TH]
187 \DeclareFontFamily{U}{bbm}{}
188 \DeclareFontShape{U}{bbm}{m}{n}
189 { <5> <6> <7> <8> <9> <10> <12> gen * bbm
190 <10.95> bbm10%
191 <14.4> bbm12%
192 <17.28><20.74><24.88> bbm17}{}
193 \DeclareFontShape{U}{bbm}{m}{sl}
194 { <5> <6> <7> bbmsl8%
195 <8> <9> <10> <12> gen * bbmsl
196 <10.95> bbmsl10%
197 <14.4> <17.28> <20.74> <24.88> bbmsl12}{}
198 % \end{macrocode}
199 % As an example I will explain the following part.
200 % \begin{macrocode}
201 \DeclareFontShape{U}{bbm}{bx}{n}
202 { <5> <6> <7> <8> <9> <10> <12> gen * bbmbx
203 <10.95> bbmbx10%
204 <14.4> <17.28> <20.74> <24.88> bbmbx12}{}
205 % \end{macrocode}
206 % The first line means: the sizes 5, 6, 7, 8, 9, 10, 12 point can
207 % be directly generated because these fonts are available. The next
208 % line replaces the 10.95pt by the 10pt sized font scaled to 10.95pt
209 % size.
210 % All fonts greater than 12pt are scaled to the proper size using the 12pt
211 % font.
212 % \begin{macrocode}
213 \DeclareFontShape{U}{bbm}{bx}{sl}
214 { <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28>%
215 <20.74> <24.88> bbmbxsl10}{}
216 \DeclareFontShape{U}{bbm}{b}{n}
217 { <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28>%
218 <20.74> <24.88> bbmb10}{}
219 %</bbm>
220 % \end{macrocode}
221 % The definitions are quite long, I know. Let's pick out the definition
222 % \begin{verbatim}
223 % \DeclareFontShape{U}{bbm}{bx}{n}
224 % \end{verbatim}
225 % The first line means: in the sizes 5, 6, 7, 8, 9, 10, 12 point you can
226 % directly generate the fonts because this sizes are available. The next
227 % line replaces the 10.95pt by the 10pt sized font scaled to the needed
228 % size. 14.4pt sized font can be generated using 12pt size at magstep 1.
229 % All sizes greater than 14.4pt are scaled using the 17pt font.
230 %
231 % Here are the other definitions:
232 % \begin{macrocode}
233 %<*bbmss>
234 \ProvidesFile{ubbmss.fd}[\filedate\space V\space\fileversion
235 \space Font definition for bbmss font - TH]
236 \DeclareFontFamily{U}{bbmss}{}
237 \DeclareFontShape{U}{bbmss}{m}{n}
238 { <5> <6> <7> bbmss8%
239 <8> <9> <10> <12> gen * bbmss
240 <10.95> bbmss10%
241 <14.4> bbmss12%
242 <17.28> <20.74> <24.88> bbmss17}{}
243 \DeclareFontShape{U}{bbmss}{m}{it}
244 { <5> <6> <7> bbmssi8%
245 <8> <9> <10> <12> gen * bbmssi
246 <10.95> bbmssi10%
247 <14.4> bbmssi12%
248 <17.28> <20.74> <24.88> bbmssi17}{}
249 \DeclareFontShape{U}{bbmss}{bx}{n}
250 { <5> <6> <7> <8> <9> <10> <10.95> <12> <14.4> <17.28>%
251 <20.74> <24.88> bbmssbx10}{}
252 %</bbmss>
253 % \end{macrocode}
254 %
255 % The typewrite font is even purer since it contains only the medium series
256 % normal shape characters.
257 % \begin{macrocode}
258 %<*bbmtt>
259 \ProvidesFile{ubbmtt.fd}[\filedate\space V\space\fileversion
260 \space Font definition for bbmss font - TH]
261 \DeclareFontFamily{U}{bbmtt}{}
262 \DeclareFontShape{U}{bbmtt}{m}{n}
263 { <5> <6> <7> bbmtt8%
264 <8> <9> <10> <12> gen * bbmtt
265 <10.95> bbmtt10%
266 <14.4> <17.28> <20.74> <24.88> bbmtt12}{}
267 %</bbmtt>
268 % \end{macrocode}
269 %
270 % \Finale
271 %
272
273 \endinput