2

I read a similar question in another thread (regarding kpfonts) but could not apply the solution to solve my problem. I'd like to use newtxmath blackboard fonts instead of the usual ones. Is there an easy way to load them? I'm using XelateX. Thank you and regards.

\documentclass[14pt, a4paper, reqno]{extarticle}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[lite]{mtpro2}
\usepackage{mathspec}   % https://ctan.org/pkg/mathspec     

\setmainfont{Old Standard}
\setmathsfont(Digits)[Scale=0.9]{Old Standard}
\setmathsfont(Latin){Old Standard}
\setmathsfont(Greek)[Uppercase=Regular,Lowercase=Regular]{GFS Didot}
\setmathrm{Old Standard}

\usepackage[bb=tx]{mathalpha}


\begin{document}

$F\, (x_{\, 1},\dots ,x_{\, n})$ $\mathbb{R}$ $\partial$  $\sum$

\end{document}

2 Answers 2

1

Load \usepackage[bb=px]{mathalpha}, possibly with a bbscaled= option. You might also try bb=txof for the outline font.

ETA: As of June 2021, the bb=tx option of mathalpha is broken. You can try whichever of the others you like, redefine \mathbb in the same complex way as newtxmath.sty, or, most simply, use unicode-math instead of mathspec. This lets you add the command:

\setmathfont{TeX Gyre Termes Math}[range=bb, Scale=MatchUppercase]

STIX Two Math would be another good choice here.

9
  • Thank you very much for the comments and help. I tried with tx and got no output! 0 errors, 0 pages. The outline option works (but it is way different from the tx blackboard font). Any other suggestion?
    – Anibal
    Jun 3, 2021 at 14:22
  • @Anibal Could you post a MWE?
    – Davislor
    Jun 3, 2021 at 14:24
  • Sure. When I run the code below without the line for mathalpha, it works. When I include the mathalpha line, I get no errors but 0 pages.
    – Anibal
    Jun 3, 2021 at 16:21
  • \documentclass[14pt, a4paper, reqno]{extarticle} \usepackage{amsmath} \usepackage{amsfonts} \usepackage[lite]{mtpro2} \usepackage{mathspec} \setmainfont{Old Standard} \setmathsfont(Digits)[Scale=0.9]{Old Standard} \setmathsfont(Latin){Old Standard} \setmathsfont(Greek)[Uppercase=Regular,Lowercase=Regular]{GFS Didot} \setmathrm{Old Standard} \usepackage[bb=tx]{mathalpha} \begin{document} $\mathbb{R}$ \end{document}
    – Anibal
    Jun 3, 2021 at 16:23
  • @Anibal It's preferable to edit it into your question, but thanks.
    – Davislor
    Jun 3, 2021 at 16:31
1

Unfortunately mathalpha is buggy.

You can directly set the math alphabet in a similar way as newtxmath does.

%\documentclass[14pt, a4paper, reqno]{extarticle}
\documentclass{article}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[lite]{mtpro2}
\usepackage{mathspec}   % https://ctan.org/pkg/mathspec     

\setmainfont{Old Standard}
\setmathsfont(Digits)[Scale=0.9]{Old Standard}
\setmathsfont(Latin){Old Standard}
\setmathsfont(Greek)[Uppercase=Regular,Lowercase=Regular]{GFS Didot}
\setmathrm{Old Standard}

\DeclareMathAlphabet{\mathbb}{U}{ntxsym}{m}{n}


\begin{document}

Some text \emph{x}
$F\, (x_{\, 1},\dots ,x_{\, n})$ $\mathbb{R}$ $\partial$  $\sum$

$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

\end{document}

enter image description here

Compare the list of blackboard bold letters with the following picture

enter image description here

which has been obtained with pdflatex and the file

\documentclass{article}
\usepackage{newtxmath}

\begin{document}

$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

\end{document}

They look exactly the same, don't they?

11
  • Thank you for the patience and replies. It looks like this last example is working, but I get the outline of the blackboard font R. Should I add another option to the declaration? (I'm trying to include an image to show the how the font looks like).
    – Anibal
    Jun 3, 2021 at 17:57
  • Unfortunatiely, the default newtxmath \mathbb font is defined in a rather complicated way, with both \mathfrak and \mathbb packed into non-standard slots of the LettersA font.
    – Davislor
    Jun 3, 2021 at 18:40
  • I saw the command \vmathbb{} to load it (never saw it before). So the conclusion is that it is not possible to load it in this environment, right? :(
    – Anibal
    Jun 3, 2021 at 18:45
  • @Anibal It’s possible, with a lot of work.
    – Davislor
    Jun 3, 2021 at 18:48
  • @Anibal One way is to load newtx LettersA,and write a new \vmathbb that maps the input to the correct slots of LettersA, such as 132 for \vmathbb{A} and 183 for \vmathbb{Z}.
    – Davislor
    Jun 3, 2021 at 18:52

You must log in to answer this question.

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