mtheme
mtheme copied to clipboard
Set an alternative math font with lualatex
Hi! I was not able to understand how to change the math font by reading the documentation. Currently I am using LuaLaTeX via TeXLive 2017 on Archlinux and the relevant part of preamble of the document I am compiling is the following
\documentclass[10pt]{beamer}
\usetheme{metropolis}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
\usepackage{microtype}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{mathtools,amssymb}
\usepackage{lualatex-math}
The document compiles without errors, however the math is not typesetted using STIX Two. Thanks in advance!
In my experience, unicode-math can sometimes misbehave if you don't specify a mainfont after loading the package. At least that is how I solved my Lua(La)TeX math font issues. So try:
\usepackage{unicode-math}
\setmainfont{Fira Sans Light}
\setmathfont{STIX Two Math}