josephwright / beamer

A LaTeX class for producing presentations and slides
Other
1.44k stars 143 forks source link

Beamer class doesn't print trigonometric functions in combination with unicode-math and lualatex #465

Closed ghost closed 6 years ago

ghost commented 6 years ago

Dear developers,

the Beamer class doesn't print trigonometric functions in combination with unicode-math and lualatex if the option \usefonttheme{professionalfonts} is not set.

So the code without the option \usefonttheme{professionalfonts} does NOT compile with lualatex

\documentclass[ngerman]{beamer}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{polyglossia}
\setdefaultlanguage[variant=german,spelling=new,babelshorthands=true]{german}

\begin{document}

\begin{frame}
  $\cos$  \\
  $\tan$  \\
  $\sin$
\end{frame}

\end{document}

whereas the code with the option \usefonttheme{professionalfonts} compiles with lualatex

\documentclass[ngerman]{beamer}
\usefonttheme{professionalfonts}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{polyglossia}
\setdefaultlanguage[variant=german,spelling=new,babelshorthands=true]{german}

\begin{document}

\begin{frame}
  $\cos$  \\
  $\tan$  \\
  $\sin$
\end{frame}

\end{document}

As the LM Math seems like a "standard font" for more modern compilers as xelatex/lualatex could you add it to the list of fonts mentioned in the paragraph "\usefonttheme{professionalfont}" of chapter 18.1 "Font Themes" of your documentation?

Regards

PS: Using the option \usefonttheme{professionalfont} gives me error message

! LaTeX Error: File `beamerfontthemeprofessionalfont.sty' not found.

whereas the option \usefonttheme{professionalfonts} does work. So the documentation and the implementation seems to differ in this point!

louisstuart96 commented 6 years ago

Your second MWE goes well with the latest version of beamer. You can provide the version information of beamer you're using (probably with version of your TeX distribution) to help us deal with this problem.

P.S. The option is indeed 'professionalfonts', which is right in current version of beameruserguide. I'm not sure whether the old version has some error here.

ghost commented 6 years ago

The beamer version is (from the log file) Document Class: beamer 2015/01/05 3.36 A class for typesetting presentations (rcs-revision 8a39122e1f63) and the user guide is The beamer class; User Guide for version 3.36.

Now I see that my version is pretty outdated, sorry for the inconvenience.

josephwright commented 6 years ago

I think this is 'worksforme' (so 'invalid'): I get the same results as @louisstuart96.