I need to compile a beamer slideshow with xelatex. I set "Latin Modern Math" as my math font but it was reset to sans serif. Looks awful.
If I set \documentclass as article, everything works.
Minimal working example:
\documentclass{beamer}
\usepackage{fontspec}
\usepackage{unicode-math}
\defaultfontfeatures{Ligatures={TeX}}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
\setmathfont{Latin Modern Math}
\begin{document}
\begin{frame}
$$
\sin \frac{\pi}{4} = \frac{\sqrt{2}}{2}
$$
\end{frame}
\end{document}
It compiles into pdf file looking like that:
I run Debian stretch, all tex packages are from repos. texlive version:
$ dpkg -s texlive
Package: texlive
Status: install ok installed
Priority: optional
Section: tex
Installed-Size: 68
Maintainer: Debian TeX Maintainers
Architecture: all
Multi-Arch: foreign
Source: texlive-base
Version: 2016.20161008-1
Depends: texlive-latex-base (>= 2016), texlive-latex-recommended (>= 2016), texlive-fonts-recommended (>= 2016)
Description: TeX Live: A decent selection of the TeX Live packages
The TeX Live software distribution offers a complete TeX system. It
encompasses programs for typesetting, previewing and printing of TeX
documents in many different languages, and a large collection of TeX macros
and font libraries. . This metapackage provides a decent selection of the
TeX Live packages which should suffice for the most common tasks. . The
distribution also includes extensive general documentation about TeX, as
well as the documentation accompanying the included software packages.
Homepage: http://www.tug.org/texlive/
xelatex.log is pasted there: http://pastebin.com/MM1h2EU2