summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bbold/bbold.dtx
blob: e8a44ae1f01f7baf578d493f25f0e10080b109d1 (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
%\iffalse
% ====================================================================
%  @LaTeX-documentation-file{
%     author          = "Alan Jeffrey",
%     version         = "1.01",
%     date            = "08 April 2002",
%     filename        = "bbold.dtx",
%     address         = "CTI, DePaul University, 
%                        243 S. Wabash Ave., Chicago IL 60604, USA",
%     email           = "ajeffrey@cs.depaul.edu",
%     codetable       = "ISO/ASCII",
%     keywords        = "LaTeX math fonts",
%     supported       = "yes",
%     abstract        = "This is the documentation and
%                        self-extracting archive for the bbold
%                        package.  If you run latex2e on it, it will
%                        produce the documentation, as well as
%                        the bbold package and font definition
%                        file.",
%     package         = "stands alone",
%     dependencies    = "none",
%  }
% ====================================================================
%\fi
%% \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         \~}
%
% \setcounter{StandardModuleDepth}{1}
% \def\dst{\expandafter{\normalfont\scshape docstrip}}
%
% \changes{1.00}{1991/05/23}{File created}
% \changes{1.01}{2002/04/08}{Moved to Modified Free BSD license}
%
% \title{The \textbb{bbold} symbol font}
% \author{Alan Jeffrey}
% \date{April 2002}
%
% \maketitle
% 
% \section*{Introduction}
%
% This document describes the \textbb{bbold} math alphabet.  This
% is an open (or `blackboard bold') geometric sans serif, intended
% mainly for use in mathematics, but which may prove useful for
% decorative work.
%
% To use the fonts in \LaTeXe, you select the |bbold| package,
% and then use the |\mathbb| command to get blackboard bold
% mathematics, |\textbb| for text, or |\bbfamily| for longer text.
% The full font is: 
% \begin{center}
%    \bbfamily
%    \fonttable
%    The bbold font family.
% \end{center}
% This was the first full font I implemented, and has a number of
% dubious design features.  It is very geometric, and the stress
% does not conform to that of most Latin fonts---this was an attempt to
% imitate real blackboard handwriting.  The difference in widths
% between `\textbb{a}' and `\textbb{b}' is very noticable.  The lip of
% the `\textbb{r}' is horrible.  However, the uppercase latin letters
% look passable, and they're almost the only ones anyone ever uses.
%
% \section*{Legal rubbish}
%
% This package is copyright \copyright~1989--2002 Alan Jeffrey.
% All rights are reserved.
% The moral right of the author has been asserted.
%
% 
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
% are met:
% 
% \begin{enumerate}
%
% \item Redistributions of source code must retain the above copyright
% notice, this list of conditions and the following disclaimer.
% 
% \item Redistributions in binary form must reproduce the above copyright
% notice, this list of conditions and the following disclaimer in the
% documentation and/or other materials provided with the distribution.
% 
% \item The name of the author may not be used to endorse or promote products
% derived from this software without specific prior written permission.
% 
% \end{enumerate}
%
% THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
% IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
% OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
% IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
% NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
% DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
% THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
% (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
% THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% \StopEventually{}
%
% \section{Installation}
% 
% To begin with, the |bbold| package is
% installed by running \LaTeXe{} on this document, so we begin with
% the installation procedure.  This needs to use \LaTeXe:
%    \begin{macrocode}
%<*install>
\NeedsTeXFormat{LaTeX2e}
%    \end{macrocode}
% First of all, we write out a little |.ins| file which creates the
% |bbold| package:
%    \begin{macrocode}
\begin{filecontents}{bbold.ins}
   \generateFile{bbold.sty}{f}{
      \from{bbold.dtx}{package}}
   \generateFile{fonttabl.sty}{f}{
      \from{bbold.dtx}{fonttabl}}
   \generateFile{Ubbold.fd}{f}{
      \from{bbold.dtx}{fontdef}}
\end{filecontents}
%    \end{macrocode}
% Then we do some horrible low-level hacks to run docstrip on
% |bbold.ins|: 
%    \begin{macrocode}
\bgroup
   \makeatletter
   \let\@@end=\relax
   \def\batchfile{bbold.ins}
   \input{docstrip}
\egroup
%    \end{macrocode}
% That's it for the installation:
%    \begin{macrocode}
%</install>
%    \end{macrocode}
%
% \section{Documentation}
%
% We now provide the documentation driver for this document:
%    \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
\DisableCrossrefs
\OnlyDescription 
\usepackage{bbold,fonttabl}
%    \end{macrocode}
% Then we produce the documentation:
%    \begin{macrocode}
\begin{document}
   \DocInput{bbold.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
% \section{The package}
%
% We can now implement the |bbold| package.
%    \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bbold}[1994/04/06 Bbold symbol package]
%    \end{macrocode}
% \begin{macro}{\mathbb}
% \begin{macro}{\textbb}
% \begin{macro}{\bbfamily}
%    These are the three user commands.  They are just simple calls to
%    \LaTeXe{} font selection.
%    \begin{macrocode}
\newcommand{\bbfamily}{\fontencoding{U}\fontfamily{bbold}\selectfont}
\newcommand{\textbb}[1]{{\bbfamily#1}}
\DeclareMathAlphabet{\mathbb}{U}{bbold}{m}{n}
%</package>
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \section{The font definitions}
%
% The font definitions for the \textbb{bbold} fonts are:
%    \begin{macrocode}
%<*fontdef>
\DeclareFontFamily{U}{bbold}{}
\DeclareFontShape{U}{bbold}{m}{n}
   {  <5> <6> <7> <8> <9> gen * bbold
      <10> <10.95> bbold10
      <12> <14.4> bbold12
      <17.28> <20.74> <24.88> bbold17
   }{}
%</fontdef>
%    \end{macrocode}
%
% \section{A font table package}
%
% The following macros are stolen from |testfont.tex| and can be used
% to print font samples.
%    \begin{macrocode}
%<*fonttabl>
\newcount\m \newcount\n \newcount\p \newdimen\dim
\chardef\other=12
\def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant
\def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
\def\setdigs#1"#2{\gdef\h{#2}% \h=hex prefix; \0\1=corresponding octal
 \m=\n \divide\m by 64 \xdef\0{\the\m}%
 \multiply\m by-64 \advance\m by\n \divide\m by 8 \xdef\1{\the\m}}
\def\testrow{\setbox0=\hbox{\penalty 1\def\\{\char"\h}%
 \\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\A\\B\\C\\D\\E\\F%
 \global\p=\lastpenalty}} % \p=1 if none of the characters exist
\def\oddline{\cr
  \noalign{\nointerlineskip}
  \multispan{19}\hrulefill&
  \setbox0=\hbox{\lower 2.3pt\hbox{\hex{\h x}}}\smash{\box0}\cr
  \noalign{\nointerlineskip}}
\newif\ifskipping
\def\evenline{\loop\skippingfalse
 \ifnum\n<256 \m=\n \divide\m 16 \chardef\next=\m
 \expandafter\setdigs\meaning\next \testrow
 \ifnum\p=1 \skippingtrue \fi\fi
 \ifskipping \global\advance\n 16 \repeat
 \ifnum\n=256 \let\next=\endchart\else\let\next=\morechart\fi
 \next}
\def\morechart{\cr\noalign{\hrule\penalty5000}
 \chartline \oddline \m=\1 \advance\m 1 \xdef\1{\the\m}
 \chartline \evenline}
\def\chartline{&\oct{\0\1x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&}
\def\chartstrut{\lower4.5pt\vbox to14pt{}}
\def\fonttable{$$
  \@namedef{T@OT1}{}% Switch off loading of ot1.def
  \@namedef{T@T1}{}%  and t1.def in the table axes
  \global\n=0
  \halign to\hsize\bgroup
    \chartstrut##\tabskip0pt plus10pt&
    &\hfil##\hfil&\vrule##\cr
    \lower6.5pt\null
    &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
\def\endchart{\cr\noalign{\hrule}
  \raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
  &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$\par}
\def\:{\setbox0=\hbox{\char\n}%
  \ifdim\ht0>7.5pt\reposition
  \else\ifdim\dp0>2.5pt\reposition\fi\fi
  \box0\global\advance\n 1 }
\def\reposition{\setbox0=\vbox{\kern2pt\box0}\dim=\dp0
  \advance\dim 2pt \dp0=\dim}
\def\centerlargechars{
  \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}}
%</fonttabl>
%    \end{macrocode}
%
% \Finale
\endinput