Open lfmcmillan opened 4 years ago
To clarify, $\bm{x}$ also breaks, but $\mathbf{x}$ is ok, but neither works for greek letters
@lfmcmillan You should use the package unicode-math
together with the mtheme and the font "Fira Math" is especially suited as companion to Fira Sans: https://github.com/firamath/firamath.
With unicode-math
you then have to use \symbf{\theta}
Minimal example:
\documentclass[1610]{beamer}
\usefonttheme{professionalfonts}
\usetheme{metropolis}
\usepackage{fontspec}
\setsansfont[BoldFont={Fira Sans SemiBold}]{Fira Sans Book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[
mathrm=sym,
math-style=ISO, % Greek letters also in italics
bold-style=ISO, % bold letters also in italics
]{unicode-math}
\setmathfont{Fira Math}
% top is still missing in Fira Math, get it from another font
\setmathfont[range={\top}]{XITS Math}
\begin{document}
\begin{frame}[t]{Example}
\begin{align}
\symbf{\theta} &= (1, 2, 3)^\top \\
\theta_0 &= 1
\end{align}
\end{frame}
\end{document}
There are several other math fonts and you should always set one. Go with "Latin Modern Math" for the "TeX" font.
With Fira Math
(and \top
from XITS Math):
With Latin Modern Math
:
If I try to include \mathbf around greek letters, or try to use the \bm command instead which is actually the better way of producing bold greek letters, I get various errors when trying to compile
Minimal non-working example:
title: Greek symbols, mathbf and bm with Metropolis output: beamer_presentation: theme: "metropolis" latex_engine: xelatex header-includes:
\usepackage{bm}
Greek symbols
This $\mathbf{\theta}$ should be a greek symbol using
This should be a greek symbol using
Neither works.