Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
365 lines (306 sloc) 10.8 KB
\newcommand{\A}{\mathcal{A}}
\newcommand{\Tr}{\textrm{Tr}}
\newcommand{\RR}{\mathbb{R}}
\definecolor{white}{rgb}{255, 255, 255}
\definecolor{black}{rgb}{0, 0, 0}
\newcommand{\putat}[3]{\begin{picture}(0,0)(0,0)\put(#1,#2){#3}\end{picture}}
% overlay aware strikeout
\renewcommand<>{\sout}[1]{%
\alt#2{\beameroriginal{\sout}{#1}}{#1}
}
\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\topsep}{0pt}%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
\setlength{\listparindent}{\parindent}%
\setlength{\itemindent}{\parindent}%
\setlength{\parsep}{\parskip}%
}%
\item[]}{\end{list}}
\newcommand\CopyrightText[2][white]{%
\begin{textblock*}{\paperwidth}(0\paperwidth,.97\paperheight)%
\hfill\textcolor{#1}{\tiny#2}\hspace{20pt}
\end{textblock*}
}
% \textcircled{c}
\newcommand{\citeFoot}[1]
{
\rule{\linewidth}{0.5pt}
{\scriptsize #1}
}
\newcommand<>\citeframe[1]{%
\footnote#2{\citeauthor{#1}, \citetitle{#1}. \citeyear{#1}.}%
}
\newcommand{\citeone}[1]{%
[#1]%
}
\newcommand{\citeframeNoNumber}[2][1]
{\only<#1->{\let\thefootnote\relax\footnote{\citeauthor{#2}, \citetitle{#2}. \citeyear{#2}.}}}
\newcommand{\fullFrameImage}[3][black] % arguments: \fullFrameImage[color of text on page]{path to image}{content of frame}
{
{
\usebackgroundtemplate{\includegraphics[height=\paperheight]{#2}}
\setbeamercolor{normal text}{bg=black,fg=#1}
\frame
{
#3
}
}
}
% delay starting the itemize by 1
% for use with <+-> style itemizes / overlays
\newcommand{\delayitem}[0]{\setcounter{beamerpauses}{2}}
\newcommand{\fullFrameImageScaled}[3][white] % arguments: \fullFrameImage[color of text on page]{path to image}{content of frame}
{
{
\setbeamercolor{normal text}{bg=black,fg=#1}
% to make this work for both horizontally filled and vertically filled images, we create an absolutely
% positioned textblock* that we force to be the width of the slide.
% we then place it at (0,0), and then create a box inside of it to ensure that it's always 95% of the vertical
% height of the frame. Once we have created an absolutely positioned and sized box, it doesn't matter what
% goes inside -- it will always be vertically and horizontally centered
\frame
{
\begin{textblock*}{\paperwidth}(0\paperwidth,0\paperheight)
\centering
\vbox to 0.95\paperheight {
\vfil{
\includegraphics[width=\paperwidth,height=0.95\paperheight,keepaspectratio]{#2}
}
\vfil
}
\end{textblock*}
#3
}
}
}
\newcommand{\fullFrameImageScaledWhite}[3][black] % arguments: \fullFrameImage[color of text on page]{path to image}{content of frame}
{
{
\setbeamercolor{normal text}{bg=white,fg=#1}
% to make this work for both horizontally filled and vertically filled images, we create an absolutely
% positioned textblock* that we force to be the width of the slide.
% we then place it at (0,0), and then create a box inside of it to ensure that it's always 95% of the vertical
% height of the frame. Once we have created an absolutely positioned and sized box, it doesn't matter what
% goes inside -- it will always be vertically and horizontally centered
\frame
{
\begin{textblock*}{\paperwidth}(0\paperwidth,0\paperheight)
\centering
\vbox to 0.95\paperheight {
\vfil{
\includegraphics[width=\paperwidth,height=0.95\paperheight,keepaspectratio]{#2}
}
\vfil
}
\end{textblock*}
#3
}
}
}
\newcommand{\fullFrameImageScaledOld}[3][white]
{
{
\setbeamertemplate{background canvas}[vertical shading][bottom=#1,top=#1]
\hspace{-1.37cm}
\frame
{
\vfill
\includegraphics[width=\paperwidth]{#2}
\vfill
#3
}
}
}
\newcommand{\fullFrameImageH}[3][black]
{
{
\usebackgroundtemplate{\includegraphics[height=\paperheight]{#2}}
\setbeamercolor{normal text}{bg=black,fg=#1}
\frame[plain]{#3}
}
}
\newcommand{\fullFrameImageW}[3][black]
{
{
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{#2}}
\setbeamercolor{normal text}{bg=black,fg=#1}
\frame{#3}
}
}
%\newcommand{\fullFrameMovie}[4][white] % optional arg: color of page number, first argument: filename, second argument: looping, 3rd argument: text below
%{
%{
%\setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black]
%\setbeamercolor{normal text}{bg=black,fg=#1}
%\frame
%{
%\begin{textblock*}{\paperwidth}(0px,0px)%
%\movie[width=\paperwidth,height=0.93\paperheight,loop=#3,poster]{}{#2}
%\end{textblock*}
%#4
%}
%}
%}
\newcommand{\fullFrameMovieHd}[2]
{
{
\setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black]
%\setbeamercolor{background canvas}{bg=black}
\frame[plain]
{
%the width and height are right for a 16:9 aspect ratio and
%latex default page size of 5.04inx3.78in
\begin{textblock*}{\paperwidth}(0in,0.4725in)%
\href{run:#1?autostart&loop}{\includegraphics[width=\paperwidth,height=0.5625\paperwidth]{#2}}
\end{textblock*}
}
}
}
% \fullFrameMovieAvi[loop or noloop (and other arguments]{moviename_with_no_extention}{text after like \CopyrightText{my image}}
\newcommand{\fullFrameMovieAvi}[3][loop]
{
{
\setbeamercolor{background canvas}{bg=black}
% to make this work for both horizontally filled and vertically filled images, we create an absolutely
% positioned textblock* that we force to be the width of the slide.
% we then place it at (0,0), and then create a box inside of it to ensure that it's always 95% of the vertical
% height of the frame. Once we have created an absolutely positioned and sized box, it doesn't matter what
% goes inside -- it will always be vertically and horizontally centered
\frame[plain]
{
\begin{textblock*}{\paperwidth}(0\paperwidth,0\paperheight)
\centering
\vbox to 0.95\paperheight {
\vfil{
\href{run:#2.avi?autostart&#1&nobar}{\includegraphics[width=\paperwidth,height=0.95\paperheight,keepaspectratio]{#2.jpg}}
}
\vfil
}
\end{textblock*}
#3
}
}
}
% arguments:
% \fullFrameMovie[loop or noloop]{moviename.avi}{posterimage.jpg}{text after like \CopyrightText{my image}}
\newcommand{\fullFrameMovie}[4][loop]
{
{
\setbeamercolor{background canvas}{bg=black}
% to make this work for both horizontally filled and vertically filled images, we create an absolutely
% positioned textblock* that we force to be the width of the slide.
% we then place it at (0,0), and then create a box inside of it to ensure that it's always 95% of the vertical
% height of the frame. Once we have created an absolutely positioned and sized box, it doesn't matter what
% goes inside -- it will always be vertically and horizontally centered
\frame[plain]
{
\begin{textblock*}{\paperwidth}(0\paperwidth,0\paperheight)
\centering
\vbox to 0.95\paperheight {
\vfil{
\href{run:#2?autostart&#1}{\includegraphics[width=\paperwidth,height=0.95\paperheight,keepaspectratio]{#3}}
}
\vfil
}
\end{textblock*}
#4
}
}
}
\newcommand{\fullFrameMovieAviH}[3][loop]
{
{
\setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black]
%\setbeamercolor{background canvas}{bg=black}
\frame[plain]
{
\href{run:#2.avi?autostart&#1}{\includegraphics[height=0.95\paperheight]{#2.jpg}}
#3
}
}
}
\newcommand{\fullFrameMovieH}[2]
{
{
\setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black]
%\setbeamercolor{background canvas}{bg=black}
\hspace{-1.37cm}
\frame[plain]
{
\href{run:#1?autostart&loop}{\includegraphics[height=\paperheight]{#2}}
}
}
}
\newcommand{\fullFrameMovieAviHd}[1]
{
{
\setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black]
%\setbeamercolor{background canvas}{bg=black}
\frame[plain]
{
%the width and height are right for a 16:9 aspect ratio and
%latex default page size of 5.04inx3.78in
\begin{textblock*}{\paperwidth}(0in,0.4725in)%
\href{run:#1.avi?autostart&loop}{\includegraphics[width=\paperwidth,height=0.5625\paperwidth]{#1.jpg}}
\end{textblock*}
}
}
}
\newcommand{\inlineMovieAvi}[3][autostart&loop]
{
\href{run:#2.avi?#1}{\includegraphics[#3]{#2.jpg}}
}
%inlineMovie[autostart&loop]{movie.avi}{frame.jpg}{width=\textwidth}
\newcommand{\inlineMovie}[4][autostart&loop]
{
\href{run:#2?#1}{\includegraphics[#4]{#3}}
}
\newcommand{\videoPoster}[1]
{
\setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black]
%\setbeamercolor{background canvas}{bg=black}
\frame[plain]
{
\begin{textblock*}{\paperwidth}(0in,0.4725in)%
\includegraphics[width=\paperwidth,height=0.5625\paperwidth]{#1}
\end{textblock*}
}
}
\newcommand{\fullFrameMovieSwf}[2]
{
{
\setbeamertemplate{background canvas}[vertical shading][bottom=white,top=white]
\frame[plain]
{
\begin{textblock*}{\paperwidth}(0px,0px)%
\flashmovie[width=\paperwidth,height=0.96\paperheight,auto=1,controlbar=0]{#1}
\end{textblock*}
#2
}
}
}
\newcommand{\blackframe}
{
{
\setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black]
\frame[plain]{}
\addtocounter{framenumber}{-1}
}
}
\newcommand{\startframe}
{
{
\setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black]
\frame[plain]{
\begin{textblock*}{\paperwidth}(0\paperwidth,.03\paperheight)%
\textcolor{white}{. \hfill .}
\end{textblock*}
\begin{textblock*}{\paperwidth}(0\paperwidth,.97\paperheight)%
\textcolor{white}{. \hfill .}
\end{textblock*}
}
\addtocounter{framenumber}{-1}
}
}