2

I'm using xelatex and I'm having a very strange problem:

while

\documentclass{article}

\usepackage{xparse}
\usepackage{subfig}
\usepackage{amsmath}                                            
\usepackage{amsfonts}                                          
\usepackage{amssymb}                                            
\usepackage{amsthm}                                             
\usepackage{unicode-math} 
\begin{document}
  $$
  \sin(x)
  $$
\end{document}

is working perfectly:

\documentclass{beamer}

\usepackage{xparse}
\usepackage{subfig}
\usepackage{amsmath}                                            
\usepackage{amsfonts}                                          
\usepackage{amssymb}                                            
\usepackage{amsthm}                                             
\usepackage{unicode-math} 
\begin{document}
\begin{frame}
  $$
  \sin(x)
  $$
\end{frame}
\end{document}

doesn't dislay the "sin". It looks completely blank. How can I solve this problem?

4

Internally, beamer replaces certain fonts. Apparently the you don't have the replacement font in a place where XeLaTeX can find it, so it doesn't appear. To suppress this replacement, you can either load the beamer class with the professionalfont option, or add \usefonttheme{professionalfonts} to your preamble. (Note the difference!) See section 18.1 of the beamer documentation for details.

Also, see Why is [ … ] preferable to $$ … $$?

\documentclass[professionalfont]{beamer}
%\usefonttheme{professionalfonts}
\usepackage{xparse}
\usepackage{subfig}
\usepackage{amsmath}                                            
\usepackage{amsfonts}                                          
\usepackage{amssymb}                                            
\usepackage{amsthm}                                             
\usepackage{unicode-math} 
\begin{document}
\begin{frame}
  \[
  \sin(x)
  \]
\end{frame}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.