In this case I need a breakable for custom example that I could break part of contents and move to next frame.
\documentclass{beamer}
\usetheme{default}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage[most,many,breakable]{tcolorbox}
\usepackage{varwidth}
\usepackage{ragged2e}
\usepackage{etoolbox}
\usepackage{mdframed} % default settin
\mdfsetup{
skipabove =4pt, skipbelow =4pt,
innerlinewidth=4pt,outerlinewidth=4pt,
middlelinewidth=4pt,
leftline = false, topline = false,
rightline=false,bottomline=false}
\setbeamertemplate{navigation symbols}{}
\definecolor{mytheoremfr}{HTML}{00007B}
\tcbuselibrary{theorems,skins,hooks}
\makeatletter
\define@key{beamerframe}{s}[true]{% stretch
\beamer@frametopskip=4pt\relax%
\beamer@framebottomskip=4pt plus 0.001fill\relax%
\beamer@frametopskipautobreak=\beamer@frametopskip\relax%
\beamer@framebottomskipautobreak=\beamer@framebottomskip\relax%
}
\setbeamertemplate{footline}{%
\centering
\begin{minipage}{\dimexpr\paperwidth-\beamer@leftmargin-\beamer@rightmargin\relax}
% \vspace{-4ex}
\centering
\rule{\linewidth}{1pt} \vskip -2pt
\usebeamerfont{footline}%
\usebeamercolor{footline}%
% \hfill\insertpagenumber/\inserttotalframenumber
\hfill\insertpagenumber
\hfill%
\llap{\insertframenavigationsymbol\insertbackfindforwardnavigationsymbol}\par
\end{minipage}\vskip4pt
}
\makeatother
\newtcbtheorem[number within=section]{myExample}{Ex}
{%
colback= black!7
,enhanced
,breakable
,colframe = black!65
,coltitle = black!100
,boxrule = 1pt
% ,sharp corners
,detach title
,before upper=\tcbtitle\par\smallskip
,fonttitle = \bfseries
,description font = \mdseries
,separator sign none
,description delimiters parenthesis
}{ex}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
% FIRST CASE
\begin{frame}[s]
\begin{myExample}{Example}{}
\lipsum[1-2]
\end{myExample}
\end{frame}
% SECOND CASE
\begin{frame}[s]
\begin{mdframed}
\begin{myExample}{Example}{}
\lipsum[1-2]
\end{myExample}
\end{mdframed}
\end{frame}
\end{document}
First case:
I use this construction, so I have the required margins for me, as well as the ability to manage text on one slide, insert pictures and before the selected custom environment, no empty slides appear, however, the content does not correctly transfer to the next frame
Second case: In this case I have no required margins for me, before the selected custom environment, I have empty slides appear, but the content does correctly transfer to the next frame except that, for example, for frame 5 there is no top padding, and for frame 6, the top padding is not equal to the bottom padding of frame 5.
My trouble: Is it possible to keep the margins and alignment as for the first case, but it would work to transfer the content to the tcolorbox, and at the same time, the top indent for the next frame would be equal to the bottom indent for the previous one, when using mdframed ?



allowframebreaksoption and b) using\framebreakat a suitable place inside the box (see https://tex.stackexchange.com/a/692584/36296 for an example). For an automatic approach, see https://tex.stackexchange.com/a/509263/36296 . A frame with fixed top and bottom margin really needs some stretchable material inside it. – samcarter_is_at_topanswers.xyz Sep 03 '23 at 21:35If I use
– Alex Sep 03 '23 at 21:44\framebreakwithallowframebreaksI get empty previous frame, before my custom enviroment. tex.stackexchange.com/a/509263/36296 -- automatic approach move fragments in such a way that some of the letters, for example, in a line are split in such a way that half is related to the previous slide, the rest to the next ... I see this post on stack, but it is not correct work with setted custom styles block...\framebreakearlier – samcarter_is_at_topanswers.xyz Sep 03 '23 at 21:53\allowframebreaksshould be avoided in this kind of case. (I use it for bibliographies, but that's about it.) But what I'd do is put it on one slide in a singleframeand use eitheroverprintor whatever-the-other-one-is-called, so it doesn't jump at the transition. (This is pretty much equivalent to keeping the padding the same, I think, but the whole box will stay the same size, regardless of the size of content.) Even if you need all of it inhandoutmode, this works well. You just have to force it a bit. – cfr Sep 03 '23 at 22:04enlarge top at break by=0.5cm -- is working solution for problem, in this case. So, I should manually catch places and use
– Alex Sep 03 '23 at 22:32\framebreak, but, perhaps this is the concept of thisbeamerdocument class, in order to change the content within one slide, and set the boundaries of the text break yourself. Thanks a lot for solution!!!