Breakable tcolorbox in beamer does not break automatically, and following questions












1















I have encountered several problems when using a breakable tcolorbox with beamer class. For some of them, although workarounds are found, I still wonder if there exist more automatic and elegant solutions.



For the following questions, assume document class beamer is used and option allowframebreaks is added to frame environment.



Question 1. How to let breakable tcolorbox break automatically?



Workaround 1: Set break at=<length1> manually.



Question 2. How to vertically center middle parts (if any) of break sequence? (The first and last parts is vertically centered as expected.}



Workaround: Set enlarge top at break by=<length2> and break at=<length1>/<length1 + length2> to enlarge the topsep of middle and last parts and keep the height of text content of those parts unchanged. But this also adds topsep of last, which results to un-satisfied positioning.



It fails to pass any rubber length to key enlarge top at break by so I have to use something like "80pt" to simulate a vertical centering. How can I add something like vfill before and after middle parts? There is a key named vfill before first=<bool> for first part, but not any similar keys for middle parts.



Question 3. How to add reminding text like "continued" before break?



Workaround: Use bottomsep at break=<length> for making some space, and finish first and middle=<graphical code> for adding reminding text.



Question 4. In general, how can I insert codes before and after breaks for first, middle, and last parts separately, to change their geometry, text contents and others?



The doc of extras={<options>} key family says




Geometry and break settings should not be used here, ...




Hence extras key family is not suitable here. The <code> passed to keys before and after




are used only before the first and after the last part of the break sequence.




Hence these two keys are not suitable as well.





A MWE to produce pages under all circumstances:



documentclass{beamer}
usepackage{lipsum}
usepackage{tcolorbox}
tcbuselibrary{breakable, skins}

tcbset{breakable}

newcommand{frameDemo}{
begin{frame}[allowframebreaks]
begin{tcolorbox} lipsum[2-3] end{tcolorbox}
end{frame}
}

begin{document}
% without any workarounds
frameDemo

tcbset{
% workaround for question 1
break at=100pt,
}
frameDemo

tcbset{
% workaround for question 1 & 2
break at=100pt/180pt,
enlarge top at break by=80pt,
}
frameDemo

tcbset{
% workaround for question 1, 2 & 3
finish first and middle={
node[anchor=south east]
at ([xshift=-2pt]interior.south east)
{itshape continued};
},
bottomsep at break=.7baselineskip
}
frameDemo

begin{frame}[allowframebreaks]
fontsize{120}{120}selectfont empty page
end{frame}
end{document}


A helper to assemble these beamer pages:



documentclass[landscape, a4paper]{article}
usepackage{pdfpages}

begin{document}
includepdf[pages={1-2,16,16,16,3-6,16,7-10,16,11-15}, nup=5x5, frame, delta=5 5]{breakable-in-beamer-texsx.pdf}
end{document}


Screenshoot of assembled beamer pages:
screenshoot










share|improve this question




















  • 1





    You are misusing beamer. Presentations shouldn't contain long continous text parts. Design your slides one by one. allowframebreak can be used for exceptions like a bibliography.

    – Ulrike Fischer
    Jan 14 at 9:17
















1















I have encountered several problems when using a breakable tcolorbox with beamer class. For some of them, although workarounds are found, I still wonder if there exist more automatic and elegant solutions.



For the following questions, assume document class beamer is used and option allowframebreaks is added to frame environment.



Question 1. How to let breakable tcolorbox break automatically?



Workaround 1: Set break at=<length1> manually.



Question 2. How to vertically center middle parts (if any) of break sequence? (The first and last parts is vertically centered as expected.}



Workaround: Set enlarge top at break by=<length2> and break at=<length1>/<length1 + length2> to enlarge the topsep of middle and last parts and keep the height of text content of those parts unchanged. But this also adds topsep of last, which results to un-satisfied positioning.



It fails to pass any rubber length to key enlarge top at break by so I have to use something like "80pt" to simulate a vertical centering. How can I add something like vfill before and after middle parts? There is a key named vfill before first=<bool> for first part, but not any similar keys for middle parts.



Question 3. How to add reminding text like "continued" before break?



Workaround: Use bottomsep at break=<length> for making some space, and finish first and middle=<graphical code> for adding reminding text.



Question 4. In general, how can I insert codes before and after breaks for first, middle, and last parts separately, to change their geometry, text contents and others?



The doc of extras={<options>} key family says




Geometry and break settings should not be used here, ...




Hence extras key family is not suitable here. The <code> passed to keys before and after




are used only before the first and after the last part of the break sequence.




Hence these two keys are not suitable as well.





A MWE to produce pages under all circumstances:



documentclass{beamer}
usepackage{lipsum}
usepackage{tcolorbox}
tcbuselibrary{breakable, skins}

tcbset{breakable}

newcommand{frameDemo}{
begin{frame}[allowframebreaks]
begin{tcolorbox} lipsum[2-3] end{tcolorbox}
end{frame}
}

begin{document}
% without any workarounds
frameDemo

tcbset{
% workaround for question 1
break at=100pt,
}
frameDemo

tcbset{
% workaround for question 1 & 2
break at=100pt/180pt,
enlarge top at break by=80pt,
}
frameDemo

tcbset{
% workaround for question 1, 2 & 3
finish first and middle={
node[anchor=south east]
at ([xshift=-2pt]interior.south east)
{itshape continued};
},
bottomsep at break=.7baselineskip
}
frameDemo

begin{frame}[allowframebreaks]
fontsize{120}{120}selectfont empty page
end{frame}
end{document}


A helper to assemble these beamer pages:



documentclass[landscape, a4paper]{article}
usepackage{pdfpages}

begin{document}
includepdf[pages={1-2,16,16,16,3-6,16,7-10,16,11-15}, nup=5x5, frame, delta=5 5]{breakable-in-beamer-texsx.pdf}
end{document}


Screenshoot of assembled beamer pages:
screenshoot










share|improve this question




















  • 1





    You are misusing beamer. Presentations shouldn't contain long continous text parts. Design your slides one by one. allowframebreak can be used for exceptions like a bibliography.

    – Ulrike Fischer
    Jan 14 at 9:17














1












1








1








I have encountered several problems when using a breakable tcolorbox with beamer class. For some of them, although workarounds are found, I still wonder if there exist more automatic and elegant solutions.



For the following questions, assume document class beamer is used and option allowframebreaks is added to frame environment.



Question 1. How to let breakable tcolorbox break automatically?



Workaround 1: Set break at=<length1> manually.



Question 2. How to vertically center middle parts (if any) of break sequence? (The first and last parts is vertically centered as expected.}



Workaround: Set enlarge top at break by=<length2> and break at=<length1>/<length1 + length2> to enlarge the topsep of middle and last parts and keep the height of text content of those parts unchanged. But this also adds topsep of last, which results to un-satisfied positioning.



It fails to pass any rubber length to key enlarge top at break by so I have to use something like "80pt" to simulate a vertical centering. How can I add something like vfill before and after middle parts? There is a key named vfill before first=<bool> for first part, but not any similar keys for middle parts.



Question 3. How to add reminding text like "continued" before break?



Workaround: Use bottomsep at break=<length> for making some space, and finish first and middle=<graphical code> for adding reminding text.



Question 4. In general, how can I insert codes before and after breaks for first, middle, and last parts separately, to change their geometry, text contents and others?



The doc of extras={<options>} key family says




Geometry and break settings should not be used here, ...




Hence extras key family is not suitable here. The <code> passed to keys before and after




are used only before the first and after the last part of the break sequence.




Hence these two keys are not suitable as well.





A MWE to produce pages under all circumstances:



documentclass{beamer}
usepackage{lipsum}
usepackage{tcolorbox}
tcbuselibrary{breakable, skins}

tcbset{breakable}

newcommand{frameDemo}{
begin{frame}[allowframebreaks]
begin{tcolorbox} lipsum[2-3] end{tcolorbox}
end{frame}
}

begin{document}
% without any workarounds
frameDemo

tcbset{
% workaround for question 1
break at=100pt,
}
frameDemo

tcbset{
% workaround for question 1 & 2
break at=100pt/180pt,
enlarge top at break by=80pt,
}
frameDemo

tcbset{
% workaround for question 1, 2 & 3
finish first and middle={
node[anchor=south east]
at ([xshift=-2pt]interior.south east)
{itshape continued};
},
bottomsep at break=.7baselineskip
}
frameDemo

begin{frame}[allowframebreaks]
fontsize{120}{120}selectfont empty page
end{frame}
end{document}


A helper to assemble these beamer pages:



documentclass[landscape, a4paper]{article}
usepackage{pdfpages}

begin{document}
includepdf[pages={1-2,16,16,16,3-6,16,7-10,16,11-15}, nup=5x5, frame, delta=5 5]{breakable-in-beamer-texsx.pdf}
end{document}


Screenshoot of assembled beamer pages:
screenshoot










share|improve this question
















I have encountered several problems when using a breakable tcolorbox with beamer class. For some of them, although workarounds are found, I still wonder if there exist more automatic and elegant solutions.



For the following questions, assume document class beamer is used and option allowframebreaks is added to frame environment.



Question 1. How to let breakable tcolorbox break automatically?



Workaround 1: Set break at=<length1> manually.



Question 2. How to vertically center middle parts (if any) of break sequence? (The first and last parts is vertically centered as expected.}



Workaround: Set enlarge top at break by=<length2> and break at=<length1>/<length1 + length2> to enlarge the topsep of middle and last parts and keep the height of text content of those parts unchanged. But this also adds topsep of last, which results to un-satisfied positioning.



It fails to pass any rubber length to key enlarge top at break by so I have to use something like "80pt" to simulate a vertical centering. How can I add something like vfill before and after middle parts? There is a key named vfill before first=<bool> for first part, but not any similar keys for middle parts.



Question 3. How to add reminding text like "continued" before break?



Workaround: Use bottomsep at break=<length> for making some space, and finish first and middle=<graphical code> for adding reminding text.



Question 4. In general, how can I insert codes before and after breaks for first, middle, and last parts separately, to change their geometry, text contents and others?



The doc of extras={<options>} key family says




Geometry and break settings should not be used here, ...




Hence extras key family is not suitable here. The <code> passed to keys before and after




are used only before the first and after the last part of the break sequence.




Hence these two keys are not suitable as well.





A MWE to produce pages under all circumstances:



documentclass{beamer}
usepackage{lipsum}
usepackage{tcolorbox}
tcbuselibrary{breakable, skins}

tcbset{breakable}

newcommand{frameDemo}{
begin{frame}[allowframebreaks]
begin{tcolorbox} lipsum[2-3] end{tcolorbox}
end{frame}
}

begin{document}
% without any workarounds
frameDemo

tcbset{
% workaround for question 1
break at=100pt,
}
frameDemo

tcbset{
% workaround for question 1 & 2
break at=100pt/180pt,
enlarge top at break by=80pt,
}
frameDemo

tcbset{
% workaround for question 1, 2 & 3
finish first and middle={
node[anchor=south east]
at ([xshift=-2pt]interior.south east)
{itshape continued};
},
bottomsep at break=.7baselineskip
}
frameDemo

begin{frame}[allowframebreaks]
fontsize{120}{120}selectfont empty page
end{frame}
end{document}


A helper to assemble these beamer pages:



documentclass[landscape, a4paper]{article}
usepackage{pdfpages}

begin{document}
includepdf[pages={1-2,16,16,16,3-6,16,7-10,16,11-15}, nup=5x5, frame, delta=5 5]{breakable-in-beamer-texsx.pdf}
end{document}


Screenshoot of assembled beamer pages:
screenshoot







beamer tcolorbox






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 14 at 1:36







Johannes Z

















asked Jan 14 at 1:26









Johannes ZJohannes Z

321110




321110








  • 1





    You are misusing beamer. Presentations shouldn't contain long continous text parts. Design your slides one by one. allowframebreak can be used for exceptions like a bibliography.

    – Ulrike Fischer
    Jan 14 at 9:17














  • 1





    You are misusing beamer. Presentations shouldn't contain long continous text parts. Design your slides one by one. allowframebreak can be used for exceptions like a bibliography.

    – Ulrike Fischer
    Jan 14 at 9:17








1




1





You are misusing beamer. Presentations shouldn't contain long continous text parts. Design your slides one by one. allowframebreak can be used for exceptions like a bibliography.

– Ulrike Fischer
Jan 14 at 9:17





You are misusing beamer. Presentations shouldn't contain long continous text parts. Design your slides one by one. allowframebreak can be used for exceptions like a bibliography.

– Ulrike Fischer
Jan 14 at 9:17










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f470015%2fbreakable-tcolorbox-in-beamer-does-not-break-automatically-and-following-questi%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f470015%2fbreakable-tcolorbox-in-beamer-does-not-break-automatically-and-following-questi%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?