如何使用 tcolorbox 在框外插入原始程式碼,在我的例子中,框拆分了盡可能多的頁面。
我的MWE:
\documentclass{book}
\RequirePackage{lipsum}
\RequirePackage[breakable,hooks]{tcolorbox}
\tcbuselibrary{breakable,skins}
\makeatletter
\newtcolorbox{Boxone}[2][]{% enhanced,
boxrule=.2pt,boxsep=0pt,colframe=red,colback=gray,
enhanced,left=9pt,right=9pt,top=6pt,bottom=4pt, breakable,
sharp corners, arc=15pt, rounded corners=northeast,
pad at break=9pt,bottomrule at break=0pt,toprule at break=0pt,
%freelance,
height fixed for=all, }
\begin{document}
\begin{Boxone}{Example 1.4}
\lipsum[1-40]
\end{Boxone}
\end{document}