1

I want to place an equation at a precise location on my slide, specifically, closer to the top-left corner, and, in the next slide, keep the math at that same place and have some text appear to its right to explain the equation. The default option using math environment doesn't give me control over the positioning. More generally, I was wondering how to get more control over the positioning of math/text, like in powerpoint. I am providing a MWE I tried below. I am considering using tikzpicture throughout the presentation for this sort of precise positioning of math objects in general (with the option to make nodes visible at selected times), but I am having a hard time getting started. Thank you!

\documentclass{beamer}
\mode<presentation>
{
  \usetheme{default}      % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
} 

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{verbatim}


%% start
\begin{document}

\section{Some title}

\begin{frame}{Some title}
\[
(a+b)^2 = a^2 + 2ab + b^2
\] 
\pause
\alert{This is an important equation!}

\end{frame}

\end{document}
1
2

I think that the easiest solution consists in forgetting absolute positioning and use beamer tools to adjust the placement.

In this case, you can use something like t option in frame which top aligns the frame contents and the columns environment which allows to declare parallel text fragments.

Following code shows a possible solution:

\documentclass{beamer}
\mode<presentation>
{
  \usetheme{default}      % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
} 

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{verbatim}


%% start
\begin{document}

\section{Some title}

\begin{frame}[t]{Some title}
\begin{columns}[onlytextwidth, t]
\column{.5\linewidth}
\centering
$(a+b)^2 = a^2 + 2ab + b^2$ 
\column{.5\linewidth}
\pause
\alert{This is another important equation but with a little more explanation!}
\end{columns}

\medskip
\begin{columns}[onlytextwidth]
\column{.5\linewidth}
\[
(a+b)^2 = a^2 + 2ab + b^2
\] 
\column{.5\linewidth}
\pause
\[
\text{\alert{This is an important equation!}}
\]
\end{columns}
\end{frame}

\end{document}

enter image description here

Update: Absolut positioning with TiKZ

As OP insists in absolute positioning. Following code shows how to do it with TikZ. We should use remember picture and overlay options for every tikzpicture and we can use positions relative to current page anchors. At least two compilations are needed to obtain the complete output.

\documentclass{beamer}
\mode<presentation>
{
  \usetheme{default}      % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
} 

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{verbatim}

\usepackage{tikz}
\usetikzlibrary{positioning, arrows.meta}

\tikzstyle{every picture}+=[remember picture, overlay]
%% start
\begin{document}

\section{Some title}

\begin{frame}[fragile]{Some title}

\begin{tikzpicture}
\node[below right=1cm and 1cm of current page.north west] (formula1) {$(a+b)^2 = a^2 + 2ab + b^2$};
\end{tikzpicture}

\pause
\begin{tikzpicture}
\node[right=2cm of formula1, text width=4cm, align=left] (text1) {\alert{This is another important equation but with a little more explanation!}};
\draw[-Stealth, red, thick] (formula1) -- (text1);
\end{tikzpicture}

\pause
\begin{tikzpicture}
\node[above right=1cm and 3cm of current page.south west] (formula2) {$(a+b)^2 = a^2 + 2ab + b^2$};
\node[above=2cm of formula2, text width=3cm, align=left] (text2) {\alert{Another equation!}};
\draw[-Stealth, red, thick] (formula2) -- (text2);
\end{tikzpicture}

\end{frame}

\end{document}

enter image description here

3
  • Thank you very much! I was wondering though, isn't it possible to use a "graph" of "nodes" with each node being a math or text bubble, and position things absolutely? I feel that would allow for more control, am I wrong? Another follow up question I had in your solution was, if I want to show an arrow (\leftrightarrow) going between the two blocks you wrote in the two columns, how may I do that? Thank you so much!
    – lazulikid
    May 4 '20 at 16:44
  • 1
    @lazulikid I've updated the answer with absolute positioning with TiKZ. I'm not sure if it's worth to use it, but it's possible.
    – Ignasi
    May 4 '20 at 17:18
  • Gosh, thank you so much!!! This is incredibly generous of you, Ignasi!
    – lazulikid
    May 4 '20 at 17:24

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.