% Copyright 2003--2007 by Till Tantau
% Copyright 2010 by Vedran Mileti\'c
% Copyright 2017 by Joseph Wright
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.

%
% Basic commands for including themes
%
\mode
<presentation>
{
  \def\beamer@calltheme#1#2#3{%
    \def\beamer@themelist{#2}%
    \@for\beamer@themename:=\beamer@themelist\do
    {\usepackage[{#1}]{#3\beamer@themename}}}

  \newrobustcmd*\usetheme[2][]{\beamer@calltheme{#1}{#2}{beamertheme}}
  \newrobustcmd*\usecolortheme[2][]{\beamer@calltheme{#1}{#2}{beamercolortheme}}
  \newrobustcmd*\usefonttheme[2][]{\beamer@calltheme{#1}{#2}{beamerfonttheme}}
  \newrobustcmd*\useoutertheme[2][]{\beamer@calltheme{#1}{#2}{beameroutertheme}}
  \newrobustcmd*\useinnertheme[2][]{\beamer@calltheme{#1}{#2}{beamerinnertheme}}
}

\mode
<article>
{
  \newrobustcmd*\usetheme[2][]{}
  \newrobustcmd*\usecolortheme[2][]{}
  \newrobustcmd*\usefonttheme[2][]{}
  \newrobustcmd*\useoutertheme[2][]{}
  \newrobustcmd*\useinnertheme[2][]{}
}

\mode
<all>
