kesmaths-beamer
Author
kesmaths
Last Updated
há 3 anos
License
Creative Commons CC BY 4.0
Abstract
The metropolis theme slightly edited to add some KES maths theming. Showcases some of the most useful commands, when making such presentations.
% !TeX spellcheck = en_B
% !TeX encoding = UTF-8 %%%These comments just make you look like you know what you're doing
\documentclass[8pt]{beamer} %%% Specifies the class, with 8pt font size
\input{preamble} %%%adds the general preamble
\title{{\color{aa}\Huge\adfbullet{9}}AL FM Discrete} %%%Title and subtitle
\subtitle{Template, \textattachfile{Template.tex}{(TeX)}} %%%This embeds the tikz source code into the resulting pdf...
\begin{document}
\frame{\titlepage} %%%Makes titlepage
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt} %%%Compresses math
\begin{frame}{Title} %%%Frame with title
Here is some normal text. Followed by a list.
\begin{itemize}
\item First item.
\item Second item
\item \begin{itemize}
\item<+-> List inside a list!!
\item<+-> And another. These appear one at a time.
\end{itemize}
\item Final item
\end{itemize}
\alert<+->{Here is an alert which is only highlighted on the last slide}
\end{frame}
\begin{frame}{Boxes}
There are three commonly used boxes.
\begin{definition}
This is a \textbf{definition box}, it can be helpful to put the word being defined into bold text.
\end{definition}
\begin{problem}
This is a problem box. With some displayed math...
\[y=x^2\]
\end{problem}
\begin{solution}<2->
This is a solution which only appears on the next slide.
\end{solution}
\begin{solution}<3->
Appears even later!
\end{solution}
\end{frame}
\begin{frame}{The sol command}
The first time you use \sol{it doesn't cover it up}.
However the second time \sol{it does}.
You can put math inside it, $5x+4x=$ \sol{$9x$}
And you can use it inside a math environment:
\begin{align*}
y &= \sol{5} \\
x &= \sol{$x^2$} \\
xy &= \sol{$5x^2$}
\end{align*}
But this will throw up some errors, but still compile.
\end{frame}
\begin{frame}{columns}
\begin{columns}
\begin{column}{.5\linewidth}
Columns can be very useful.
\end{column}
\begin{column}{.5\linewidth}
To display info side by side.
\end{column}
\end{columns}
\begin{columns}[T] %%%Aligned at the top!!!
\begin{column}{.5\linewidth}
\begin{problem}
You can even put boxes inside the columns to save space.
\end{problem}
\end{column}
\begin{column}{.5\linewidth}
\begin{solution}<2->
With a solution.
\end{solution}
\end{column}
\end{columns}
\begin{definition}
\noindent
\begin{minipage}{.4\linewidth}
Using columns inside boxes is best achieved with minipages.
\end{minipage}%
\begin{minipage}{.6\linewidth}
\begin{center}
\colorbox{cc!30}{
\begin{nicetable}{cc|ccc}
\multicolumn{2}{c}{} & \multicolumn{3}{c}{Player $2$}\\
\multicolumn{1}{c}{} & & $X$ & $Y$ & $Z$ \\ \cline{2-5}
\raisebox{0.0cm}{\multirow{3}*{\rotatebox{90}{Player $1$}}} & $P$ & $4$ & $2$ & $2$ \\
& $Q$ & $-3$ & $5$ & $1$ \\
& $R$ & $2$ & $-1$ & $3$ \\
\end{nicetable}}
\end{center}
\end{minipage}
\end{definition}
\end{frame}
\begin{frame}{The tikzmarknode command}
\alert{Useful when annotating equation}
Use it anywhere to create a node named anything that you can refer back to later. Also compiles but with errors...
\begin{flalign*}
\text{Maximise} && P &= V-3 && \\
\text{Subject to} && V -6p-4q + s_1 &= 0 && \\
&& V -p-7q + s_2 &= 0 && \\
&& \tikzmarknode{A}{p + q + s_3} &= 1 &&
.\end{flalign*}
\begin{tikzpicture}[overlay,remember picture]
\draw[color=aa,<-] (A) --++ (1,-1) node[fill=cc] {The annotation $x^2$};
\end{tikzpicture}
\end{frame}
\begin{frame}{Tables}
\begin{center}
\colorbox{cc!30}{
\begin{nicetable}{c|cccccc|c}
$P$ & $v$ & $p$ & $q$ & $s_1$ & $s_2$ & $s_3$ & RHS \\
\hline
1 & $-1$ & $0$ & $0$ & 0 & 0 & 0 & $-3$ \\
\hline
0 & 1 & $-6$ & $-4$ & 1 & 0 & 0 & 0 \\
0 & 1 & $-1$ & $-7$ & 0 & 1 & 0 & 1 \\
0 & 0 & $1$ & 1 & 0 & 0 & 1 & 1 \\
\end{nicetable}}
\end{center}
Tikz pictures, as well as tables, basically everything can be shrunk with the adjust box command. You can specify max width, max height, width height etc.
\centering
\adjustbox{max width=4cm}{
\colorbox{cc!30}{
\begin{nicetable}{c|cccccc|c}
$P$ & $v$ & $p$ & $q$ & $s_1$ & $s_2$ & $s_3$ & RHS \\
\hline
1 &\boxed{$-1$} & $0$ & $0$ & 0 & 0 & 0 & $-3$ \\
\hline
0 & 1 & $-6$ & $-4$ & 1 & 0 & 0 & 0 \\
0 & 1 & $-1$ & $-7$ & 0 & 1 & 0 & 0 \\
0 & 0 & $1$ & 1 & 0 & 0 & 1 & 1 \\
\end{nicetable}}
}
\end{frame}
\begin{frame}[shrink=60]{The shrink command, automatically shrinks to fit on page, but is helpful to give a number so it knows how much horizontal space it has.}
This is the contents.
\lipsum
\begin{problem}
\lipsum
\end{problem}
\end{frame}
\begin{frame}{The onslide}
Can be used on anything but really cool with tikz pictures.
\centering
\adjustbox{max width=.8\textwidth}{
\def\complex{(0,0) ellipse (7cm and 6cm)} %%%%These can be used as variables
\def\real{(0,0) ellipse (6.5cm and 3.5cm)}
\def\algebraic{(1.7,0) circle (5cm)}
\def\imag{(1.3,-4.7) ellipse (2.2cm and 1cm)}
\def\int{(2.9,-0.6) ellipse (2.6cm and 2.3cm)}
\def\whole{(2.9,-0.7) ellipse (2.1cm and 1.6cm)}
\def\count{(2.9,-0.9) ellipse (1.3cm and 1cm)}
\begin{tikzpicture}
%%Complex%%%%%%%%%%%%%%%%%%5
\onslide<2->{\filldraw[orange,fill opacity=0.1] \complex;
\node[color=orange] at (0,5.5) {Complex Numbers};
\node[color=orange] at (-4,4.2) {$\pi+3i$};
\node[color=orange] at (-5,3.2) {$e-\pi i$};}
%%%%%%Real%%%%%%%%%%%%%5
\onslide<3->{\filldraw[green,fill opacity=0.1] \real;
\node[color=green] at (0,3) {Real Numbers};}
%%%%Transcendental%%%%%%%%%%5
\onslide<4->{\node[color=green,align=left] at (-5,0.3) {Transcendental \\ Numbers};
\node[color=green] at (-6,-0.5) {$\pi$};
\node[color=green] at (-5.3,-1) {$e$};}
%%%%%%%Irrational and real%%%%%%
\onslide<5->{\node[color=green] at (-2.9,2.3) {Irrational Numbers};
\node[color=green] at (2.9,2.3) {Rational Numbers};
\draw[color=green] (0,-3.5) -- (0,2.5);
\node[color=green] at (-1.7,1.4) {$\sqrt{2}$};
\node[color=green] at (-2.6,-0.3) {$-\sqrt{5}$};
\node[color=green] at (-1.3,-2.2) {$\sqrt[3]{26}$};
\node[color=green] at (0.9,1.6) {$\frac{2}{3}$};
\node[color=green] at (5.7,0.7) {$\frac{97}{32}$};}
%%%%%Algebraic%%%%%%%%%%
\onslide<6->{\filldraw[blue,fill opacity=0.1] \algebraic;
\node[color=blue] at (1.7,4.5) {Algebraic Numbers};
\node[color=blue] at (3.7,3.9) {$9+5i$};
\node[color=blue] at (4.6,3.1) {$1+i$};}
%%%%%Imag%%%%%%%%%%%%%%%
\onslide<7->{\filldraw[purple,fill opacity=0.1] \imag;
\node[color=purple] at (1.3,-4.3) {\footnotesize Pure Imaginary Numbers};
\node[color=purple] at (-0.5,-5) {$e i$};
\node[color=purple] at (0.5,-5.3) {$\pi i$};
\node[color=purple] at (0.8,-4.6) {$i$};
\node[color=purple] at (2.0,-4.7) {$5 i$};}
%%%%%Int%%%%%%%%%%%%%
\onslide<8->{\filldraw[color=blue, fill opacity=0.1] \int;
\node[color=blue] at (2.9,1.2) {Integers};
\node[color=blue] at (0.9,0.4) {$5$};
\node[color=blue] at (2.6,-2.6) {$-99$};}
%%%%%5Whole%%%%%%5
\onslide<9->{\filldraw[color=blue, fill opacity=0.1] \whole;
\node[color=blue] at (2.9,0.3) {Whole Numbers};
\node[color=blue] at (4.5,-0.6) {$0$};}
%%%%%%%%%%Count%%%%%%%%%
\onslide<10->{\filldraw[color=blue, fill opacity=0.1] \count;
\node[color=blue,align=center] at (2.9,-0.5) {Counting \\ Numbers};
\node[color=blue] at (2.2,-1.2) {$1$};
\node[color=blue] at (2.8,-1.6) {$2$};
\node[color=blue] at (3.4,-1.3) {$99$};}
\end{tikzpicture}}
\end{frame}
\end{document}