5

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.

5
  • The blackboard bold characters available in the msbm fonts are for the uppercase letters and the lowercase k.
    – egreg
    Apr 1, 2015 at 14:43
  • amstex? a strange choice this century! Why not use a supported format? Apr 1, 2015 at 15:12
  • @DavidCarlisle I use AmsTeX because is the only reasonable format I found which adds support for typesetting math and is compatible with plain TeX. I once gave LaTeX a change, but I found it to be more complicated for doing simple things and personally I don't like it's philosophy (maybe this is because I learnt TeX through The TeXBook and The Joy of TeX). If I need more advanced LaTeX-like features such as cross-referencing or automatic index and table of contents creation, I use the macros in eplain. So I think I'm not missing anything by using this old unsupported format. Don't you agree?
    – User
    Apr 1, 2015 at 18:57
  • Document creation is a form of communication and ultimately using a language that no one, not even its creators, use anymore, is a completely bizarre choice unless there is an overwhelming large corpus of existing documents that you can not afford to convert. Apr 1, 2015 at 19:07
  • 1
    @DavidCarlisle "not even its creators" Michael Spivak still uses AmsTeX (to be precise, he uses LamsTeX which extends AmsTeX). Anyway, I understand your point of view. By the way, even in the opmac documentation (which I just looked at, thank's to the answer of wipet) amstex is mentioned and it is explained how to properly use opmac alongside amstex. So I don't think it is so old and unused
    – User
    Apr 1, 2015 at 21:05

2 Answers 2

5

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

enter image description here

6

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: bbchar

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.

8
  • But then $\bbchar 123$ gives the problem the OP was trying to avoid.
    – Manuel
    Apr 1, 2015 at 16:02
  • @Manuel Thank you for your comment. I've updated my post.
    – wipet
    Apr 1, 2015 at 16:52
  • 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?
    – egreg
    Apr 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.
    – wipet
    Apr 1, 2015 at 18:56
  • @wipet Thank's for having pointed me out the OPmac format. It seems really interesting :)
    – User
    Apr 1, 2015 at 19:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .