[OS X TeX] blackboard bold semicolon
Bruno Voisin
bvoisin at me.com
Thu Jul 24 10:35:12 EDT 2008
Le 24 juil. 08 à 14:25, Martin Costabel a écrit :
> This seems to be the way \mathbb is defined. It uses the command
> \DeclareMathAlphabet, and according to the latex font documentation,
>
> "Only symbols of type \mathalpha will be affected by math alphabet
> commands: within the argument of a math alphabet command they will
> produce the character in slot <slot> of that math alphabet's font.
> Symbols of other types will always produce the same symbol (within
> one math version)."
>
> The semicolon is of type \mathpunct, so it will not be affected by
> \mathbb.
Looking at the TeXbook, this seems to date back to decisions made by
Don Knuth on the usual meaning of symbols in formulas. Specifically,
on p. 134 you'll find:
> The two characters `,' (comma) and `;' (semicolon) are treated as
> punctuation marks in formulas; this means that TeX puts a little
> extra space after them, but not before them.
>
> It isn't customary to put extra space after a `.' (period) in math
> formulas, so TeX treats a period as an ordinary symbol. If you want
> the `:' character to be treated as a punctuation mark instead of as
> a relation, just call it \colon.
And accordingly in plain.tex you'll find:
\mathcode`\,="613B
\mathcode`\.="013A
\mathcode`\:="303A
\mathcode`\;="603B
\mathchardef\colon="603A
where the first digit at the beginning of the character definition
defines the character class and is either 0 (ordinary), 3 (relation)
or 6 (punctuation).
This is mirrored in LaTeX in fontmath.ltx by:
\DeclareMathSymbol{,}{\mathpunct}{letters}{"3B}
\DeclareMathSymbol{.}{\mathord}{letters}{"3A}
\DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
\DeclareMathSymbol{;}{\mathpunct}{operators}{"3B}
\DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}
Here what you want is to make the blackboard bold semicolon a binary
operation (class 2), similar to the definition of \circ in either
plain TeX:
\mathchardef\circ="220E
or LaTeX:
\DeclareMathSymbol{\circ}{\mathbin}{symbols}{"0E}
What you need to do, after noticing from the font tables in /usr/local/
texlive/2008/texmf-dist/doc/fonts/amsfonts/amsfndoc.pdf that the AMS
blackboard bold font doesn't include a semicolon, and from Axel's
message earlier in this thread that the bbold symbol font does, is:
- Identify from
/usr/local/texlive/2008/texmf-dist/tex/latex/bbold/bbold.sty
/usr/local/texlive/2008/texmf-dist/tex/latex/bbold/Ubbold.fd
which font the bbold package corresponds to (bbold) and define a new
symbol font (bbsymbol say) based on it:
\DeclareSymbolFont{bbsymbol}{U}{bbold}{m}{n}
- Define a custom blackboard semicolon binary operator:
\DeclareMathSymbol{\bbsemicolon}{\mathbin}{bbsymbol}{"3B}
You're done!
The following works here:
\documentclass[12pt]{article}
\usepackage{bbold}
\DeclareSymbolFont{bbsymbol}{U}{bbold}{m}{n}
\DeclareMathSymbol{\bbsemicolon}{\mathbin}{bbsymbol}{"3B}
\begin{document}
$R\bbsemicolon S$ and $R;S$ do look different.
$R{\mathbb{;}}S$ and $R;S$ don't.
\end{document}
Notice the difference in spacing when defining the semicolon properly
as a binary operator. I think formula breaking across lines in case of
an inline formula would be affected too.
Hope this helps,
Bruno Voisin
More information about the MacOSX-TeX
mailing list