I'm using plain TeX with AmsTeX. I can get blackboard bold capital letters, but not numbers. For example, the command \Bbb A
prints a capital blackboard bold letter A, but the command \Bbb 1
displays a strange symbol which, of course, is not a blackboard bold number.
2 Answers
The msbm
font has only blackboard bold uppercase letters and the lowercase k.
If you want digits, you have to use another blackboard bold font.
Here's the code for bbold
\input amstex
\loadmsbm
\catcode`@=11
\font@\tenbbold=bbold10
\font@\sevenbbold=bbold7
\font@\fivebbold=bbold5
\newfam\bboldfam
\textfont\bboldfam=\tenbbold
\scriptfont\bboldfam=\sevenbbold
\scriptscriptfont\bboldfam=\fivebbold
\def\xbb{\RIfM@\expandafter\xbb@\else
\expandafter\nonmatherr@\expandafter\xbb\fi}
\def\xbb@#1{{\xbb@@{#1}}}
\def\xbb@@#1{\noaccents@\fam\bboldfam\relax#1}
\catcode`@=\active % @ is active in amstex
$\Bbb{A}\xbb{0123456789}$
\bye
In plain TeX, you can use OPmac:
\input opmac
%% adding math family for bbold fonts:
\regtfm bbold 0 bbold5 5.5 bbold6 6.5 bbold7 7.5 bbold8 8.5 bbold9 9.5
bbold10 11.1 bbold12 15 bbold17 *
\def\xbbchar{\fam15 }
\addto\normalmath {\loadmathfamily 15 bbold } \normalmath
\addto\boldmath {\loadmathfamily 15 bbold }
Ten points: $\bbchar ABCDEF_G$, $\xbbchar 01234_5$.
\typosize[12/14] Twelve points: $\bbchar ABCDEF_G$, $\xbbchar 01234_5$.
\end
You can see, that simple font-size changing is possible:
When OPmac is loaded then all math symbols from AMS TeX are available. This implies that there is no need to load amstex.tex
explicitly. But you can do this, of course. If you do this, then I recommend first to load amstex.tex
and second opmac.tex
. The second file re-defines the font settings and math symbols to more intelligent way.
Edit: I've added the loading of the new font family bbold* using OPmac because OP needs the bbchars for digits. The new math font selector \xbbchar
is declared. The font-size changing is working too. Note, that the \regtfm
is used here because we have more optical sizes of bbold*.tfm
files: 5, 6, 7, 8, 9, 10, 12 and 17.
-
-
-
Of course this is not fully compatible with AMSTeX, as it doesn't use
\font@
. Why\fam15
? Can't OPMac use\newfam
instead of explicit numbers?– egregApr 1, 2015 at 18:21 -
@egreg OPmac allocates fam0 to fam13. The fam14 and fam15 are in "user space". There is no more fams in classical TeX. OPmac documentation recommends to users to choose between 14 and 15 directly. Of course, if we are using a TeX extension with more than 16 fams then
\newfam
allocator has its sense.– wipetApr 1, 2015 at 18:56 -
@wipet Thank's for having pointed me out the OPmac format. It seems really interesting :)– UserApr 1, 2015 at 19:01
msbm
fonts are for the uppercase letters and the lowercase k.