TransWikia.com

Bitmapped blackboard-bold

TeX - LaTeX Asked by NaveganTeX on February 6, 2021

I’ve got a problem with the quality of the number, as can be seen, it’s like it’s got a pixel or something like that. How can I fix it?

enter image description here

There has to be a workaround for this issue. In TeX everything is possible.
mwe:

documentclass{article}
usepackage{bbm}
begin{document}
[ mathbbm{1} ]
end{document}

This could be a workaround but it’s not the same. Here I am using the cmathhbb package:

enter image description here

One Answer

You’re using a package only available in METAFONT. There are many alternatives that come in outline fonts, such as unicode-math in LuaLaTeX and XeLaTeX. In PDFTeX, you can use any of the fonts in mathalpha that support mathbb{1}, or cmathbb (which as of November 2020 is too new for mathalpha to support, but is excellent).

Here is a MWE that works with LuaLaTeX or XeLaTeX:

documentclass{article}
usepackage[default]{fontsetup} % Loads New Computer Modern Book.

begin{document}
[1 in mathbb{1} ]
end{document}

New Computer Modern Math Book sample

Here is a version that uses New Computer Modern Math only for the blackboard-bold numerals:

documentclass{article}
usepackage{unicode-math}

setmathfont{Latin Modern Math}
setmathfont{NewCMMath-Book}[
   range={Bbbzero-Bbbnine},
  Scale=MatchUppercase]

begin{document}
[1 in Bbbone ]
end{document}

I would recommend you use Unicode in LuaLaTeX when you can, and legacy 8-bit fonts in PDFTeX when you have to.

In the comment, you say that you want only this one symbol from another font package. Unlike unicode-math, there’s no standard way to do this with legacy fonts, but you might be able to find the correct font map in the package documentation or copy-and-paste the relevant lines from the .sty file.

Here, for example, is how you can get just that one symbol from cmathbb:

documentclass{article}
usepackage{amssymb}

DeclareMathAlphabetCMath{U}{cmath}{m}{n}
newcommandBbbone{CMath{1}}

begin{document}
[1 in Bbbone ]
end{document}

cmathbb font sample

Answered by Davislor on February 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP