I'm having an odd problem---it seems like XeLaTeX isn't working so well with beamer. I'm using MacTex 2011 and have updated to the latest packages using the TexLive utility.
The problem is that compiling with XeLaTeX prevents me from using the \setbeamertemplate command more than once.
As an example, I would like to have two slides with different backgrounds, say one with a blue gradient and the next with a red gradient. See the following sample code:
\documentclass[12 pt]{beamer}
\begin{document}
\setbeamertemplate{background canvas}[vertical shading][bottom=blue!30, top=white]
\begin{frame}[t]\frametitle{This should have a blue gradient}
Since this is the first instance of \texttt{setbeamertemplate}, it works properly.
\end{frame}
\setbeamertemplate{background canvas}[vertical shading][bottom=red!30, top=white]
\begin{frame}[t]\frametitle{This should have a red gradient}
However, if \texttt{XeLaTeX} is run, this will still show as blue.
\end{frame}
\end{document}
If I compile with PdfLaTeX, then this works as hoped.
However, if I compile with XeLaTeX, then BOTH slides have blue gradient backgrounds. The second \setbeamertemplate{background canvas} call is ignored.
Does anyone have any suggestions for this or an explanation for what's happening?
fontspec) and LuaLaTeX (with or withoutfontspec), but get the odd behaviour with XeLaTeX with or withoutfontspec. So this looks more like something to do with the engine thanfontspec. Does this match what you see? – Joseph Wright Sep 25 '11 at 18:57fontspecalso doesn't give the correct behavior, so it seems to be a XeLaTex issue not a fontspec issue. Should I edit the post accordingly? – Flip Sep 25 '11 at 19:03@⟨name⟩syntax (like @Joseph) then people will get notified of your response. – Caramdir Sep 25 '11 at 19:06pgfand not bybeamer. The colour settings in the\specialcommands seem to be right, so I wonder if as @AlanMunn suggests this is a problem with XeTeX/xdvipdfmx. – Joseph Wright Sep 25 '11 at 19:41\def\pgfsysdriver{pgfsys-dvipdfmx.def}before the\documentclassline, you get the correct output on the MWE. (No guarantees on anything else, though.) – Alan Munn Sep 25 '11 at 19:48