Skip to content

[fork CI] feat(tables): format --cell-margins - #1

Closed
xsvm wants to merge 1 commit into
mainfrom
feat/table-cell-margins
Closed

xsvm wants to merge 1 commit into
mainfrom
feat/table-cell-margins

Conversation

@xsvm

@xsvm xsvm commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Fork-internal PR to run upstream CI before opening the real PR against kklimuk/docx-cli. Will be closed once CI is green.

…adding

`tables format` could shade, align, border and size cells but not pad them,
so a table rebuilt to match a template's 15-twip margins came out visibly
different with no fix short of `raw edit`.

--cell-margins takes one measure or top,right,bottom,left (units required,
0 allowed, `none` clears). With --at tN it writes the table default
<w:tblCellMar> (Word's "Default cell margins", inherited by rows added
later); a row/column/cell/range writes each cell's <w:tcMar>, which tracks
as a real tcPrChange. The table default rides the audit-comment path like
--align/--style.

Both read back: Table.cellMargins / TableCell.margins in the AST and
`cell-margins=` / `margins=` on the docx:table / docx:cell notes, in the
flag's own shape so an agent can re-apply a template's value verbatim.
The reader accepts Word's left/right-only form and strict start/end.

Folded into the tables-mutations fixture and the invoice weak-agent
scenario.
@xsvm xsvm closed this Oct 26, 2026
@xsvm xsvm reopened this Oct 26, 2026
@xsvm

xsvm commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

Fork CI green (8/8); opened upstream as kklimuk#23.

@xsvm xsvm closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant