Since the OP indicated that shrinking the font is acceptable, it can be done this way. First, you place the equation into a box. Then you scale/resize the box (requires graphicx
package).
I have EDITED this answer to make the rescale automatic, if you pass the equation to the defined macro \fiteq{}
. If the equation is larger than 85% of \textwidth
, it will be shrunk to that size. For demonstration, both equations in this slide were passed through \fiteq
. Only the first one was resized.
\documentclass[leqno,mathserif,hyperref={pdfpagelabels=false}]{beamer}
\usepackage{lmodern}
\usepackage{graphicx,bm}
%\usetheme{AnnArbor}
\usetheme{Luebeck}
\usepackage{tcolorbox}
\tcbuselibrary{breakable,skins}
%\setbeamercolor{structure}{blue}
\usepackage[tightpage]{preview}
\setbeamercovered{transparent}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{enumerate}
\newcommand{\diff}{\mathop{}\mathopen{}\mathrm{d}}
\usepackage{lipsum}
\usepackage{enumitem}
\colorlet{xlightblue}{blue!5}
\newtcolorbox{Educ}[1]{
title=#1,
beamer,
colback=xlightblue,
colframe=blue!30,
fonttitle=\bfseries,
left=1mm,
right=1mm,
top=1mm,
bottom=1mm,
middle=1mm,
breakable,
}
\newcommand\fiteq[1]{%
\sbox{\mybox}{$\displaystyle#1$}%
\ifdim\wd\mybox>.85\textwidth\resizebox{.85\textwidth}{!}{\usebox{\mybox}}%
\else\usebox{\mybox}\fi%
}
\newsavebox{\mybox}
\begin{document}
\section[Plan]{Plan}
\section[Introduction]{Introduction}
\section[Example1]{Example1}
\section[Example2]{Example2}
\begin{frame}
\frametitle{Solution d'une EDS}
\begin{Educ}{Définition}
Une solution de l'EDS $E(b,\sigma)$ est un couple $(X,W)$ de processus adaptés sur un espace de probabilité filtré $(\Omega,\mathcal{F},\mathcal{F}_{t},\mathbb{P})$ qui satisfait les conditions usuelles, vérifiant :
\begin{itemize}
\item $W$ est un $\mathcal{F}_{t}$-mouvement brownien m-dimensionnel;
\item pour tout $t\geq 0$, on a les conditions de régularité
\[
\fiteq{%
\mathbb{P}\big\{ \int_{0}^{t} \sum_{i=1}^{n} |b_{i}(s,X_{s})| \diff s <\infty \big\}=\mathbb{P}\big\{ \int_{0}^{t}\sum_{i=1}^{n}\sum_{j=1}^{m}|\sigma_{ij} (s,X_{s})|^{2}\diff s <\infty \big\}=1;
}
\]
\item pour tout $t\geq 0, i=1,\ldots,n$, on a presque sûrement
\[\fiteq{%
X_{t}^{i}=X_{0}^{i}+\int_{0}^{t}b_{i}(s,X_{s})\diff s +\sum_{j=1}^{m}\int_{0}^{t}\sigma_{ij}(s,X_{s})\diff W_{s}^{j}.%
}\]
\end{itemize}
\lipsum[5]
\end{Educ}
\end{frame}
\end{document}
Load theorems
library (I do it with class option most
) and use ams
or any other maths options.
ams
set upper and lower parts to mathematical mode with \displaystyle
. You don't need equation
environments is these boxes. And you don't need valign
.
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\newtcolorbox{equationframe}{
math
}
\begin{document}
\begin{frame}
\begin{itemize}
\item[]
\begin{equationframe}
p(x,y)=\begin{cases}
\min\{q(x,y),\frac{\pi({y})q(y,{x})}{\pi(x)}\}, \quad x\neq y\\
1-\int_{x\neq y} p(x,y)
\end{cases}
\end{equationframe}
\begin{equationframe}
\pi(x)p(x,y)=\min\{\pi(x)q(x,y),\pi(y)q(y,x)\}=\pi(y)p(y,x)%
\end{equationframe}
\end{itemize}
\end{frame}
\end{document}
Update: ams equation*
, ams align*
:
Instead of math
, tcolorbox
also offers some other mathematical boxes: ams equation
, ams align
, ams gather
, ...
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{frame}
\begin{tcolorbox}[ams equation*]
p(x,y)=\begin{cases}
\min\{q(x,y),\frac{\pi({y})q(y,{x})}{\pi(x)}\}, \quad x\neq y\\
1-\int_{x\neq y} p(x,y)
\end{cases}
\end{tcolorbox}
\begin{tcolorbox}[ams nodisplayskip, ams align*]
\pi(x)p(x,y) & =\min\{\pi(x)q(x,y),\pi(y)q(y,x)\}\\
& =\pi(y)p(y,x)%
\end{tcolorbox}
\end{frame}
\end{document}
Best Answer
I give a try with
tcolorbox
. Are you looking for the following?The code puts a
\tcbhighmath
box around the aligned equations: