### calculations correct

31 January 2017

We recently watched The Martian — just a year behind everyone else — and one scene in particular stood out. For your use with Beamer, I give you \kwcalculationscorrect:


\makeatletter
\def\ft@overlay{}
\definecolor{carolinablue}{RGB}{123,175,212}
\lineskiplimit0pt
\begin{tikzpicture}[remember picture,overlay]%
\ft@overlay
\end{tikzpicture}%
\gdef\ft@overlay{}%
}
\newcommand<>{\kwcalculationscorrect}{%
\pause
\only<.(1)>{\gdef\ft@overlay{
\lineskip=4pt
\draw[fill=black,opacity=0.50]
(current page.north east)
rectangle (current page.south west);
\node[
align=center,
draw=carolinablue!80!white,
fill=black,
font=\Large,
inner sep=8pt,
line width=4pt,
text=carolinablue!30!white,
] at (current page.center) {\bf CALCULATIONS\\\bf CORRECT};
}}%
}
\makeatother


Example usage:


\begin{frame}{Integral of a constant function}
What is $\int_{x_1}^{x_2} c dx$?
\pause
$\int_{x_1}^{x_2} c dx = \left( x_2 - x_1 \right) c.$
\vspace{4cm}
\kwcalculationscorrect
\end{frame}


Hat tip to this LaTeX Stack Exchange post.

Included $$\LaTeX$$ graphics are generated at LaTeX to png or by .