我tcolorbox
这样定义了环境:
\newtcolorbox{cajita}[1]{ boxrule=2pt,
breakable,
enhanced,
arc=3mm,
colback=Orange!15,
colframe=Orange!70,
colbacktitle=Orange!35,
coltitle=black,
fonttitle={\bfseries},
attach boxed title to top left={xshift=10pt,yshift*={-\tcboxedtitleheight/2}},
boxed title style={parbox,boxrule=2pt,boxsep=1.5mm},
segmentation style={Orange!50,loosely dotted,line width=2pt},
beforeafter skip=\topskip, title = {#1},
parbox=false}{}
当出现分页符时,框会停在文本的最后一行下方,然后继续下一页。但是,我希望框能越过文本的最后一行,一直到页面的最底部,甚至越过页脚。当然,只是框,而不是文本。
我知道在大多数情况下,这在审美上是不合理的,但我保证在这种情况下是合理的。我有一个图像叠加层作为页脚,因此框会“消失”在该图像后面,而不是尴尬地停在它前面。
这能做到吗?
编辑:最小工作示例:
\documentclass[11pt]{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\newtcolorbox{cajita}[1]{ boxrule=2pt,
breakable,
enhanced,
arc=3mm,
coltitle=black,
fonttitle={\bfseries},
attach boxed title to top left={xshift=10pt,yshift*={-\tcboxedtitleheight/2}},
boxed title style={parbox,boxrule=2pt,boxsep=1.5mm},
segmentation style={loosely dotted,line width=2pt},
beforeafter skip=\topskip, title = {#1},
parbox=false}{}
\begin{document}
\begin{cajita}{mybox}
\lipsum
\end{cajita}
\end{document}
答案1
enlarge bottom at break by
您可以使用andbottomsep at break
或 的组合pad before break
:
\documentclass[11pt]{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\newtcolorbox{cajita}[1]{ boxrule=2pt,
breakable,
enhanced,
arc=3mm,
coltitle=black,
fonttitle={\bfseries},
attach boxed title to top left={xshift=10pt,yshift*={-\tcboxedtitleheight/2}},
boxed title style={parbox,boxrule=2pt,boxsep=1.5mm},
segmentation style={loosely dotted,line width=2pt},
beforeafter skip=\topskip, title = {#1},
enlarge bottom at break by=-3cm,
%pad before break=3cm,
bottomsep at break=3cm,
parbox=false}{}
\begin{document}
\begin{cajita}{mybox}
\lipsum
\end{cajita}
\end{document}