Breakable tcolorbox inside a Beamer slide

I would like to have a tcolorbox Example with the option breakable that can be display in few beamer slide. This is my MWE:

\documentclass{beamer}
\usetheme{default}
%
\usepackage[most]{tcolorbox}
\usepackage{lipsum}
%
\newcounter{myexpl}[section]
\def\themyexpl{\thesection.\arabic{myexpl}}

\tcbmaketheorem{texample}{Example}{
fontupper=\slshape, arc=0mm, colback=red!50!yellow!5!white,
colframe=red!50!yellow!50!black, separator sign dash,breakable}
{myexpl}{exp}
%
\title{Beamer Template}
\author{Test}
\begin{document}
\begin{frame}[plain]
\maketitle
\end{frame}
\begin{frame}[fragile,allowframebreaks]{Example Breakable Test}
\begin{texample}{test}{tt}
\lipsum[1-3]
\end{texample}

\end{frame}
\end{document}

• Sep 21, 2019 at 17:23

This is not a really elegant solution (yet?) but shows that this can be done in principle. The key ingredient is Martin Scharrer's solution of a closely related problem. The strategy is to save the tcolorbox in a \savebox and then to decompose it into bits that fit. Ironically, for this we do not need breakable. I also added some analog of the \textheight, called \Textheight, by hand simply because I do not know what the corresponding length really is.

\documentclass{beamer}
\usetheme{default}
%
\usepackage[most]{tcolorbox}
\usepackage{lipsum}
%
\newcounter{myexpl}[section]
\def\themyexpl{\thesection.\arabic{myexpl}}
\newsavebox{\mysavebox}
\newlength{\myrest}
\newlength{\Textheight}
\Textheight=7.9cm
\newif\iffirstframe
\firstframetrue
\tcbmaketheorem{texample}{Example}{
fontupper=\slshape, arc=0mm, colback=red!50!yellow!5!white,
colframe=red!50!yellow!50!black, separator sign dash}
{myexpl}{exp}
%
\title{Beamer Template}
\author{Test}
\begin{document}

\begin{frame}[plain]
\maketitle
\end{frame}

\begin{lrbox}{\mysavebox}%
\begin{texample}{test}{tt}
\lipsum[1-3]
\end{texample}
\end{lrbox}%
\begin{frame}[fragile,t,allowframebreaks]{Example Breakable Test}
\ifdim\ht\mysavebox>\Textheight
\setlength{\myrest}{\ht\mysavebox}%
\loop\ifdim\myrest>\Textheight
\iffirstframe
\firstframefalse
\else
\newpage\par\noindent
\fi
\clipbox{0 {\myrest-\Textheight} 0 {\ht\mysavebox-\myrest}}{\usebox{\mysavebox}}%

• Thanks to @Schrödinger'sCat. The solution proposed works. I also found that texemple with breakable works outside a Frame. Sep 22, 2019 at 9:55