it seems that \mathbbm{1}
doesn't display with double lines when one changes to a different font using mathspec
in XeLaTeX. For example, the MWE below uses Palatino, but I couldn't get it to work with any other font (Times New Roman, etc.).
The problem occurs when I try to specify that the math font be applied to numbers: \setmathsfont(Digits){Palatino}
in the preamble. The \mathbbm{1}
symbol displays correctly if you remove the (Digits)
, but then numbers in a math environment don't match those in the text.
If this is a font issue, is there a way to change font temporarily in a math environment so that I could call something like \LatinModern{ \mathbbm{1} }
?
As a separate but related issue, I don't even know how to include the Latin Modern (or whatever the default LaTeX font is) using XeLaTeX since it's not a font in my library.
Thanks for any help you can provide. MWE below.
Minimal Working Example:
\documentclass{article}
\usepackage{bbm, dsfont}
\RequirePackage{mathspec}
\setmathsfont(Digits){Palatino} % causes problem
\begin{document}
This blackboard bold $\mathbbm{1}$ isn't double lined.
Doublestroke package doesn't work either, $\mathds{1}$.
\end{document}
Best Answer
Interaction of
mathspec
with font packages is not really predictable. You can fool the package with this trick:The similar definition for
dsfont
would beor with
dsss
instead ofdsrom
if the sans serif version is preferred.A different approach would be to use
unicode-math
and the TG Pagella Math font: