Debian Codegraph @

texmf-dist/source/latex/bbold/bbold.dtx

raw
1 %\iffalse
2 % ====================================================================
3 % @LaTeX-documentation-file{
4 % author = "Alan Jeffrey",
5 % version = "1.01",
6 % date = "08 April 2002",
7 % filename = "bbold.dtx",
8 % address = "CTI, DePaul University,
9 % 243 S. Wabash Ave., Chicago IL 60604, USA",
10 % email = "[email protected]",
11 % codetable = "ISO/ASCII",
12 % keywords = "LaTeX math fonts",
13 % supported = "yes",
14 % abstract = "This is the documentation and
15 % self-extracting archive for the bbold
16 % package. If you run latex2e on it, it will
17 % produce the documentation, as well as
18 % the bbold package and font definition
19 % file.",
20 % package = "stands alone",
21 % dependencies = "none",
22 % }
23 % ====================================================================
24 %\fi
25 %% \CharacterTable
26 %% {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
27 %% 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
28 %% Digits \0\1\2\3\4\5\6\7\8\9
29 %% Exclamation \! Double quote \" Hash (number) \#
30 %% Dollar \$ Percent \% Ampersand \&
31 %% Acute accent \' Left paren \( Right paren \)
32 %% Asterisk \* Plus \+ Comma \,
33 %% Minus \- Point \. Solidus \/
34 %% Colon \: Semicolon \; Less than \<
35 %% Equals \= Greater than \> Question mark \?
36 %% Commercial at \@ Left bracket \[ Backslash \\
37 %% Right bracket \] Circumflex \^ Underscore \_
38 %% Grave accent \` Left brace \{ Vertical bar \|
39 %% Right brace \} Tilde \~}
40 %
41 % \setcounter{StandardModuleDepth}{1}
42 % \def\dst{\expandafter{\normalfont\scshape docstrip}}
43 %
44 % \changes{1.00}{1991/05/23}{File created}
45 % \changes{1.01}{2002/04/08}{Moved to Modified Free BSD license}
46 %
47 % \title{The \textbb{bbold} symbol font}
48 % \author{Alan Jeffrey}
49 % \date{April 2002}
50 %
51 % \maketitle
52 %
53 % \section*{Introduction}
54 %
55 % This document describes the \textbb{bbold} math alphabet. This
56 % is an open (or `blackboard bold') geometric sans serif, intended
57 % mainly for use in mathematics, but which may prove useful for
58 % decorative work.
59 %
60 % To use the fonts in \LaTeXe, you select the |bbold| package,
61 % and then use the |\mathbb| command to get blackboard bold
62 % mathematics, |\textbb| for text, or |\bbfamily| for longer text.
63 % The full font is:
64 % \begin{center}
65 % \bbfamily
66 % \fonttable
67 % The bbold font family.
68 % \end{center}
69 % This was the first full font I implemented, and has a number of
70 % dubious design features. It is very geometric, and the stress
71 % does not conform to that of most Latin fonts---this was an attempt to
72 % imitate real blackboard handwriting. The difference in widths
73 % between `\textbb{a}' and `\textbb{b}' is very noticable. The lip of
74 % the `\textbb{r}' is horrible. However, the uppercase latin letters
75 % look passable, and they're almost the only ones anyone ever uses.
76 %
77 % \section*{Legal rubbish}
78 %
79 % This package is copyright \copyright~1989--2002 Alan Jeffrey.
80 % All rights are reserved.
81 % The moral right of the author has been asserted.
82 %
83 %
84 % Redistribution and use in source and binary forms, with or without
85 % modification, are permitted provided that the following conditions
86 % are met:
87 %
88 % \begin{enumerate}
89 %
90 % \item Redistributions of source code must retain the above copyright
91 % notice, this list of conditions and the following disclaimer.
92 %
93 % \item Redistributions in binary form must reproduce the above copyright
94 % notice, this list of conditions and the following disclaimer in the
95 % documentation and/or other materials provided with the distribution.
96 %
97 % \item The name of the author may not be used to endorse or promote products
98 % derived from this software without specific prior written permission.
99 %
100 % \end{enumerate}
101 %
102 % THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
103 % IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
104 % OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
105 % IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
106 % INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
107 % NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
108 % DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
109 % THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
110 % (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
111 % THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
112 %
113 % \StopEventually{}
114 %
115 % \section{Installation}
116 %
117 % To begin with, the |bbold| package is
118 % installed by running \LaTeXe{} on this document, so we begin with
119 % the installation procedure. This needs to use \LaTeXe:
120 % \begin{macrocode}
121 %<*install>
122 \NeedsTeXFormat{LaTeX2e}
123 % \end{macrocode}
124 % First of all, we write out a little |.ins| file which creates the
125 % |bbold| package:
126 % \begin{macrocode}
127 \begin{filecontents}{bbold.ins}
128 \generateFile{bbold.sty}{f}{
129 \from{bbold.dtx}{package}}
130 \generateFile{fonttabl.sty}{f}{
131 \from{bbold.dtx}{fonttabl}}
132 \generateFile{Ubbold.fd}{f}{
133 \from{bbold.dtx}{fontdef}}
134 \end{filecontents}
135 % \end{macrocode}
136 % Then we do some horrible low-level hacks to run docstrip on
137 % |bbold.ins|:
138 % \begin{macrocode}
139 \bgroup
140 \makeatletter
141 \let\@@end=\relax
142 \def\batchfile{bbold.ins}
143 \input{docstrip}
144 \egroup
145 % \end{macrocode}
146 % That's it for the installation:
147 % \begin{macrocode}
148 %</install>
149 % \end{macrocode}
150 %
151 % \section{Documentation}
152 %
153 % We now provide the documentation driver for this document:
154 % \begin{macrocode}
155 %<*driver>
156 \documentclass{ltxdoc}
157 \DisableCrossrefs
158 \OnlyDescription
159 \usepackage{bbold,fonttabl}
160 % \end{macrocode}
161 % Then we produce the documentation:
162 % \begin{macrocode}
163 \begin{document}
164 \DocInput{bbold.dtx}
165 \end{document}
166 %</driver>
167 % \end{macrocode}
168 %
169 % \section{The package}
170 %
171 % We can now implement the |bbold| package.
172 % \begin{macrocode}
173 %<*package>
174 \NeedsTeXFormat{LaTeX2e}
175 \ProvidesPackage{bbold}[1994/04/06 Bbold symbol package]
176 % \end{macrocode}
177 % \begin{macro}{\mathbb}
178 % \begin{macro}{\textbb}
179 % \begin{macro}{\bbfamily}
180 % These are the three user commands. They are just simple calls to
181 % \LaTeXe{} font selection.
182 % \begin{macrocode}
183 \newcommand{\bbfamily}{\fontencoding{U}\fontfamily{bbold}\selectfont}
184 \newcommand{\textbb}[1]{{\bbfamily#1}}
185 \DeclareMathAlphabet{\mathbb}{U}{bbold}{m}{n}
186 %</package>
187 % \end{macrocode}
188 % \end{macro}
189 % \end{macro}
190 % \end{macro}
191 %
192 % \section{The font definitions}
193 %
194 % The font definitions for the \textbb{bbold} fonts are:
195 % \begin{macrocode}
196 %<*fontdef>
197 \DeclareFontFamily{U}{bbold}{}
198 \DeclareFontShape{U}{bbold}{m}{n}
199 { <5> <6> <7> <8> <9> gen * bbold
200 <10> <10.95> bbold10
201 <12> <14.4> bbold12
202 <17.28> <20.74> <24.88> bbold17
203 }{}
204 %</fontdef>
205 % \end{macrocode}
206 %
207 % \section{A font table package}
208 %
209 % The following macros are stolen from |testfont.tex| and can be used
210 % to print font samples.
211 % \begin{macrocode}
212 %<*fonttabl>
213 \newcount\m \newcount\n \newcount\p \newdimen\dim
214 \chardef\other=12
215 \def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant
216 \def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
217 \def\setdigs#1"#2{\gdef\h{#2}% \h=hex prefix; \0\1=corresponding octal
218 \m=\n \divide\m by 64 \xdef\0{\the\m}%
219 \multiply\m by-64 \advance\m by\n \divide\m by 8 \xdef\1{\the\m}}
220 \def\testrow{\setbox0=\hbox{\penalty 1\def\\{\char"\h}%
221 \\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\A\\B\\C\\D\\E\\F%
222 \global\p=\lastpenalty}} % \p=1 if none of the characters exist
223 \def\oddline{\cr
224 \noalign{\nointerlineskip}
225 \multispan{19}\hrulefill&
226 \setbox0=\hbox{\lower 2.3pt\hbox{\hex{\h x}}}\smash{\box0}\cr
227 \noalign{\nointerlineskip}}
228 \newif\ifskipping
229 \def\evenline{\loop\skippingfalse
230 \ifnum\n<256 \m=\n \divide\m 16 \chardef\next=\m
231 \expandafter\setdigs\meaning\next \testrow
232 \ifnum\p=1 \skippingtrue \fi\fi
233 \ifskipping \global\advance\n 16 \repeat
234 \ifnum\n=256 \let\next=\endchart\else\let\next=\morechart\fi
235 \next}
236 \def\morechart{\cr\noalign{\hrule\penalty5000}
237 \chartline \oddline \m=\1 \advance\m 1 \xdef\1{\the\m}
238 \chartline \evenline}
239 \def\chartline{&\oct{\0\1x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&}
240 \def\chartstrut{\lower4.5pt\vbox to14pt{}}
241 \def\fonttable{$$
242 \@namedef{T@OT1}{}% Switch off loading of ot1.def
243 \@namedef{T@T1}{}% and t1.def in the table axes
244 \global\n=0
245 \halign to\hsize\bgroup
246 \chartstrut##\tabskip0pt plus10pt&
247 &\hfil##\hfil&\vrule##\cr
248 \lower6.5pt\null
249 &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
250 \def\endchart{\cr\noalign{\hrule}
251 \raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
252 &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$\par}
253 \def\:{\setbox0=\hbox{\char\n}%
254 \ifdim\ht0>7.5pt\reposition
255 \else\ifdim\dp0>2.5pt\reposition\fi\fi
256 \box0\global\advance\n 1 }
257 \def\reposition{\setbox0=\vbox{\kern2pt\box0}\dim=\dp0
258 \advance\dim 2pt \dp0=\dim}
259 \def\centerlargechars{
260 \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}}
261 %</fonttabl>
262 % \end{macrocode}
263 %
264 % \Finale
265 \endinput