Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ follow semantic versioning; release dates are ISO 8601.

### Public API

- **A DOCX export keeps a band of layers and a shape container on the page the layout puts them
on.** The layout moves a layer stack or a shape container to a new page whole. A stack of more
than one layer is written as a band, its layers one after the other, and Word was told nothing
for it or for a shape container.
- Measured in Word and LibreOffice on Windows, with nothing named:
- a band of two layers the page moved to the next page stood with its first layer at the foot
of the page above, a band with a picture as its second layer too;
- a shape container of three lines stood with two of them there.
- Each is now kept on its page as a stack of one layer is: each paragraph keeps its lines, and
all but the last keep with the next. Each measured one the layout moves to a new page now
stands whole there, in both editors.
- The first paragraph, picture or spacer of a band the layout moves to a new page now holds the
space above it there, as one in the flow does: in a line kept with it, or in a spacer's own
line. That holds where a backdrop is drawn before it too. Set on that page whole, a band with a
14pt margin stood 14pt high, as did one with a backdrop laid first and one nested in a stack of
one layer with that margin; one in a section with a 10pt margin stood 10pt high. Held, each
stands where the page sets it, within 1.2pt, and the backdrop where the page draws it.
- A band whose first block is a list or a row still loses that space, measured; nor is it held
for a table, a panel or a line pair written first.
- A later layer whose own margin, or a picture's room in its box, reaches above where the layers
before it end stands lower than the page sets it by as much as it reaches above them, 13pt in
the measured case. Such a band near the foot of a page, which the page keeps there, now moves
to the next page whole in Word rather than split.
- 10 of the corpus's 62 DOCX change, in these keeps alone (`w:keepLines`, `w:keepNext`). Each
renders word for word as before in Word and LibreOffice. Its 1246 notes are unchanged.
- **A DOCX export names a block Word may break inside a panel the layout moves it down in.** The
layout moves a block kept together, a layer stack or a shape container whole, or a block kept
with the next with it, to the next page as the page requires. Inside a panel the layout runs on
Expand All @@ -31,7 +56,7 @@ follow semantic versioning; release dates are ISO 8601.
- A stack of one layer in the flow is now kept on its page as a block kept together is: each
paragraph keeps its lines, and all but the last keep with the next. Each measured stack now
stands whole on the page the layout sets it on, in both editors.
- A stack in a table's or a panel's cell is not kept here, nor a stack of more than one layer.
- A stack in a table's or a panel's cell is not kept here.
- No document of the 62 in the corpus has a stack of one layer in the flow, and none changes.
- **A DOCX export keeps the space above a spacer opening a stack of one layer on a new page.** A
stack of one layer that opens with a spacer, moved to a new page, lost the space above its text:
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/backend-capability-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ honour an option ignores it (documented contract).
| Protection / encryption | ✅ `PdfDocumentPostProcessor` | ❌ (ignored with a one-time warning — no OOXML encryption support planned) | ❌ (not written, so the file opens unprotected; reported `DROPPED`, `protection`) |
| Viewer preferences | ✅ `applyViewerPreferences` in `PdfFixedLayoutBackend` | ❌ (ignored with a one-time warning — PDF-viewer concept) | n/a (not written; reported `DROPPED`, `viewer preferences`) |
| Debug guide lines / node labels | ✅ `PdfGuideLinesRenderer`, `PdfNodeLabelRenderer` | ❌ (ignored with a one-time warning — render through the PDF backend to see overlays) | n/a |
| Keep a block on one page (`keepTogether()`, `keepWithNext()`) | ✅ resolved by `LayoutCompiler` before any backend runs | ✅ same — the slides are the laid-out pages | ✅ `DocxSemanticBackend.keepOnOnePage` — Word re-paginates, so a block the layout placed on one page is told to stay there: `w:keepLines` on each of its paragraphs and `w:keepNext` on every one but the last (on the last too for `keepWithNext`), a table inside it chained row by row. A layer stack of one layer in the flow is kept so too, as the layout moves it to a new page whole. A block that ran over a page break in the layout is taller than a page and is left to flow, as the layout left it. A body table of one row kept with what follows, its cells holding paragraphs alone, is written with a row that may break (`letTheOneRowTablesKeptWithTheNextBreak`): LibreOffice reads a one-row table whose row may not break as one that may not split, and keeps such a table with nothing |
| Keep a block on one page (`keepTogether()`, `keepWithNext()`) | ✅ resolved by `LayoutCompiler` before any backend runs | ✅ same — the slides are the laid-out pages | ✅ `DocxSemanticBackend.keepOnOnePage` — Word re-paginates, so a block the layout placed on one page is told to stay there: `w:keepLines` on each of its paragraphs and `w:keepNext` on every one but the last (on the last too for `keepWithNext`), a table inside it chained row by row. A layer stack or a shape container in the flow is kept so too, as the layout moves it to a new page whole, a band of layers included; the first block of a band the layout moves to a new page — a paragraph, a picture or a spacer, a backdrop drawn before it or not — holds the space above it there, as one in the flow does: in a line kept with it, or in a spacer's own line. A block that ran over a page break in the layout is taller than a page and is left to flow, as the layout left it. A body table of one row kept with what follows, its cells holding paragraphs alone, is written with a row that may break (`letTheOneRowTablesKeptWithTheNextBreak`): LibreOffice reads a one-row table whose row may not break as one that may not split, and keeps such a table with nothing |
| Layer stack — layers drawn over one another (`addLayerStack`) | ✅ each layer's fragments at the place the layout gave it | ✅ same | ⚠️ `DocxSemanticBackend` — Word has no layers, so a stack's children are written one after the other, without their positions. The exception is a stack whose layers are side-by-side columns (`DocxLayerColumns`): every layer a plain container at the stack's top-left corner, the bands their padding leaves either the same or apart. That is written as one table row, a cell per band, the way a two-column CV lays its columns out as layers to draw the name first. Layers sharing a band follow one another in its cell. A spacer the layout placed level with content of another layer of the same band only keeps that content's place, and is not written. The space above a later layer's first block is the gap the page shows below the content before it. Each layer is held to its box across, past the stack's edge where the page sets it past it, by an indent below zero; in a table cell no further left than the indents round it give, the rest named. The one layer of a stack of one layer is held the same way, its offset across kept and its measure with it; in a table cell, composed in a table's cell with no place of its own, and for an offset down or up, which moves it without making room for it, it is written where the stack starts and named — not where a band or a column's layer sets it at the page's distance below what is above it, which holds the offset. A shape container written as a panel in a table cell keeps its padding round its outline, as the page does — the table's indent and the space above and below it; where its table ends its cell, Word sets the cell's content at its middle or foot without the space below, which a centred cell takes off the space above, the rest named — sets what its cell holds at the top, middle or foot as its first written layer is set, holds a paragraph across to its box, and names a written layer after the first (written under the ones before it), an offset down or up, a box past the shape's side, and a layer set across by a box the layout does not give (`layer offset`). A layer the page starts above where those before it end — a caption over its photo, a label in a card's corner — is written under them, in a column's cell as in a band, and the report names it; a stack composed in a table cell, or exported with no layout, has no place of its own, and one writing more than one of its layers is named with them not measured. What the page draws inside another layer's fill comes after that fill. Drawings stack as the page paints them, by their z-index, each given its place (`wp:anchor/@relativeHeight`) from where the page paints its fragment, whatever order the layers are written in — among the drawings behind the text, and among those in front of it, as Word draws every one behind under every one in front. Measured in LibreOffice: `CharcoalGold`, `SidebarPortrait` and `SlateOrange` fit on one page, as on the page; `NavySidebar` runs one line onto a second page. A stack or shape container the page gives no room — its margins taking back its whole height, as `LumaStudioInvoice`'s sidebar over the page's top margin — is laid over the flow (`laidOverTheFlow`): its drawings where the page draws them, each paragraph in a text box in front of the text where the page sets it, nothing in the flow. Not in a table cell or a panel, and not when it holds anything but drawing and plain paragraphs — a link, an anchor, a picture, a list or a table keeps it in the flow as above. A canvas is written as its contents — what it writes one block after another, its drawings where it places them — and holds its height: the room under what it writes is the space below it, and one that only draws holds its whole box where nothing round it — a band before its layer's first block, drawings held whole, an overlay it is a layer of — measures that room already. The report names the places and the width it loses, as it does a column's fixed width narrower than its band, and what it writes running past its height, a drawing in what it writes that takes no room in Word, or a height not measured |

## Output surface and lifecycle
Expand Down
Loading
Loading