I am trying to reproduce one of my PowerPoint template with beamer.
I would like to link each colored box in a equation with an other box of similar color. Also, I am trying to adjust the position of the boxes behind the equation such as they are aligned with the margin. (like in the PowerPoint).
I am using tabular because I would like to have a kind of title associated with each small box. I know that tikz is highly recommended for boxing equations but if it's possible to use it in this case I would be curious to know.
P.S : Is there any way to make borders of the box less thicker ? Because it's interfering with parenthesis of the main equation...
Thank you for your kind help,
\documentclass[french]{beamer}
%%%%%% ENCODAGE %%%%%%%%%%%
\usepackage[utf8]{inputenc}
%%%%%% TIKZ %%%%%%%%%%%%%%%
\usepackage[beamer,customcolors,norndcorners]{hf-tikz}
%%%%%% OTHERS %%%%%%%%%%%%%
\usepackage{booktabs,calligra}
\usepackage{listings,stackengine}
\author{XXX}
\title{XXX}
\subtitle{XXX}
\institute [XXX] {XXX \ XXX}
\date{\today}
%%%%%% DEFINITIONS %%%%%%%%%
\def\cmd#1{\texttt{\color{red}\footnotesize $\backslash$#1}}
\def\env#1{\texttt{\color{blue}\footnotesize #1}}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}
\definecolor{halfgray}{gray}{0.55}
\lstset{
basicstyle=\ttfamily\small,
keywordstyle=\bfseries\color{deepblue},
emphstyle=\ttfamily\color{deepred}, % Custom highlighting style
stringstyle=\color{deepgreen},
numbers=left,
numberstyle=\small\color{halfgray},
rulesepcolor=\color{red!20!green!20!blue!20},
frame=shadowbox,
}
%%%%%% VIDEO %%%%%%%%%%%%%%
\usepackage{multimedia}
%%%%%% BOX %%%%%%%%%%%%%%%%
\usepackage{fancybox}
\usepackage{varwidth}
\usepackage{subcaption}
\hfsetbordercolor{blue!50!black}
%%%%%% PGFPLOTS %%%%%%%%%%%%
\usepackage[export]{adjustbox}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}
\definecolor{BgYellow}{HTML}{FFF59C}
\definecolor{FrameYellow}{HTML}{F7A600}
\usepackage{pgf, tikz, adjustbox}
\usetikzlibrary{spy}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns, matrix, positioning}
\usetikzlibrary{arrows.meta,
patterns.meta
}
\begin{document}
\begin{frame}{Equation des films minces générale}
\begin{exampleblock}{Cas cylindrique}
\begin{equation}
\frac{\partial h}{\partial t} = \frac{1}{12 \mu r} \frac{\partial}{\partial r} \left(r h^{3} \left(\tikzmarkin<1->[set fill color=red!20, set border color=red]{a1}(0.075,-0.4)(-0.045,0.65) \rho g \frac{\partial h}{\partial r} \tikzmarkend{a1}+ \tikzmarkin<1->[set fill color=blue!20, set border color=blue]{e}(0.05,-0.4)(-0.045,0.65) D \frac{\partial}{\partial r}(\Delta^2_r h) \tikzmarkend{e} \right) \right)
\end{equation}
\begin{tabular}{ccc}
Pesanteur & & Elastique \\
\fcolorbox{red}{white}{$
\begin{aligned}
R \propto t^{\frac{1}{2}}
\end{aligned}
$} &
\fcolorbox{black}{white}{$
\begin{aligned}
\lambda_{E-G} = \left(\frac{Ed^3}{12 \rho g (1 - \nu)} \right)^{\frac{1}{4}}
\end{aligned}
$} &
\fcolorbox{blue}{white}{$
\begin{aligned}
R \propto t^{\frac{1}{3}}
\end{aligned}
$} \
\end{tabular}
\end{exampleblock}
\end{frame}
\end{document}
I have this :
And I am trying to reproduce this :


