I want my characters to copy-paste as Unicode when I copy them from the PDF. I also want them to look like the traditional Latin Modern font. For unrelated reasons, I need to use LuaLaTeX rather than pdflatex. The unicode-math
package works fine in most cases, but produces strange sans-serif double-struck characters. How do I fix this?
Example:
\documentclass{article}
\usepackage{amssymb}
\begin{document}
\[\alpha\beta\gamma\pi\sum\prod1+2+3+4+5+6+7+8+9+0/1!\]
\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\]
\[\mathbb{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}\]
\end{document}
in lualatex
gives
whereas
\documentclass{article}
\usepackage{amssymb}
\usepackage{unicode-math}
\begin{document}
\[\alpha\beta\gamma\pi\sum\prod1+2+3+4+5+6+7+8+9+0/1!\]
\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\]
\[\mathbb{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}\]
\end{document}
in lualatex
gives
While most of the characters are identical are nearly identical, the capital double-struck characters are clearly not. They don't even have serifs, unlike the rest of the characters. It's cool that I can now get lowercase double-struck characters, but this doesn't make up for the jarring and stylistically very-different uppercase double-struck characters. The answer at https://tex.stackexchange.com/a/360609/2066 gives the correct characters, but then the characters don't copy-paste as double-struck. How do I get the Latin Modern / Computer Modern double-struck characters back without losing the unicode-copy-paste feature of unicode-math
?
(I'm also curious about the history here; why are these characters so different? https://tex.stackexchange.com/a/525235/2066 says "Latin Modern Math is a clone of Knuth’s Computer Modern, and unicode-math produces nearly-identical output under the default settings (with a few caveats: the \mathcal alphabet is based on Euler Calligraphic instead of traditional LaTeX).")
\mathbb
uses AMS msbm10 font, the AMS fonts don't really blend that well with computer modern at all, and are based on designs aimed to fit with the in house AMS publishing fonts. Conversely with unicode-math all three rows are set from the same font, latin modern Math.\setmathfont{New Computer Modern Math}
\mathbb
with\setmathfont[range=bb]
.