The library breakable supports automatically breaking a tcolorbox into multiple pages. If a tcolorbox is set to breakable, it will first check if the entire box fits on the current page. If not, it checks if at least a set number of lines can fit, otherwise inserts a page break. It then splits the box content across pages, outputting the first, middle, and last parts as needed to fill each page.
The library breakable supports automatically breaking a tcolorbox into multiple pages. If a tcolorbox is set to breakable, it will first check if the entire box fits on the current page. If not, it checks if at least a set number of lines can fit, otherwise inserts a page break. It then splits the box content across pages, outputting the first, middle, and last parts as needed to fill each page.
The library breakable supports automatically breaking a tcolorbox into multiple pages. If a tcolorbox is set to breakable, it will first check if the entire box fits on the current page. If not, it checks if at least a set number of lines can fit, otherwise inserts a page break. It then splits the box content across pages, outputting the first, middle, and last parts as needed to fill each page.
LIB The library is loaded by a package option or inside the preamble by:
\tcbuselibrary{breakable}
17.1 Technical Overview
The library breakable supports the automatic breaking of a tcolorbox. This feature is LIB
enabled by /tcb/breakable P. 353 and disabled by /tcb/unbreakable P. 354 .
If a tcolorbox is set to be /tcb/breakable P. 353 , then the following algorithm is executed: 1. The box content is read to a box register similar but not identical to the unbreakable case. 2. If the total box fits into the current page, it is shipped out visibly unbroken and the algorithm stops. Unbroken Box The box. unbroken 3. Otherwise, it is checked if at least /tcb/lines before break P. 354 of the upper box can be placed on the current page. If not, a page break is inserted and the algorithm goes back to Step 2. 4. Now, the break sequence starts. The upper box part or the lower box part is split such that it fits into the current page. The fitting part is named first part of the break sequence and shipped out. Broken Box The box. first 5. If the remaining content of the total box fits into the current page, the algorithm continues with Step 7, else with Step 6. 6. The upper box part or the lower box part is split such that it fits into the current page. The fitting part is named middle part of the break sequence and shipped out. Then, the algorithm goes back to Step 5.
The box. middle
7. The remaining part is named last part of the break sequence and shipped out. The algo- rithm stops.
The box. last
The algorithm takes care that the optional segmentation line never appears at the end of a box. The optional lower box part is also checked to have at least /tcb/lines before break P. 354 .