Escreva texto e equação na mesma linha Beamer

Escreva texto e equação na mesma linha Beamer

Gostei da caixa e da cor ao redor da equação, que produz usandoempheq

Eu gostaria de manter esse caractere, mas poder escrever texto + equação na mesma linha.

\documentclass[10pt,a4paper]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{empheq}
\definecolor{myblue}{rgb}{.8, .8, 1}
\newcommand*\mybluebox[1]{%
\colorbox{myblue}{\hspace{1em}#1\hspace{1em}}}

\usetheme{Warsaw}


\begin{document}

\begin{frame}
the equation of the tangent line is \begin{empheq}[box=\mybluebox]{align*}
y=f^{'}(x_0)(x-x_{0})+f(x_{0})
\end{empheq}

\end{frame}
\end{document}

que produz a seguinte imagem:

insira a descrição da imagem aqui

Responder1

Você pode obtê-lo com o flalign*`` environment and a small patch for thecomando \Aboxed`:

\documentclass[10pt, a4paper]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{empheq}
\definecolor{myblue}{rgb}{.8, .8, 1}
\newcommand*\mybluebox[1]{%
\colorbox{myblue}{\hspace{1em}#1\hspace{1em}}}

\usetheme{Warsaw}

    \usepackage{xpatch}
    \makeatletter
    \newcommand{\colorboxed}[1]{\colorbox{myblue}{\m@th$\displaystyle#1$}}
    \xpatchcmd{\@Aboxed}{\boxed}{\colorboxed}{}{}
    \makeatother

\begin{document}

\begin{frame}
\begin{flalign*}
 & \text{the equation of the tangent line is} &\Aboxed{\quad y & =f’(x_0)(x-x_{0})+f(x_{0})\quad} &
\end{flalign*}

\end{frame}

\end{document} 

insira a descrição da imagem aqui

informação relacionada