mirror of
https://github.com/aphrody-labs/wordcraft.git
synced 2026-10-14 03:29:04 +00:00
- Model: `SectionProps::doc_grid` (`w:docGrid` type, line pitch, charSpace) and the paragraph `w:snapToGrid` flag; DOCX read and write (ECMA-376 §17.6.5). - Layout: with a line grid, lines of snapping paragraphs take whole line pitches with their text centred; with a character grid, East Asian characters take whole cells of the character pitch (all text with snapToChars), Latin text stays proportional. Hostile pitches and charSpace are clamped. Headers and footers don't snap. - Command `layout.documentGrid` (type, linesPerPage, charsPerLine, linePitch, charSpace), one undo step, section scope; catalog row under Layout › Page Setup. - Page Setup dialog: Document Grid section; View › Gridlines draws the document grid of a section that has one. UI strings in every catalog (incl. et, sr, sr-latn). - Tests: DOCX round trip, line pitch and lines per page, character pitch placement, command with clamping and undo. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>