# boxed only one equation among others in beamer

how can I get only boxed equation among others I'm using empheq to align equation but I can't boxed only one equation among others.

\documentclass[english]{beamer}
\usepackage{empheq}
\begin{document}
\begin{frame}{boxed only one equation not all of them}
I would like to boxed only one equation among others.
\begin{empheq}[box=\fbox]{align*}
D_{f}&=\mathbb{R}-\{3\}\\
D_{f}&=]-\infty;3[\cup]3;+\infty[
\end{empheq}
\end{frame}
\end{document}


You don't really need empheq for that. Use the \Aboxed command, defined by mathtools. To have a correcr spacing in the r.h.s. of the second equation, I suggest defining a \openintvl command with \DeclarePairedDelimiter; \documentclass[english]{beamer} \usepackage{empheq} \usetheme{madrid}

\DeclarePairedDelimiter{\openintvl}{]}{[}

\begin{document}

\begin{frame}{boxed only one equation not all of them}
I would like to boxed only one equation among others.
\begin{align*}
D_{f}&=\mathbb{R}-\{3\}\\
\Aboxed{D_{f}&=\openintvl{-\infty;3}\cup\openintvl{3;+\infty} }
\end{align*}
\end{frame}

\end{document}


• Note that I've updated, as the initial spacing in the second equation was not good, using \DeclarePairedDelimiter – Bernard Apr 14 '20 at 21:42