diff --git a/README.md b/README.md index 2159493..1229ff2 100644 --- a/README.md +++ b/README.md @@ -135,16 +135,53 @@ Breaks are not a corner: **435 of the 560 forms carry a ``**, and 2 155 of the 2 561 in the corpus are `startNew="1"`, which means "a fresh sheet here, once". -A container that would have to be **broken in two** for its parts to fit is not -broken. pdf.js keeps `[$extra].children`, a generator and a `failingNode` to do -that (`layout.js:38-53`); this does not. A container that *may* be split -(`Subform[$isSplittable]`, `template.js:4940-4975`) has its children -distributed across sheets instead, which is the same thing where the container -itself draws nothing. One that may not — a positioned layout, a row, or -anything with `keep intact` — moves whole, and is reported unplaced where it -fits no sheet at all. 1 355 elements in the corpus carry -`keep intact="contentArea"`, which is a designer saying "do not let this row -land half on one page and half on the next". +### Splitting a container is a chain question, not a node question + +A container that *may* be split is broken across the boundary: what it placed +before the break stays where it is, and the rest of it begins again at the top +of the next content area — which is what pdf.js's saved generator and +`failingNode` do (`layout.js:38-53`). + +Whether it may is **a property of the whole chain above it**, and +`Subform[$isSplittable]` (`template.js:4940-4975`) asks the container above +before it looks at the container itself. Four things must all hold: + +1. the container above it is splittable — the recursion ends at the + `