# problem with math font and LuaLaTeX

The following code works fine if compiled in pdflatex:

\documentclass{beamer}
\usepackage{quattrocento}
\begin{document}
\begin{frame}
Quattrocento $30\cdot40$
\end{frame}
\end{document}


As is explained by egreg in my previous question (Getting Quattrocento as math font in article class) beamer automatically uses the text font for letters and numbers in mathmode.

Now I need to compile my presentation with LuaLaTeX, so I changed the code to:

\documentclass{beamer}
\usepackage{fontspec}
\usepackage{unicode-math}
\setsansfont{Quattrocento}
\setmathfont{Quattrocento}
\begin{document}
\begin{frame}
Quattrocento ${30\cdot40}$
\end{frame}
\end{document}


However in this way the \cdot is not printed (I'm assuming because the symbol is not in the Quattrocento font, and now the font is used for all math symbols, not only letters-numbers).

How can I restore beamer behavior with pdflatex when using lualatex?

• Quattrocento doesn't qualify as a math font. Don't load unicode-math, add the option no-math to fontspec and load mathastext as in the other case. – egreg Nov 12 '13 at 23:01

Quattrocento doesn't qualify as a math font for \setmathfont; fonts for this purpose should be specially tailored for math, with hundreds of symbols and some internal tables.

You can, for limited purposes, use mathastext, but you have also to load fontspec with the no-math option:

\documentclass{beamer}
\usefonttheme{professionalfonts}

\usepackage[no-math]{fontspec}
\usepackage[sfdefault]{quattrocento}
\usepackage[italic]{mathastext}

\begin{document}
\begin{frame}
Quattrocento $30\cdot40+ab-c$
\end{frame}
\end{document}


Note that ${30\cdot 40}$ is not necessary; adding braces could even be dangerous if not done properly: better remove them.

• yes, sorry, the braces are the result of some experiments I was doing before posting, I'll remove them from the question. Thank you. – Gargoyle Nov 13 '13 at 0:34
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9691725969314575, "perplexity": 2659.713958963955}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-30/segments/1563195529480.89/warc/CC-MAIN-20190723151547-20190723173547-00542.warc.gz"}