# Connect equation boxes in beamer

I am looking for the simplest way to connect two equation boxes with an arrow. Currently I am using the empheq. This is what I have done so far:

\usepackage{empheq}
\usepackage[most]{tcolorbox}
\newtcbox{\mymath}[1][]{%
nobeforeafter, math upper, tcbox raise base,
enhanced, sharp corners, colback=white!10, colframe=red!30!black, boxrule=2pt}

\begin{empheq}[box={%
\mymath[colback=red!30,drop lifted shadow, sharp corners]}]{equation*}
\color{black} \mathrm{x^2+x+3=1}
\end{empheq}
\begin{empheq}[box={%
\mymath[colback=red!30,drop lifted shadow, sharp corners]}]{equation*}
\color{black} \mathrm{x^2+x+2=0}
\end{empheq}


And I got this:

I want that boxes look like this:

I would appreciate any help!

• you are probably more likely to get help if you provide a full minimal example instead of just a snippet Aug 2, 2017 at 16:03

Note that in the absence of a working example, I decided to provide something that does not make use of empheq or tcolorbox. The former is likely to be easy to add afterwards, and the latter seemed overkill just for those rectangles.

\documentclass[tikz]{standalone}

\usepackage{amsmath}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[every node/.style = {draw}, very thick]
\node (a) at (0, 2) {$x^2 + x + 3 = 1$};
\node (b) at (0, 0) {$x^2 + x + 2 = 0$};
\draw[->] (a) to (b);
\end{tikzpicture}
\end{document}


If you really wish to use tcolorboxes and stuff, you should be able to put them in the nodes. Remove the draw option from the nodes' style to avoid having a double rectangle, then.