mtheme icon indicating copy to clipboard operation
mtheme copied to clipboard

Set an alternative math font with lualatex

Open stefanocampanella opened this issue 7 years ago • 1 comments

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!

stefanocampanella avatar Apr 13 '18 23:04 stefanocampanella

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}

jakobmoss avatar Jun 20 '18 13:06 jakobmoss