I have a problem with the background of my beamer slides. When I compile it on my PC (Windows 7, TeXLive 2015) I get the following background: enter image description here

But when I compile it on my MacBook (Mojave, TeXLive 2018) I get the following background: enter image description here

How can I fix it to get the first one?


  \setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]

\setbeamerfont{section in sidebar}{size=\fontsize{8.7}{8.6}\selectfont}
\setbeamerfont{subsection in sidebar}{size=\fontsize{5.7}{6.7}\selectfont}


\newfontfamily\unicodefont{Remachine Script Personal Use}
\input Starburst.fd


\newfontface\Edwardian{Edwardian Script ITC}
\newfontface\Kunstler{Kunstler Script}


\definecolor{darkgreen1}{rgb}{0, .35, 0}
\definecolor{darkgreen}{rgb}{0, .6, 0}


\setbeamertemplate{footline}[text line]{
    \begin{beamercolorbox}[wd=3.7\paperwidth,ht=2.25ex,dp=1ex,left]{date in head/foot}%
      \usebeamerfont{date in head/foot}
      \hspace*{1ex} \insertframenumber{} / \inserttotalframenumber
      \hspace*{5ex} \insertshortdate
} % makes the footer EMPTY

    % include packages
\usepackage{amsthm, amssymb, amsmath, amsfonts}



\newfontfamily\farsifont[Script=Arabic]{XB Niloofar}

    \advance\@tempdima by\beamer@leftmargin%
    \advance\@tempdima by\beamer@rightmargin%
        \if@tempswa\else\csname beamer@ftecenter\endcsname\fi%
        \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
    \normalfont % body font
    \setbeamercolor{block title example}{bg=orange,fg=white}
    \setbeamercolor{block body example}{bg=orange!20,fg=black}
 %%% %%%%%%%
  \setbeamertemplate{section in sidebar}{\vbox{%
    \beamer@sidebarformat{4pt}{section in sidebar}{\insertsectionhead}}}
\setbeamertemplate{section in sidebar shaded}{\vbox{%
    \beamer@sidebarformat{3pt}{section in sidebar shaded}{\insertsectionhead}}}

  \setbeamercolor{block body}{#2}
  \setbeamercolor{block title}{#3}

  \setbeamercolor{block body}{#3}
  \setbeamercolor{block title}{#4}


\usepackage{xunicode}% provides unicode character macros

    \frametitle{\initfamily Outline}


\title[\textcolor{yellow}{Analysis of Non-Gaussian Spatial Models with Covariates Measurement Error}]
{\Large  Analysis of Non-Gaussian Spatial Models with Covariates Measurement Error}
%\subtitle{The Beamer Class}
\author[\unicodefont{\scriptsize \textcolor{yellow}{Tadayon, V.}}]{\vspace{-.2cm}\Large\textcolor{blue}{\unicodefont{Vahid Tadayon}}}
\institute[SCU]{\normalsize \unicodefont Department of Statistics, \\Shahid Chamran University \\ Supervisor: Prof. A. Rasekh}
\date[{Ph.D. Thesis in Statistics} \hspace{5.3cm}December 4, 2018]\\% \tiny November 2011


\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [baseline=-.5ex]


}% \\[.25cm]

  \frametitle{\initfamily Outline}

  • 1
    You MWE does not compile for me. I have to add \usepackage{tikz} and \initfamily is not defined. I also get a warning about the red class option being obsolete. If I fix these issues I do get the yellow to red shading, so I can't reproduce your MacOS issue. I run texlive 2018 under Linux. – David Purton Nov 24 '18 at 8:22
  • The first thing I would try is to compile your actual MWE on both platforms and see if you get a difference. (Since it doesn't compile as you have it, I assume you haven't actually tried this.) Then, my hunch is that the problem is related to the shadow under the box. The shadow colour matches under MacOS, but doesn't match under your PC screenshot. Just a guess though. – David Purton Nov 24 '18 at 8:24
  • The not matching shading in your first images suggestions, that your beamer version is seriously outdated. – user36296 Nov 24 '18 at 14:18
  • Your code does not compile, but if I add all the necessary package and invent some definitions for some unknown commands, the difference in the colour can be explained by an syntax error: You must not have an empty line between \mode<article> and {. This has the effect that sometimes you are overwriting your background with \setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10] sometimes not, depends on how different versions treat the empty line. Same goes for the linebreak between \usetheme and {Darmstadt}. – user36296 Nov 24 '18 at 14:30
  • Can you clarify which of the backgrounds you want? – user36296 Nov 24 '18 at 15:26

You first set your yellow-red background, but later you overwrite it with \setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]

If you remove this line, you get the yellow-red shading.

Some other comments about your code:

  • The incorrect shading of the shadow in your first image indicates that your beamer version is seriously outdated. You should update your tex distribution

  • the beamer option red is obsolete. Use \usecolortheme[rgb={0.7,0.2,0.2}]{structure} instead

  • You don't need xcolor, graphicx or url with beamer

  • don't load packages multiple times

  • It makes little sense to load multicol with beamer, because beamer has it's own column mechanism

  • you should not use epsfig in any document written in this millennium

  • times is obsolete, there are much better packages for times font

  • instead of colortbl better pass xcolor={table} as documentclass option to beamer

  • The new line after the optional argument of \date makes no sense and the mandatory argument is missing

% !TeX TS-program = xelatex



    %\setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]


\title[\textcolor{yellow}{Analysis of Non-Gaussian Spatial Models with Covariates Measurement Error}]
{\Large  Analysis of Non-Gaussian Spatial Models with Covariates Measurement Error}
\date[{Ph.D. Thesis in Statistics} \hspace{5.3cm}December 4, 2018]{}%\\% \tiny November 2011




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.