How can I select and specify a font which contains the character I have in my file ?

Missing character: There is no ℕ in font cmss10!

I can see them perfectly within emacs, but I am unable to process them with xelatex because of this error

(edit) in emacs ℕ is said to be :

             position: 129 of 190 (67%), column: 14
            character: ℕ (displayed as ℕ) (codepoint 8469, #o20425, #x2115)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x2115
               script: symbol
               syntax: w    which means: word
             category: .:Base, L:Left-to-right (strong)
             to input: type "\Bbb{N}" or "\bn" with Agda input method
          buffer code: #xE2 #x84 #x95
            file code: #xE2 #x84 #x95 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    mac-ct:-*-Arial Unicode MS-bold-normal-normal-*-12-*-*-*-p-0-iso10646-1 (#xD24)
  • 1
    this for the moronic silent down vote – nicolas Apr 25 '16 at 8:37
  • 2
    Without any hint of how to reproduce the warning, there's not much anybody can say (I wasn't the downvoter). – egreg Apr 25 '16 at 8:40
  • 4
    \usepackage{amssymb} and $\mathbb{N}$ does it. What's the purpose of comparing the font substitutions Emacs makes with typesetting? – egreg Apr 25 '16 at 8:52
  • 1
    @nicolas You should be using the unicode-math package, if you want to input your math as unicode characters. – Henri Menke Apr 25 '16 at 9:03
  • 5
    The question is why your document is trying to use cmss10 to typeset your char. So make a complete example. – Ulrike Fischer Apr 25 '16 at 9:04

cmss10 is not a Unicode font unfortunately - you need to use a font which implements Unicode maths - the TeX Gyre collection is probably a good starting point. Here is an example:

\setmainfont{TeX Gyre Schola}
\setmathfont{TeX Gyre Schola Math}
Some Unicode maths: $x ∈ ℕ$

Process with xelatex or lualatex to produce this:

enter image description here

You may need to install the TeX Gyre fonts.

Some other compatible fonts are listed on the Github page for unicode-math but the list there is slightly out of date. The Tex Gyre project also maintains a list of suitable maths fonts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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