TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I included the blackboard bold characters adding the following lines to my preamble. (Inspired by txfonts.sty)



\DeclareRobustCommand*{\mathbb}[1]{\csname m@thbbch@r#1\endcsname}

Now I wonder whether there is a more elegant way to achieve this goal. But replacing the above with


yields the typical \mathfrak-characters.

(I should mention that the packages fourier, amsmath, amssymb are loaded.)

share|improve this question
up vote 4 down vote accepted

Of course you have to use only one character in the argument of \mathbb.

Explanation: LaTeX assign a math group to lettersA and refers internally to this math group number as \symlettersA. Thus we have to build the mathchar code as the four byte hexadecimal number

<class><mathgroup><two bytes for the character's slot>

Here <class> is 0, because we want an ordinary symbol and so we need to multiply \symlettersA by 256 and add the slot. Since there's an offset of 64 places for the blackboard letters with respect to their usual location, we add 64 to the ASCII code of the argument.

share|improve this answer

the blackboard bold alphabet (uppercase only) is located in an area "above" the range of normal ascii. the normal uppercase area is occupied by fraktur, as you discovered.

an easy way to determine where particular glyphs are located is to generate a font chart for the font in question, comparing it with the canonical cmr10. you can do this interactively from the command line, with these instructions:

tex testfont
txmia at 10pt

(there will be a prompt for every line after the first.)

compare the charts on the two pages and you will readily see the relative locations.

there is undoubtedly an elegant way to express the "offset" between the ascii uppercase area and that occupied by the blackboard bold in txmia so that \mathbb can be redefined, but what you've done is straightforward and reliable. however, if i were doing it, i'd probably represent the locations in hex ("201 - "232) rather than decimal (129 - 154).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.