같은 줄에 텍스트와 방정식을 작성하세요. Beamer

같은 줄에 텍스트와 방정식을 작성하세요. Beamer

나는 상자와 방정식 주위의 색상을 좋아했습니다.empheq

해당 문자를 유지하고 싶지만 같은 줄에 텍스트+수식을 쓸 수 있습니다.

\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}

그러면 다음 이미지가 생성됩니다.

여기에 이미지 설명을 입력하세요

답변1

flalign*`` environment and a small patch for the\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} 

여기에 이미지 설명을 입력하세요

관련 정보