I am trying to make the font of a Beamer presentation match that of a co-author who is using Powerpoint. The Powerpoint font is Helvetica Light.
In XeLatex I used \usepackage{fontspec}
and \setmainfont{...}
,
as well as a \usefonttheme{professionalfonts}
.
This seems to work. EXCEPT THAT, the math fonts are now broken:
anything that was in \mathbf{}
appears to be transformed to HelveticaLight also.
Whereas math that is not \mathbf
looks "normal" (I think serif, CM font). Inconsistent and ugly!
How can I cause the \mathbf{}
symbols to look as they would if I had not
requested the helvetica font?
Here is an example:
\documentclass{beamer}
\usepackage[scaled]{helvet} % does not seem to work
\usetheme{Antibes}
\usecolortheme{dove}
\usefonttheme{professionalfonts}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{HelveticaLight.ttf}
\usepackage{beamerprosper}
\begin{document}
\begin{slide} { Bad Fonts Mixture }
Here is the problem:
\[
\sum_k (d_k - \mathbf{b}^T \mathbf{x})^2
\]
The $\mathbf{b}^T \mathbf{x}$ is in helvetica light and looks bad next to the $d_k$.
\end{slide}
\end{document}
Best Answer
With LuaLaTeX (or may be XeLaTeX in case you use that) comment
\usepackage[scaled]{helvet}
and use\setsansfont
instead of\setmainfont
; that works for me. However, if you want to ensure that math is not touched byfontspec
you should load it with\usepackage[no-math]{fontspec}
.And, in case you use pdfLaTeX, don't use
fontspec
(nor\setmainfont
) and it should work (although not light).