Browse / github.com/storytold/wordcraft / patch
Borders: Word's dash patterns, and dashSmallGap as its own style
Borders: Word's dash patterns, and dashSmallGap as its own style Paragraph, cell and table borders now use the dash patterns Word draws, measured from Word itself, and `dashSmallGap` gets its own style instead of being read (and saved) as `dashed`. ## Measurements A test document with bottom borders in each style at `w:sz` 2, 4, 6, 8, 12, 18 and 24 (paragraph borders) and 4, 8, 12 (table borders), exported to PDF by Word for Mac (Quartz PDFContext, macOS 27.2). Word draws every border as alternating filled rectan [wordcraft-border-test-word-export.pdf](https://github.com/user-attachments/files/34011626/wordcraft-border-test-word-export.pdf) [wordcraft-bor
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- ro-legal-docx (imported from pull request #4558, open)
- Base
f8e327b068a2115d7f3e7f18fc7b9cb99a1fa5f7- Size
- +298 −31 in 18 files
- Review
- pending
- Shared
- 2026-10-28
- Id
a45746ea8c969cfc897d655b
How it went
No other operator has reported using it yet.
Diff
raw · ROADMAP.md crates/doc/src/props/para_props.rs crates/docx/tests/it/roundtrip.rs crates/engine/src/cmd/table_style.rs crates/formats/src/rtf/export.rs crates/formats/src/rtf/tests.rs crates/formats/src/rtf/word.rs crates/layout/src/display/page.rs crates/layout/src/display/paint.rs crates/pdf/src/exporter/draw.rs crates/pdf/src/tests.rs crates/render/src/tests.rs crates/ui-egui/src/dialogs/dialogs_para.rs crates/ui-egui/src/dialogs/dialogs_table_style.rs docs/file-format-parity.md docs/gaps.md docs/layout-parity.md docs/ui-parity.md
@@ -4,7 +4,9 @@ **Stage: alpha** · next: beta, ~15 points (60% → 75% ready for real work) and ~150–230 h away -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-25 · **Change:** trivial (progress log: Custom document properties dialog, #2982; previously trivial: progress log: View › New Window; previously trivial: progress log: interface translations come from storytold/craft-i18n through the `craft-i18n` crate; previously trivial: progress log: disabled-control reasons translated in every interface language, #2678; previously trivial: progress log: mail merge record navigation and record ranges for printing, #3028; previously trivial: selection bar for right-to-left paragraphs and table rows; previously trivial: group connector rerouting preserves rotated and flipped free or unresolved endpoints under nonuniform group scaling; readiness estimates unchanged; previously trivial: progress log: a word with no break opportunity in it no longer makes the layout quadratic, #3412; previously trivial: progress log: a relationship the markup names without the prefix is read as it wrote, and an ordinary `id` names no part; previously trivial: progress log: a document with many relationships opens in the time its part takes, and an id the text only mentions is not a reference, #3411; previously trivial: progress log: read only and comments-only protection grey out edits; previously trivial: progress log: an empty paragraph with a hidden mark shows nothing, not even its list number, #3982; previously trivial: progress log: "NaN" in the Font dialog's Size box no longer closes the app, #3663; previously trivial: progress log: a table cell span from a `.json` file no longer overflows, #3637; previously trivial: progress log: a click in the footer while editing the header moves there; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: Slovenian interface catalog, 2,614 entries; previously trivial: Insert Table of Figures dialog for any caption label, #3013; previously trivial: progress log: Home › Underline drop-down, #2738; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: progress log: the scrollbar page tip stays on one line, #3341; previously trivial: progress log: forms protection greys out the control buttons; previously trivial: progress log: a document with many content controls saves in the time the controls take, #13; previously trivial: progress log: Word signature lines kept on save; previously trivial: a Thai run with Latin finds one installed font covering it all on Linux too, #1549; previously trivial: progress log: closing the header returns to the body selection, #3331; previously trivial: progress log: saving to a NAS share mounted by GVFS, #3003; previously trivial: progress log: a picture dragged near the bottom of a page lands there, #3169; previously trivial: centred list labels after leading page breaks, #2964; previously trivial: progress log: inline pictures drag to an insertion cursor and stay inline, #2233, #2234; previously trivial: progress log: a text file saved over itself closes without asking, #2376; previously trivial: progress log: a text frame in the paragraph defaults frames nothing, #2360; previously trivial: fixed font inputs in four layout controls; previously trivial: typing no longer starts render threads on every repaint, #3027; previously trivial: a right, centre or decimal tab whose text doesn't fit, or a left tab past the right indent, goes to the next line with its text, #1840; previously trivial: progress log: banded rows shade as in Word, #3415; previously trivial: progress log: the table handles show while the caret is in the table, #2428; previously trivial: progress log: a click below a floating table reaches the text after it, #2038; previously trivial: progress log: Delete on selected table cells leaves one empty paragraph in each, #2802; previously trivial: progress log: lam-alef in exported PDFs extracts whole with fonts that draw it as two glyphs, #2310; previously trivial: Bullets and Numbering toggle off style-inherited lists at their effective level, including basedOn chains and numbered ListParagraph styles; other paragraphs and list definitions stay unchanged (related to #3459); previously trivial: Russian sorting keeps ё with е and recognises decomposed ё/й; previously trivial: progress log: a text box that keeps the keyboard no longer resets the input method every frame, #2986; previously trivial: progress log: recovery copies and .json files store pictures as base64, #586 follow-up; previously trivial: progress log: legacy menu keys, #1697; previously trivial: progress log: shape gradients and transparency, #1500; previously trivial: progress log: Focus fills the screen, and Full Screen View shows the pages alone, #1678; previously trivial: progress log: text above a float's anchor wraps around it, #2048; previously trivial: progress log: File › Recover follows the app theme, #3243; previously trivial: progress log: formatting toolbar with the text context menu, #2959; previously trivial: progress log: caret inside ligatures, #1974; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: a word after a slash wraps whole, like Word, #2963; previously trivial: progress log: a header-cell picture watermark sits behind the text, #1775; previously trivial: symbols keep their font when the text font changes, #2036; previously trivial: opening a DOCX no longer copies its pictures; previously trivial: Add Font imports every selected font file, #1789); previously trivial (RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: Read Aloud speaks each sentence in its own language, #1843; previously trivial: hint-reliant CJK outlines; previously trivial: Ctrl+wheel zoom no longer scrolls the document, #1743; previously trivial: progress log: Turkish case mapping in AutoCorrect, #1923; previously trivial: a mouse drag on a table leaves the view where it is, #1738; previously trivial: progress log: Hebrew field results and smart quotes, #1670; previously trivial: Backspace removes a selected table, rows or columns, #1844; previously trivial: progress log: mixed Hebrew/Latin text keeps its order in Word, #1543; previously trivial: progress log: web typing in non-Latin text no longer repeats, #1480; previously trivial: progress log: font family caches bounded and math font lookups follow font changes, #1354; previously trivial: `-->` AutoCorrect replacement, #2223; previously trivial: numbered headings, #1793; previously trivial: Navigation Find exposes Results, #2096; previously trivial: progress log: Columns on selected text, #2024; previously trivial: progress log: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: progress log: Indonesian proofing, #498; previously trivial: progress log: DOCX glossary documents (building blocks); previously trivial: progress log: Read Mode keeps the keyboard and shows whole, unobscured columns, #1772); previously trivial: progress log: font list entries of tall-ascent fonts no longer cut off, #2570); previously trivial: progress log: Split Cells and Convert Text to Table dialogs follow the Word check, #2592; previously trivial: a new source's Tag is made like Word's, three letters of the author and two digits of the year with a number added when taken, and an edit keeps the Tag, #2094; previously trivial: Web Layout fills the window width, #1876; previously trivial: progress log: Different First Page headers reachable from page 1, #2826; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717); previously trivial: progress log: web preferences kept between visits, #2132; previously trivial: progress log: undrawable private-use list bullets show the level's default bullet, #1683; previously trivial: progress log: `w:eastAsianLayout` kept on save; previously trivial: table style editor formats every part, #714); previously trivial: VML freeforms read and kept on save; previously trivial: progress log: consistent preferred cell widths; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: page-break-only list paragraphs hide their labels; previously trivial: progress log: grouped `flowChartOr` shapes draw their circle and crossing spokes; previously trivial: progress log: copies keep their formatting in other programs, #1523; previously trivial: progress log: privacy options on save, #1062; previously trivial: progress log: equation pictures in theme colours on Windows, #1002; previously trivial: symbol fonts, #776; previously trivial: the save prompt answers from the keyboard, #861; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw tab ink, #307, and Draw Table and Eraser, #303, landed: catalog 402/434; previously minor: readiness table with hours per audience; full number back to the additive weighted sum, 60%; mainstream and essentials numbers added; alpha gate checked; previously major: full re-measure against Word for Mac 16.113.4; restructured to the craftrules progress-docs standard) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-27 · **Change:** trivial (progress log: Custom document properties dialog, #2982; previously trivial: progress log: View › New Window; previously trivial: progress log: interface translations come from storytold/craft-i18n through the `craft-i18n` crate; previously trivial: progress log: disabled-control reasons translated in every interface language, #2678; previously trivial: progress log: mail merge record navigation and record ranges for printing, #3028; previously trivial: selection bar for right-to-left paragraphs and table rows; previously trivial: group connector rerouting preserves rotated and flipped free or unresolved endpoints under nonuniform group scaling; readiness estimates unchanged; previously trivial: progress log: a word with no break opportunity in it no longer makes the layout quadratic, #3412; previously trivial: progress log: a relationship the markup names without the prefix is read as it wrote, and an ordinary `id` names no part; previously trivial: progress log: a document with many relationships opens in the time its part takes, and an id the text only mentions is not a reference, #3411; previously trivial: progress log: read only and comments-only protection grey out edits; previously trivial: progress log: an empty paragraph with a hidden mark shows nothing, not even its list number, #3982; previously trivial: progress log: "NaN" in the Font dialog's Size box no longer closes the app, #3663; previously trivial: progress log: a table cell span from a `.json` file no longer overflows, #3637; previously trivial: progress log: a click in the footer while editing the header moves there; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: Slovenian interface catalog, 2,614 entries; previously trivial: Insert Table of Figures dialog for any caption label, #3013; previously trivial: progress log: Home › Underline drop-down, #2738; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: progress log: the scrollbar page tip stays on one line, #3341; previously trivial: progress log: forms protection greys out the control buttons; previously trivial: progress log: a document with many content controls saves in the time the controls take, #13; previously trivial: progress log: Word signature lines kept on save; previously trivial: a Thai run with Latin finds one installed font covering it all on Linux too, #1549; previously trivial: progress log: closing the header returns to the body selection, #3331; previously trivial: progress log: saving to a NAS share mounted by GVFS, #3003; previously trivial: progress log: a picture dragged near the bottom of a page lands there, #3169; previously trivial: centred list labels after leading page breaks, #2964; previously trivial: progress log: inline pictures drag to an insertion cursor and stay inline, #2233, #2234; previously trivial: progress log: a text file saved over itself closes without asking, #2376; previously trivial: progress log: a text frame in the paragraph defaults frames nothing, #2360; previously trivial: fixed font inputs in four layout controls; previously trivial: typing no longer starts render threads on every repaint, #3027; previously trivial: a right, centre or decimal tab whose text doesn't fit, or a left tab past the right indent, goes to the next line with its text, #1840; previously trivial: progress log: banded rows shade as in Word, #3415; previously trivial: progress log: the table handles show while the caret is in the table, #2428; previously trivial: progress log: a click below a floating table reaches the text after it, #2038; previously trivial: progress log: Delete on selected table cells leaves one empty paragraph in each, #2802; previously trivial: progress log: lam-alef in exported PDFs extracts whole with fonts that draw it as two glyphs, #2310; previously trivial: Bullets and Numbering toggle off style-inherited lists at their effective level, including basedOn chains and numbered ListParagraph styles; other paragraphs and list definitions stay unchanged (related to #3459); previously trivial: Russian sorting keeps ё with е and recognises decomposed ё/й; previously trivial: progress log: a text box that keeps the keyboard no longer resets the input method every frame, #2986; previously trivial: progress log: recovery copies and .json files store pictures as base64, #586 follow-up; previously trivial: progress log: legacy menu keys, #1697; previously trivial: progress log: shape gradients and transparency, #1500; previously trivial: progress log: Focus fills the screen, and Full Screen View shows the pages alone, #1678; previously trivial: progress log: text above a float's anchor wraps around it, #2048; previously trivial: progress log: File › Recover follows the app theme, #3243; previously trivial: progress log: formatting toolbar with the text context menu, #2959; previously trivial: progress log: caret inside ligatures, #1974; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: a word after a slash wraps whole, like Word, #2963; previously trivial: progress log: a header-cell picture watermark sits behind the text, #1775; previously trivial: symbols keep their font when the text font changes, #2036; previously trivial: opening a DOCX no longer copies its pictures; previously trivial: Add Font imports every selected font file, #1789); previously trivial (RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: Read Aloud speaks each sentence in its own language, #1843; previously trivial: hint-reliant CJK outlines; previously trivial: Ctrl+wheel zoom no longer scrolls the document, #1743; previously trivial: progress log: Turkish case mapping in AutoCorrect, #1923; previously trivial: a mouse drag on a table leaves the view where it is, #1738; previously trivial: progress log: Hebrew field results and smart quotes, #1670; previously trivial: Backspace removes a selected table, rows or columns, #1844; previously trivial: progress log: mixed Hebrew/Latin text keeps its order in Word, #1543; previously trivial: progress log: web typing in non-Latin text no longer repeats, #1480; previously trivial: progress log: font family caches bounded and math font lookups follow font changes, #1354; previously trivial: `-->` AutoCorrect replacement, #2223; previously trivial: numbered headings, #1793; previously trivial: Navigation Find exposes Results, #2096; previously trivial: progress log: Columns on selected text, #2024; previously trivial: progress log: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: progress log: Indonesian proofing, #498; previously trivial: progress log: DOCX glossary documents (building blocks); previously trivial: progress log: Read Mode keeps the keyboard and shows whole, unobscured columns, #1772); previously trivial: progress log: font list entries of tall-ascent fonts no longer cut off, #2570); previously trivial: progress log: Split Cells and Convert Text to Table dialogs follow the Word check, #2592; previously trivial: a new source's Tag is made like Word's, three letters of the author and two digits of the year with a number added when taken, and an edit keeps the Tag, #2094; previously trivial: Web Layout fills the window width, #1876; previously trivial: progress log: Different First Page headers reachable from page 1, #2826; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717); previously trivial: progress log: web preferences kept between visits, #2132; previously trivial: progress log: undrawable private-use list bullets show the level's default bullet, #1683; previously trivial: progress log: `w:eastAsianLayout` kept on save; previously trivial: table style editor formats every part, #714); previously trivial: VML freeforms read and kept on save; previously trivial: progress log: consistent preferred cell widths; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: page-break-only list paragraphs hide their labels; previously trivial: progress log: grouped `flowChartOr` shapes draw their circle and crossing spokes; previously trivial: progress log: copies keep their formatting in other programs, #1523; previously trivial: progress log: privacy options on save, #1062; previously trivial: progress log: equation pictures in theme colours on Windows, #1002; previously trivial: symbol fonts, #776; previously trivial: the save prompt answers from the keyboard, #861; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw tab ink, #307, and Draw Table and Eraser, #303, landed: catalog 402/434; previously minor: readiness table with hours per audience; full number back to the additive weighted sum, 60%; mainstream and essentials numbers added; alpha gate checked; previously major: full re-measure against Word for Mac 16.113.4; restructured to the craftrules progress-docs standard) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4+> 2026-10-27 · #4558 preview follow-up: table Dashed uses 4:4, DashSmallGap 4:1 and DotDash 7:3:3:3, scaled by the painted stroke width; the paragraph DotDash preview uses the same document pattern. Dotted previews retain their existing behavior. Painted-shape regressions cover several pen widths; readiness estimates unchanged.+> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up. > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-18 · **Change:** trivial (English dialects in proofing, #1281; previously trivial: triple borders draw three lines, #1740; previously trivial: progress log: double-clicking a later page's footer no longer scrolls up, #2103; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: a word after a slash wraps whole, like Word, #2963; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: progress log: pasted blockquotes are indented paragraphs, #1270; previously trivial: progress log: print-area strings translated in every catalog; previously trivial: progress log: comments readable in the dark theme, #2045; previously trivial: progress log: ODT sections, #1379; previously trivial: progress log: table deletes, Change Case and Unlink Fields respect Track Changes and locked content controls, #1329; previously trivial: progress log: rounded rectangle corners, #1476; previously trivial: progress log: Save As type list, #1399; previously trivial: progress log: privacy options on save, #1062; previously trivial: progress log: equation pictures in theme colours on Windows, #1002; previously trivial: symbol fonts, #776; previously trivial: the save prompt answers from the keyboard, #861; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw tab ink, #307, and Draw Table and Eraser, #303, landed: catalog 402/434; previously minor: readiness table with hours per audience; full number back to the additive weighted sum, 60%; mainstream and essentials numbers added; alpha gate checked; previously major: full re-measure against Word for Mac 16.113.4; restructured to the craftrules progress-docs standard) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4 > **Printing update:** 2026-10-12 · direct desktop printing through craft-print; details below. @@ -140,6 +142,9 @@ Ranked, to beta (detail and remaining milestones in [docs/roadmap.md](docs/roadm ## Progress log +- 2026-10-27: Remaining border preview patterns (#4558): table Dashed and DotDash match the document arrays, with width-scaled small-gap dashes; paragraph DotDash also matches. Synthetic multi-width painted-geometry regressions cover the change. Dotted behavior and readiness estimates unchanged.+- 2026-10-27: Border dash patterns (#4558): dashSmallGap is a distinct document style; the paragraph Dashed preview has equal four-width dashes and gaps, and the table-style preview distinguishes smaller gaps. Painted-geometry regressions cover both previews. Existing border formats and readiness estimates are unchanged.+ - 2026-10-22: View › Window › New Window opens a second window on the document (desktop). The windows are titled `Name:1` and `Name:2` and each keeps its own caret, scroll position, zoom and view; edits and Undo are the document's and show in both. Closing one of them asks nothing; the last one asks about unsaved changes, and quitting asks once per document. - 2026-10-22: One native window per open document on the desktop. File › New and Open (from the ribbon, File, shortcuts, the file manager, the command line or the control channel) open the document in a window of its own, focused and placed a step below and right of the last one; opening a file replaces a blank document nobody has used in its own window, and a file that is already open brings its window to the front. Each window keeps its own ribbon tab, File page, dialogs, panes, scroll position and composition. View › Window › Switch Windows lists the windows and brings the chosen one forward. File › Close and a window's close button close that window, asking about unsaved changes first; the last window stays open with no document. Quitting asks about each document with unsaved changes in its own window, and Cancel keeps everything open. The control channel's input and screenshots go to the window focused last. The web app keeps one window. - 2026-10-22: Recovery covers every open document. Each dirty document keeps its own copy, written on the same ten-second cadence whether it is shown or not; closing a document without saving deletes its copy, as saving does, and a clean exit deletes the copies of every document saved or closed since its last copy. File › Recover lists only copies no open document keeps, and Restore opens a copy as another document (or in place of an untouched blank one), so it never replaces work. After a crash with several unsaved documents, the next start lists all of them.@@ -640,6 +645,9 @@ Footer page-table height and body wrapping are corrected. Other pagination gaps ## Revision history +> 2026-10-27 · #4558 preview follow-up: table Dashed uses 4:4, DashSmallGap 4:1 and DotDash 7:3:3:3, scaled by the painted stroke width; the paragraph DotDash preview uses the same document pattern. Dotted previews retain their existing behavior. Painted-shape regressions cover several pen widths; readiness estimates unchanged.+> 2026-10-27 · #4558: distinct dashSmallGap and corrected paragraph/table border previews; synthetic regressions, estimates unchanged.+> > 2026-10-23 · cu20we review follow-up: Only paragraph-relative box floats use the pre-spacing origin. Line-relative floats and page/margin fallbacks in cells and text boxes keep the text-top origin. Synthetic controls compare zero and 24 pt space-before across all four box contexts. New cap conversion helpers and regression tests document their contracts; readiness estimates unchanged. | Date | Change | Summary |@@ -1006,3 +1014,5 @@ Footer page-table height and body wrapping are corrected. Other pagination gaps | 2026-10-23 | trivial | Progress log: justified lines ending in a manual line break reach the margin (#3924) | | 2026-10-23 | trivial | Progress log: "NaN" in the Font dialog's Size box no longer closes the app (#3663) | | 2026-10-23 | trivial | Progress log: a table cell span from a `.json` file no longer overflows (#3637) |++> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up.@@ -103,6 +103,8 @@ pub enum BorderStyle { Double, Dotted, Dashed,+ /// Dashes with small gaps (`dashSmallGap`): four line widths on, one off.+ DashSmallGap, Thick, Triple, DotDash,@@ -110,6 +112,7 @@ pub enum BorderStyle { } impl BorderStyle {+ /// The OOXML border token; small-gap dashes keep their distinct `dashSmallGap` value. pub fn ooxml(self) -> &'static str { match self { BorderStyle::None => "nil",@@ -117,18 +120,21 @@ impl BorderStyle { BorderStyle::Double => "double", BorderStyle::Dotted => "dotted", BorderStyle::Dashed => "dashed",+ BorderStyle::DashSmallGap => "dashSmallGap", BorderStyle::Thick => "thick", BorderStyle::Triple => "triple", BorderStyle::DotDash => "dotDash", BorderStyle::Wave => "wave", } }+ /// Read an OOXML border token, using a single line for unrecognized styles. pub fn from_ooxml(s: &str) -> BorderStyle { match s { "nil" | "none" => BorderStyle::None, "double" => BorderStyle::Double, "dotted" => BorderStyle::Dotted,- "dashed" | "dashSmallGap" => BorderStyle::Dashed,+ "dashed" => BorderStyle::Dashed,+ "dashSmallGap" => BorderStyle::DashSmallGap, "thick" => BorderStyle::Thick, "triple" => BorderStyle::Triple, "dotDash" | "dotDotDash" => BorderStyle::DotDash,@@ -2735,3 +2735,21 @@ fn drop_cap_options_round_trip() { (Some(4), Some(true), None, None) ); }++/// Each border style keeps its own `w:val` through a save: `dashSmallGap` stays+/// `dashSmallGap` (it was saved as `dashed`, a different pattern in Word).+#[test]+fn border_styles_keep_their_pattern() {+ for style in [BorderStyle::Dotted, BorderStyle::Dashed, BorderStyle::DashSmallGap, BorderStyle::DotDash] {+ let b = Border { style, width: 0.5, color: Some(Rgb(0, 0, 0)), space: 1.0 };+ let mut p = Paragraph::with_text("Rule", CharProps::default());+ p.props.borders = Some(Borders { bottom: Some(b), ..Borders::default() });+ let mut d = Document::new();+ d.body = vec![para_block(p)];+ let back = rt(&d);+ let Block::Para(q) = &*back.body[0] else { panic!("a paragraph") };+ assert_eq!(q.props.borders.and_then(|b| b.bottom).map(|b| b.style), Some(style), "{style:?} round-trips");+ }+ assert_eq!(BorderStyle::from_ooxml("dashSmallGap"), BorderStyle::DashSmallGap);+ assert_eq!(BorderStyle::DashSmallGap.ooxml(), "dashSmallGap");+}@@ -360,12 +360,13 @@ fn color_param(r: &Value, k: &str) -> Result<Option<Rgb>, CmdError> { const NO_LINE: Border = Border { style: BorderStyle::None, width: 0.0, color: None, space: 0.0 }; /// The border styles by param name.-const LINE_STYLES: [(&str, BorderStyle); 9] = [+const LINE_STYLES: [(&str, BorderStyle); 10] = [ ("none", BorderStyle::None), ("single", BorderStyle::Single), ("double", BorderStyle::Double), ("dotted", BorderStyle::Dotted), ("dashed", BorderStyle::Dashed),+ ("dashSmallGap", BorderStyle::DashSmallGap), ("dotDash", BorderStyle::DotDash), ("thick", BorderStyle::Thick), ("triple", BorderStyle::Triple),@@ -135,6 +135,7 @@ fn style_num(k: Kind) -> Option<u32> { } } +/// The RTF control word for a border, retaining small-gap dashes as `\brdrdashsm`. fn rtf_border_style(s: wordcraft_doc::props::BorderStyle) -> &'static str { use wordcraft_doc::props::BorderStyle; match s {@@ -143,6 +144,7 @@ fn rtf_border_style(s: wordcraft_doc::props::BorderStyle) -> &'static str { BorderStyle::Double => "\\brdrdb", BorderStyle::Dotted => "\\brdrdot", BorderStyle::Dashed => "\\brdrdash",+ BorderStyle::DashSmallGap => "\\brdrdashsm", BorderStyle::Thick => "\\brdrth", BorderStyle::Triple => "\\brdrtriple", BorderStyle::DotDash => "\\brdrdashd",@@ -37,6 +37,24 @@ fn basic_reader() { assert!(matches!(&l.inlines[0], Inline::Text(_, f) if f.link.as_deref() == Some("http://a.b"))); } +/// Small-gap paragraph borders keep their style through parsing, export and re-import.+#[test]+fn dash_small_gap_border_round_trips() {+ use wordcraft_doc::props::BorderStyle;+ let rtf = br"{\rtf1\ansi\pard\brdrb\brdrdashsm\brdrw10 Dash\par}";+ let flow = parse(rtf).unwrap();+ let FBlock::Para(para) = &flow.blocks[0] else { panic!() };+ assert_eq!(para.borders.unwrap().bottom.unwrap().style, BorderStyle::DashSmallGap);+ let doc = import(rtf).unwrap();+ let exported = export(&doc);+ assert!(exported.contains("\\brdrb\\brdrdashsm\\brdrw10"), "{exported}");+ let back = import(exported.as_bytes()).unwrap();+ let para = back.body.iter().find_map(|b| if let wordcraft_doc::Block::Para(p) = &**b { Some(p) } else { None }).unwrap();+ let border = para.props.borders.unwrap().bottom.unwrap();+ assert_eq!(border.style, BorderStyle::DashSmallGap);+ assert_eq!(border.width, 0.5);+}+ #[test] fn paragraph_borders() { // A heading with a grey rule under it, as hh.ru résumés write their section titles.@@ -3,6 +3,7 @@ use super::styles::{StyleDef, is_char_format_word, is_format_word}; use super::*; impl Reader {+ /// Apply an RTF control word to reader state, including distinct dash and small-gap borders. pub(super) fn word(&mut self, w: &str, p: Option<i32>, starred: bool, first_in_group: bool) { // Every control word ends a multibyte run: the code page it is read in may change here // (`\f`, `\fcharset`, `\cpg`, `\ansicpg`, `\pard`), and `\par` must see the text before it.@@ -417,7 +418,8 @@ impl Reader { "brdrth" => BorderStyle::Thick, "brdrdb" | "brdrthtnsg" | "brdrtnthsg" | "brdrthtnmg" | "brdrtnthmg" | "brdrwavydb" => BorderStyle::Double, "brdrdot" => BorderStyle::Dotted,- "brdrdash" | "brdrdashsm" => BorderStyle::Dashed,+ "brdrdash" => BorderStyle::Dashed,+ "brdrdashsm" => BorderStyle::DashSmallGap, "brdrdashd" | "brdrdashdd" => BorderStyle::DotDash, "brdrtriple" => BorderStyle::Triple, "brdrwavy" => BorderStyle::Wave,@@ -314,10 +314,12 @@ fn change_bars(doc: &Document, page: &Page, items: &[Placed], m: &MarkupOptions, } } +/// Map a paragraph or table border to its stroke without changing underline dash patterns. fn border_stroke(s: BorderStyle) -> Stroke { match s { BorderStyle::Dotted => Stroke::BorderDotted, BorderStyle::Dashed => Stroke::BorderDashed,+ BorderStyle::DashSmallGap => Stroke::BorderDashSmallGap, BorderStyle::DotDash => Stroke::BorderDotDash, BorderStyle::Double => Stroke::Double, BorderStyle::Triple => Stroke::Triple,@@ -99,10 +99,13 @@ pub enum Stroke { /// Three thin lines side by side (a `triple` border). Triple, Wave,- /// Word's border patterns (paragraph, cell and table borders): dots one width on, one off;- /// dashes three on, one off; dash and dot.+ /// Word's border patterns (paragraph, cell and table borders), in line widths: dots one on,+ /// one off; dashes four on, four off (small gaps: four on, one off); dash and dot seven on, three off, three on, three off.+ /// Measured in Word for Mac's PDF export at every `w:sz` from 2 to 24, the same for+ /// paragraph and table borders. BorderDotted, BorderDashed,+ BorderDashSmallGap, BorderDotDash, } @@ -114,8 +117,9 @@ impl Stroke { Stroke::Dotted => Some(&[1.0, 2.0]), Stroke::Dashed => Some(&[4.0, 2.0]), Stroke::BorderDotted => Some(&[1.0, 1.0]),- Stroke::BorderDashed => Some(&[3.0, 1.0]),- Stroke::BorderDotDash => Some(&[3.0, 1.0, 1.0, 1.0]),+ Stroke::BorderDashed => Some(&[4.0, 4.0]),+ Stroke::BorderDashSmallGap => Some(&[4.0, 1.0]),+ Stroke::BorderDotDash => Some(&[7.0, 3.0, 3.0, 3.0]), Stroke::Solid | Stroke::Double | Stroke::Triple | Stroke::Wave => None, } }@@ -183,6 +183,8 @@ impl Exporter<'_> { } } + /// Draw a bounded line with the requested stroke, scaling dash lengths by its width.+ /// Invalid coordinates are skipped; border styles use their own dash and gap arrays. fn line(&mut self, s: &mut Surface, (x0, y0, x1, y1): (f32, f32, f32, f32), width: f32, c: Rgb, style: LineStyle, alpha: f32) { if ![x0, y0, x1, y1].iter().all(|v| ok(*v)) { return;@@ -211,7 +213,12 @@ impl Exporter<'_> { s.set_stroke(Some(stroke(w, None, LineCap::Butt))); seg(s, 0.0, 0.0); }- LineStyle::Dotted | LineStyle::Dashed | LineStyle::BorderDotted | LineStyle::BorderDashed | LineStyle::BorderDotDash => {+ LineStyle::Dotted+ | LineStyle::Dashed+ | LineStyle::BorderDotted+ | LineStyle::BorderDashed+ | LineStyle::BorderDashSmallGap+ | LineStyle::BorderDotDash => { let array = style.dashes().unwrap_or(&[]).iter().map(|k| k * w).collect(); s.set_stroke(Some(stroke(w, Some(StrokeDash { array, offset: 0.0 }), LineCap::Butt))); seg(s, 0.0, 0.0);@@ -2384,10 +2384,12 @@ fn raw_pdf(d: &Document) -> String { String::from_utf8_lossy(&export(d, &PdfOptions { compress: false, tagged: false, ..Default::default() }).unwrap()).into_owned() } +/// PDF border dash arrays scale independently for dotted, dashed, small-gap and dot-dash styles. #[test] fn borders_are_dashed_with_words_patterns() {- // Word draws a border's dots one width on and one off, its dashes three on and one off, and- // dash-dot as three, one, one, one; underlines keep their own patterns.+ // Border dots are one width on and one off; dashes four on and four off; small-gap+ // dashes four on and one off; dash-dot seven, three, three, three. Underlines keep+ // their own patterns. use wordcraft_doc::props::{Border, BorderStyle, Borders}; let bordered = |style: BorderStyle, width: f32| { let mut p = Paragraph::with_text("Rule", CharProps::default());@@ -2395,11 +2397,17 @@ fn borders_are_dashed_with_words_patterns() { para_block(p) }; let mut d = Document::new();- d.body = vec![bordered(BorderStyle::Dotted, 1.0), bordered(BorderStyle::Dashed, 2.0), bordered(BorderStyle::DotDash, 1.0)];+ d.body = vec![+ bordered(BorderStyle::Dotted, 1.0),+ bordered(BorderStyle::Dashed, 2.0),+ bordered(BorderStyle::DashSmallGap, 2.0),+ bordered(BorderStyle::DotDash, 1.0),+ ]; let raw = raw_pdf(&d); assert!(raw.contains("[1 1]0 d") || raw.contains("[1 1] 0 d"), "the dotted border");- assert!(raw.contains("[6 2]0 d") || raw.contains("[6 2] 0 d"), "the dashed border");- assert!(raw.contains("[3 1 1 1]0 d") || raw.contains("[3 1 1 1] 0 d"), "the dash-dot border");+ assert!(raw.contains("[8 8]0 d") || raw.contains("[8 8] 0 d"), "the dashed border");+ assert!(raw.contains("[8 2]0 d") || raw.contains("[8 2] 0 d"), "the dash-small-gap border");+ assert!(raw.contains("[7 3 3 3]0 d") || raw.contains("[7 3 3 3] 0 d"), "the dash-dot border"); } #[test]@@ -1316,3 +1316,55 @@ fn a_line_runs_from_top_left_to_bottom_right() { let p = shape_path(ShapeKind::Line, kurbo::Rect::new(10.0, 20.0, 30.0, 60.0), None); assert_eq!(p.elements(), &[kurbo::PathEl::MoveTo((10.0, 20.0).into()), kurbo::PathEl::LineTo((30.0, 60.0).into())]); }++/// Paragraph and table borders follow Word's patterns, in line widths (measured in Word for+/// Mac's PDF export): dashed four on, four off; small gaps four on, one off; dot-dash seven on, three off, three on, three+/// off; dotted one on, one off. A ½ pt dashed letterhead rule then reads as dashes, not as a+/// near-solid grey line.+#[test]+fn border_dash_patterns_follow_word() {+ use wordcraft_doc::props::{Border, BorderStyle, Borders};+ const SCALE: f32 = 8.0;+ // Dark and light run lengths (points) along a 2 pt bottom border of `style`.+ let runs = |style: BorderStyle| {+ let mut p = wordcraft_doc::Paragraph::with_text("Bordered", Default::default());+ p.props.borders =+ Some(Borders { bottom: Some(Border { style, width: 2.0, color: Some(Rgb(0, 0, 0)), ..Border::single(2.0) }), ..Borders::default() });+ let mut d = Document::new();+ d.body = vec![wordcraft_doc::para_block(p)];+ let l = layout(&d, &mut LayoutCache::new(), &LayoutOptions::default());+ let img = render_page(&d, &l.pages[0], SCALE, &RenderOptions::default());+ let dark = |x: u32, y: u32| img.pixel(x, y)[1] < 128;+ let (x0, x1) = ((150.0 * SCALE) as u32, (450.0 * SCALE) as u32);+ // The border's row: the one below the text with the most dark pixels between x0 and x1.+ let y = (0..img.height / 3).max_by_key(|&y| (x0..x1).filter(|&x| dark(x, y)).count()).unwrap();+ let mut out: Vec<(bool, f32)> = Vec::new();+ for x in x0..x1 {+ let d = dark(x, y);+ match out.last_mut() {+ Some((k, n)) if *k == d => *n += 1.0 / SCALE,+ _ => out.push((d, 1.0 / SCALE)),+ }+ }+ // The ends are cut by the window.+ out[1..out.len() - 1].to_vec()+ };+ let near = |a: f32, b: f32| (a - b).abs() <= 0.5;+ let all = |r: &[(bool, f32)], dark: bool, f: &dyn Fn(f32) -> bool| r.iter().filter(|(d, _)| *d == dark).all(|(_, n)| f(*n));+ // 2 pt line: dashes 8 pt, gaps 8 pt.+ let dashed = runs(BorderStyle::Dashed);+ assert!(dashed.len() > 10, "dashes drawn: {dashed:?}");+ assert!(all(&dashed, true, &|n| near(n, 8.0)), "dashed: 4 widths on {dashed:?}");+ assert!(all(&dashed, false, &|n| near(n, 8.0)), "dashed: 4 widths off {dashed:?}");+ // Small gaps: 8 pt dashes, 2 pt gaps.+ let small = runs(BorderStyle::DashSmallGap);+ assert!(all(&small, true, &|n| near(n, 8.0)) && all(&small, false, &|n| near(n, 2.0)), "dashSmallGap: {small:?}");+ // Dots 2 pt on, 2 pt off.+ let dotted = runs(BorderStyle::Dotted);+ assert!(all(&dotted, true, &|n| near(n, 2.0)) && all(&dotted, false, &|n| near(n, 2.0)), "dotted: {dotted:?}");+ // Dot-dash: 14 pt dash, 6 pt dot, 6 pt gaps.+ let dot_dash = runs(BorderStyle::DotDash);+ assert!(all(&dot_dash, true, &|n| near(n, 14.0) || near(n, 6.0)), "dot-dash on: {dot_dash:?}");+ assert!(all(&dot_dash, false, &|n| near(n, 6.0)), "dot-dash off: {dot_dash:?}");+ assert!(dot_dash.iter().any(|(d, n)| *d && near(*n, 14.0)) && dot_dash.iter().any(|(d, n)| *d && near(*n, 6.0)), "both: {dot_dash:?}");+}@@ -378,10 +378,11 @@ const LEFT: usize = 2; const RIGHT: usize = 3; const BETWEEN: usize = 4; -const STYLES: [(BorderStyle, &str); 8] = [+const STYLES: [(BorderStyle, &str); 9] = [ (BorderStyle::Single, "Single"), (BorderStyle::Dotted, "Dotted"), (BorderStyle::Dashed, "Dashed"),+ (BorderStyle::DashSmallGap, "Dashed, small gaps"), (BorderStyle::DotDash, "Dot dash"), (BorderStyle::Double, "Double"), (BorderStyle::Triple, "Triple"),@@ -751,10 +752,13 @@ fn draw_line(p: &egui::Painter, [a, b]: [egui::Pos2; 2], style: BorderStyle, wid p.extend(egui::Shape::dashed_line(&[a, b], stroke, px, px * 1.5)); } BorderStyle::Dashed => {- p.extend(egui::Shape::dashed_line(&[a, b], stroke, px * 4.0, px * 2.0));+ p.extend(egui::Shape::dashed_line(&[a, b], stroke, px * 4.0, px * 4.0));+ }+ BorderStyle::DashSmallGap => {+ p.extend(egui::Shape::dashed_line(&[a, b], stroke, px * 4.0, px)); } BorderStyle::DotDash => {- p.extend(egui::Shape::dashed_line_with_offset(&[a, b], stroke, &[px * 4.0, px], &[px * 2.0, px * 2.0], 0.0));+ p.extend(egui::Shape::dashed_line_with_offset(&[a, b], stroke, &[px * 7.0, px * 3.0], &[px * 3.0, px * 3.0], 0.0)); } BorderStyle::Wave => { let len = (b - a).length();@@ -978,4 +982,40 @@ mod tests { .collect(); assert!(texts.iter().any(|t| t.contains("(none)")), "empty-state hint shown"); }+ /// Painted paragraph previews use distinct document dash arrays at each preview stroke width.+ #[test]+ fn border_preview_paragraph_patterns_match_document_strokes() {+ let ctx = egui::Context::default();+ for width in [0.5, 1.0, 3.0] {+ for (kind, ratios) in [+ (BorderStyle::Dashed, [4.0, 4.0, 4.0, 4.0]),+ (BorderStyle::DashSmallGap, [4.0, 1.0, 4.0, 1.0]),+ (BorderStyle::DotDash, [7.0, 3.0, 3.0, 3.0]),+ ] {+ let out = ctx.run_ui(egui::RawInput::default(), |ui| {+ draw_line(ui.painter(), [egui::pos2(10.0, 20.0), egui::pos2(250.0, 20.0)], kind, width, egui::Color32::BLACK);+ });+ let segments: Vec<_> = out+ .shapes+ .iter()+ .filter_map(|s| if let egui::Shape::LineSegment { points, stroke } = &s.shape { Some((*points, stroke.width)) } else { None })+ .collect();+ out.drop_without_applying_deltas();+ assert!(segments.len() > 2);+ let actual = [+ segments[0].0[1].x - segments[0].0[0].x,+ segments[1].0[0].x - segments[0].0[1].x,+ segments[1].0[1].x - segments[1].0[0].x,+ segments[2].0[0].x - segments[1].0[1].x,+ ];+ for (actual, ratio) in actual.into_iter().zip(ratios) {+ assert!(+ (actual - ratio * segments[0].1).abs() < 0.01,+ "{kind:?}, width {width}: expected {}, got {actual}",+ ratio * segments[0].1+ );+ }+ }+ }+ } }@@ -405,10 +405,21 @@ pub fn table_style_preview(ui: &mut Ui, style: Option<&TableStyleProps>, look: T if let Some(e) = e.filter(Border::is_visible) { let color = e.color.map_or(egui::Color32::BLACK, rgb); let stroke = Stroke::new(e.width.clamp(0.5, 3.0) * 1.3, color);- if matches!(e.style, BorderStyle::Dotted | BorderStyle::Dashed | BorderStyle::DotDash) {- painter.extend(egui::Shape::dashed_line(&[from, to], stroke, 3.0, 2.0));- } else {- painter.line_segment([from, to], stroke);+ let px = stroke.width;+ match e.style {+ BorderStyle::Dashed => painter.extend(egui::Shape::dashed_line(&[from, to], stroke, px * 4.0, px * 4.0)),+ BorderStyle::DashSmallGap => painter.extend(egui::Shape::dashed_line(&[from, to], stroke, px * 4.0, px)),+ BorderStyle::DotDash => painter.extend(egui::Shape::dashed_line_with_offset(+ &[from, to],+ stroke,+ &[px * 7.0, px * 3.0],+ &[px * 3.0, px * 3.0],+ 0.0,+ )),+ BorderStyle::Dotted => painter.extend(egui::Shape::dashed_line(&[from, to], stroke, 3.0, 2.0)),+ _ => {+ painter.line_segment([from, to], stroke);+ } } } };@@ -607,10 +618,11 @@ pub fn body(app: &mut WordApp, ui: &mut Ui, f: Form) -> bool { } /// The border styles the pen offers (the Borders and Shading dialog's list).-const LINE_STYLES: [(BorderStyle, &str); 8] = [+const LINE_STYLES: [(BorderStyle, &str); 9] = [ (BorderStyle::Single, "Single"), (BorderStyle::Dotted, "Dotted"), (BorderStyle::Dashed, "Dashed"),+ (BorderStyle::DashSmallGap, "Dashed, small gaps"), (BorderStyle::DotDash, "Dot dash"), (BorderStyle::Double, "Double"), (BorderStyle::Triple, "Triple"),@@ -774,4 +786,55 @@ mod tests { assert!(after.iter().all(|y| (y - top).abs() > 0.01), "the header row's top edge is gone: {after:?}"); assert!(after.len() < before.len()); }+ /// Painted table borders retain their scaled dash/gap arrays; dotted previews keep their legacy pattern.+ #[test]+ fn border_preview_table_patterns_match_document_strokes() {+ let color = egui::Color32::from_rgb(13, 97, 181);+ let paint = |kind, width| {+ let mut style = TableStyleProps::default();+ let border = Border { style: kind, width, color: Some(Rgb(13, 97, 181)), space: 0.0 };+ style.parts.borders = Some(Borders { top: Some(border), ..Default::default() });+ let ctx = egui::Context::default();+ let out = ctx.run_ui(egui::RawInput::default(), |ui| {+ table_style_preview(ui, Some(&style), TableLook::default());+ });+ let segments = out+ .shapes+ .iter()+ .filter_map(|s| {+ if let egui::Shape::LineSegment { points, stroke } = &s.shape+ && stroke.color == color+ && (points[1].y - points[0].y).abs() < 0.01+ {+ Some((*points, stroke.width))+ } else {+ None+ }+ })+ .collect::<Vec<_>>();+ out.drop_without_applying_deltas();+ segments+ };+ for width in [0.5, 1.0, 2.0, 3.0] {+ for (kind, ratios) in [+ (BorderStyle::Dashed, [4.0, 4.0, 4.0, 4.0]),+ (BorderStyle::DashSmallGap, [4.0, 1.0, 4.0, 1.0]),+ (BorderStyle::DotDash, [7.0, 3.0, 3.0, 3.0]),+ (BorderStyle::Dotted, [3.0, 2.0, 3.0, 2.0]),+ ] {+ let segments = paint(kind, width);+ assert!(segments.len() > 2);+ let actual = [+ segments[0].0[1].x - segments[0].0[0].x,+ segments[1].0[0].x - segments[0].0[1].x,+ segments[1].0[1].x - segments[1].0[0].x,+ segments[2].0[0].x - segments[1].0[1].x,+ ];+ let unit = if kind == BorderStyle::Dotted { 1.0 } else { segments[0].1 };+ for (actual, ratio) in actual.into_iter().zip(ratios) {+ assert!((actual - ratio * unit).abs() < 0.01, "{kind:?}, width {width}: expected {}, got {actual}", ratio * unit);+ }+ }+ }+ } }@@ -1,6 +1,7 @@ # File-format parity with Microsoft Word -> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-26 · **Change:** trivial (DOCX parts stored under another casing keep their embedded fonts through a save, and a private save of a kept glossary escapes the attribute values it rewrites; previously trivial: the `.doc` reader logs what its copy budget leaves out, once a kind per document; importers bound hostile expansion: font names, links, ODS repeats, LaTeX wrappers, Markdown delimiters, #3692/#3713; previously trivial: repeated DOCX style IDs: save/reopen regression; previously trivial: Markdown code spans keep line-broken text literal, #3738; previously trivial: Arabic list labels: `arabicAlpha` and `arabicAbjad` draw the 28 Arabic letters (alphabetical and abjad order), doubling past the last letter; Hebrew, Hindi, Thai and Vietnamese still show decimal (`doc::section::tests::arabic_letters_count_in_both_orders`); previously trivial: localized TOC style ids read as the TOC styles, and a TOC in columns keeps its layout through Update Table, #3889; previously trivial: cu20we: outline caps; previously trivial: a relationship the markup names without the prefix is read as it wrote: an unqualified `id` on an element that carries a relationship names that relationship, and the writer keeps the attribute with the id the new package holds the part under; an ordinary `id` — a VML shape's, a drawing's — names no part; previously trivial: the reader takes the relationship ids the markup refers to from the relationship attributes of the main document it has already parsed, so a document with many relationships opens in the time its part takes, #3411; previously trivial: a table cell span from a `.json` file stays within 63 columns through Insert Column and Merge Cells, #3637; previously trivial: the file commands that change the document are checked on a protected document, the protection of a protected document needs an explicit stop, the session author can't change through `file.setAuthor` under protection (the CLI's `--author` uses the same protection check), and the post-check compares the settings and the metadata; previously trivial: a document with many content controls saves in the time the controls take, #13; previously trivial: `majorBidi`/`minorBidi` theme fonts follow the settings' theme font language, as measured in Word; previously trivial: Word signature lines are kept on save, still signable; previously trivial: Times New Roman keeps Liberation Serif under the roman-font rule; previously trivial: shape gradients and transparency, #1500; previously trivial: a folder that keeps no Unix modes, such as a NAS share mounted by GVFS, still takes a save, #3003; previously trivial: a text frame in the paragraph defaults frames nothing, #2360; previously trivial: table style band sizes written, a style without them unbanded as in Word, #3415; previously trivial: HTML export writes ruby (furigana, phonetic guides) and HTML import reads it back, #1681; previously trivial: RTF import decodes the East Asian multibyte code pages, #1653; previously trivial: PDF export: lam-alef drawn as two glyphs at one x extracts in reading order, #2310; previously trivial: native .json stores pictures and kept parts as base64, #586 follow-up; previously trivial: ODT headers and footers read from each master page, #863; previously trivial: RTF import compares heading and code formatting with the file's stylesheet; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: Word XML and web pages saved as `.doc` open by what they hold, #2853; previously trivial: a VML shape in a header cell is always placed on the page, user-checked in Word for Mac, #1775; previously trivial: `w:sym` characters keep their symbol font when the text's font changes and are written back as `w:sym`, #2036; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: two lines in one and horizontal in vertical (`w:eastAsianLayout`) kept on save; previously trivial: PDF outline targets follow leading page breaks; previously trivial: positional tabs `w:ptab` read and kept on save, #2367; previously trivial: DOCX: mixed right-to-left runs split and marked `w:rtl` with their language, #1543; previously trivial: `w:doNotTrackMoves` round-trips and turns move tracking off; previously trivial: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: DOCX glossary documents (building blocks) read, kept and written; previously trivial: cached field results keep their visible run formatting; previously trivial: cached REF results retain hyperlink destinations; previously trivial: CLI conversions can explicitly refresh fields; previously trivial: a copied equation also goes in the clipboard's MathML formats, #1297; previously trivial: a pasted HTML `<blockquote>` is an indented paragraph, not the Quote style, #1270); previously trivial: every table style part round-trips, #714; previously trivial: VML freeforms read and kept on save; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: `flowChartOr` draws its circle and cross spokes, as in Word; previously trivial: RTF: Mac OS Roman and DOS text, #1653; previously trivial: VML text boxes keep their internal margins, fit to their text and vertical alignment; hidden drawings not shown; previously trivial: PDF export draws horizontal and vertical lines inside groups, #1474; previously trivial: symbol-font text exported as Unicode, #776; previously trivial: text-box margins, Resize shape to fit text and freeforms in groups, #743; previously trivial: formatted paste from the system clipboard's HTML and RTF, #687; previously trivial: independent complex-script formatting inheritance and round-trip regression tests; previously trivial: import/export fixes for TXT, RTF, ODT, HTML and LaTeX, #433–#440; previously major: first version; every format Word reads or writes, measured from the readers and writers on origin/main) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4, plus Word for Windows' extra formats+> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-27 · **Change:** trivial (DOCX parts stored under another casing keep their embedded fonts through a save, and a private save of a kept glossary escapes the attribute values it rewrites; previously trivial: the `.doc` reader logs what its copy budget leaves out, once a kind per document; importers bound hostile expansion: font names, links, ODS repeats, LaTeX wrappers, Markdown delimiters, #3692/#3713; previously trivial: repeated DOCX style IDs: save/reopen regression; previously trivial: Markdown code spans keep line-broken text literal, #3738; previously trivial: Arabic list labels: `arabicAlpha` and `arabicAbjad` draw the 28 Arabic letters (alphabetical and abjad order), doubling past the last letter; Hebrew, Hindi, Thai and Vietnamese still show decimal (`doc::section::tests::arabic_letters_count_in_both_orders`); previously trivial: localized TOC style ids read as the TOC styles, and a TOC in columns keeps its layout through Update Table, #3889; previously trivial: cu20we: outline caps; previously trivial: a relationship the markup names without the prefix is read as it wrote: an unqualified `id` on an element that carries a relationship names that relationship, and the writer keeps the attribute with the id the new package holds the part under; an ordinary `id` — a VML shape's, a drawing's — names no part; previously trivial: the reader takes the relationship ids the markup refers to from the relationship attributes of the main document it has already parsed, so a document with many relationships opens in the time its part takes, #3411; previously trivial: a table cell span from a `.json` file stays within 63 columns through Insert Column and Merge Cells, #3637; previously trivial: the file commands that change the document are checked on a protected document, the protection of a protected document needs an explicit stop, the session author can't change through `file.setAuthor` under protection (the CLI's `--author` uses the same protection check), and the post-check compares the settings and the metadata; previously trivial: a document with many content controls saves in the time the controls take, #13; previously trivial: `majorBidi`/`minorBidi` theme fonts follow the settings' theme font language, as measured in Word; previously trivial: Word signature lines are kept on save, still signable; previously trivial: Times New Roman keeps Liberation Serif under the roman-font rule; previously trivial: shape gradients and transparency, #1500; previously trivial: a folder that keeps no Unix modes, such as a NAS share mounted by GVFS, still takes a save, #3003; previously trivial: a text frame in the paragraph defaults frames nothing, #2360; previously trivial: table style band sizes written, a style without them unbanded as in Word, #3415; previously trivial: HTML export writes ruby (furigana, phonetic guides) and HTML import reads it back, #1681; previously trivial: RTF import decodes the East Asian multibyte code pages, #1653; previously trivial: PDF export: lam-alef drawn as two glyphs at one x extracts in reading order, #2310; previously trivial: native .json stores pictures and kept parts as base64, #586 follow-up; previously trivial: ODT headers and footers read from each master page, #863; previously trivial: RTF import compares heading and code formatting with the file's stylesheet; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: Word XML and web pages saved as `.doc` open by what they hold, #2853; previously trivial: a VML shape in a header cell is always placed on the page, user-checked in Word for Mac, #1775; previously trivial: `w:sym` characters keep their symbol font when the text's font changes and are written back as `w:sym`, #2036; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: two lines in one and horizontal in vertical (`w:eastAsianLayout`) kept on save; previously trivial: PDF outline targets follow leading page breaks; previously trivial: positional tabs `w:ptab` read and kept on save, #2367; previously trivial: DOCX: mixed right-to-left runs split and marked `w:rtl` with their language, #1543; previously trivial: `w:doNotTrackMoves` round-trips and turns move tracking off; previously trivial: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: DOCX glossary documents (building blocks) read, kept and written; previously trivial: cached field results keep their visible run formatting; previously trivial: cached REF results retain hyperlink destinations; previously trivial: CLI conversions can explicitly refresh fields; previously trivial: a copied equation also goes in the clipboard's MathML formats, #1297; previously trivial: a pasted HTML `<blockquote>` is an indented paragraph, not the Quote style, #1270); previously trivial: every table style part round-trips, #714; previously trivial: VML freeforms read and kept on save; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: `flowChartOr` draws its circle and cross spokes, as in Word; previously trivial: RTF: Mac OS Roman and DOS text, #1653; previously trivial: VML text boxes keep their internal margins, fit to their text and vertical alignment; hidden drawings not shown; previously trivial: PDF export draws horizontal and vertical lines inside groups, #1474; previously trivial: symbol-font text exported as Unicode, #776; previously trivial: text-box margins, Resize shape to fit text and freeforms in groups, #743; previously trivial: formatted paste from the system clipboard's HTML and RTF, #687; previously trivial: independent complex-script formatting inheritance and round-trip regression tests; previously trivial: import/export fixes for TXT, RTF, ODT, HTML and LaTeX, #433–#440; previously major: first version; every format Word reads or writes, measured from the readers and writers on origin/main) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4, plus Word for Windows' extra formats+> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up. Every format Word opens or saves, what WordCraft does with it, and how it's tested. Fidelity is the share of a typical real-world file's content and formatting that survives (read: shows correctly;@@ -69,6 +70,8 @@ Weights are the share of a Word user's file traffic (estimate). Read/write: ✅ | `.png` page images | — | (Save as picture, Mac) | — | ✅ | — | — | `io_ext.rs` | | | `.json` document model | — | — | ✅ | ✅ | — | — | engine tests | For agents. A table cell's span is any number in the file; Insert Column and Merge Cells count it as at most 63 columns, as the `.docx` reader does (#3637) | +> 2026-10-27 · Border round trips (#4558): dashSmallGap is a distinct BorderStyle and keeps its OOXML spelling; DOCX and RTF mappings and the renderer keep the document-style distinction. Preview follow-ups do not change serialization. Existing synthetic round-trip regressions remain the format evidence; no new binary fixtures or native Word oracle is claimed.+ ## DOCX in depth Measured by grepping `crates/docx/src/read` and `src/write` for the OOXML elements (2026-10-10).@@ -258,8 +261,10 @@ Repeated DOCX style IDs use the last complete definition. The original regressio ## Revision history +> 2026-10-27 · #4558: distinct dashSmallGap and corrected paragraph/table border previews; synthetic regressions, estimates unchanged.+> > 2026-10-25 · Arabic list labels: `arabicAlpha` and `arabicAbjad` draw the 28 Arabic letters (alphabetical and abjad order), doubling past the last letter; Hebrew, Hindi, Thai and Vietnamese still show decimal (`doc::section::tests::arabic_letters_count_in_both_orders`).-+> > 2026-10-23 · cu20we: DrawingML flat, square and round line caps are imported, saved, displayed and exported to PDF; absent or unknown caps default to flat. VML end caps (including shapetype inheritance) are preserved through DOCX save. Ink and metafile stroke handling remain separate. Synthetic DOCX, raster and PDF regressions cover the change; no new native Word comparison. | Date | Change | Summary |@@ -446,3 +451,5 @@ Repeated DOCX style IDs use the last complete definition. The original regressio | 2026-10-20 | trivial | A folder that keeps no Unix modes (a NAS share mounted by GVFS) still takes a save instead of failing with "Operation not supported" (#3003) | | 2026-10-16 | trivial | Word's Table of Contents content control (`w:docPartObj`) is kept around a TOC that isn't in the heading-and-entries form (#2427) | | 2026-10-23 | trivial | `.json`: a table cell span past 63 columns no longer overflows when a column is inserted through the cell or the cell is merged (#3637) |++> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up.@@ -1,6 +1,8 @@ # Where WordCraft falls short of Word -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-22 · **Change:** trivial (View windows: several open documents and Switch Windows in the engine; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: text mini toolbar available with the right-click menu, #2959; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: tracked table/row/cell/section property changes record in WordCraft, narrowing gap 5; previously trivial: a document with many content controls saves in the time the controls take, #13; previously trivial: Format Page Numbers dialog carries Word's number formats and Continue from previous section / Start at, #1113; previously trivial: centred list labels after leading page breaks, #2964; previously trivial: fixed font inputs in four layout controls; previously trivial: a right, centre or decimal tab whose text doesn't fit, or a left tab past the right indent, goes to the next line with its text, #1840; previously trivial: Bullets and Numbering toggle off style-inherited lists at their effective level, including basedOn chains and numbered ListParagraph styles; other paragraphs and list definitions stay unchanged (related to #3459); previously trivial: Russian sorting keeps ё with е and recognises decomposed ё/й; previously trivial: #8: English dialects — en-GB, en-CA, en-AU… flag each other's spellings, #1281; previously trivial: #1: shape gradients and transparency, #1500; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: line breaking: a slash opening a word travels whole to the next line, #2963; previously trivial: recipient list search and merged-only view, #1576; previously trivial: #2 impact restated: only ink rendering and OLE editing remain; previously trivial: #2 narrowed: native ink nested in groups and drawing canvases kept on save; previously trivial: opening a DOCX no longer copies its pictures; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: automatic Asian/Latin and Asian/number spacing laid out, #2358; previously trivial: hint-reliant CJK outlines; previously trivial: numbered headings, #1793; previously trivial: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: #8 narrowed: Indonesian proofing from the installed Hunspell dictionary, #498; previously trivial: glossary/building blocks closed; previously trivial: Split Cells and Convert Text to Table follow the Word check, #2592; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717); previously trivial: #29: a copied equation also goes in the MathML clipboard formats, #1297; previously trivial: #24: the Spike, Ctrl+F3 and Ctrl+Shift+F3; previously trivial: VML freeforms read and kept on save; previously trivial: consistent preferred cell widths; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: page-break-only list paragraphs hide their labels; previously trivial: floating-table overlap ignores empty line-break lines; previously trivial: copies keep their formatting on the clipboard as HTML, #1523; previously trivial: sample-text formulas on Enter, #1067; previously trivial: #29: copied equations as MathML, OMML open as #1297, #816; previously trivial: the Font list no longer keeps every previewed font in memory, #848; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw Table and Eraser landed, #303; previously minor: beta distance restated: ~15 points, ~150–230 h; previously: first version; every known shortfall from the 2026-10-10 re-measure, ranked) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-27 · **Change:** trivial (View windows: several open documents and Switch Windows in the engine; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: text mini toolbar available with the right-click menu, #2959; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: tracked table/row/cell/section property changes record in WordCraft, narrowing gap 5; previously trivial: a document with many content controls saves in the time the controls take, #13; previously trivial: Format Page Numbers dialog carries Word's number formats and Continue from previous section / Start at, #1113; previously trivial: centred list labels after leading page breaks, #2964; previously trivial: fixed font inputs in four layout controls; previously trivial: a right, centre or decimal tab whose text doesn't fit, or a left tab past the right indent, goes to the next line with its text, #1840; previously trivial: Bullets and Numbering toggle off style-inherited lists at their effective level, including basedOn chains and numbered ListParagraph styles; other paragraphs and list definitions stay unchanged (related to #3459); previously trivial: Russian sorting keeps ё with е and recognises decomposed ё/й; previously trivial: #8: English dialects — en-GB, en-CA, en-AU… flag each other's spellings, #1281; previously trivial: #1: shape gradients and transparency, #1500; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: line breaking: a slash opening a word travels whole to the next line, #2963; previously trivial: recipient list search and merged-only view, #1576; previously trivial: #2 impact restated: only ink rendering and OLE editing remain; previously trivial: #2 narrowed: native ink nested in groups and drawing canvases kept on save; previously trivial: opening a DOCX no longer copies its pictures; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: automatic Asian/Latin and Asian/number spacing laid out, #2358; previously trivial: hint-reliant CJK outlines; previously trivial: numbered headings, #1793; previously trivial: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: #8 narrowed: Indonesian proofing from the installed Hunspell dictionary, #498; previously trivial: glossary/building blocks closed; previously trivial: Split Cells and Convert Text to Table follow the Word check, #2592; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717); previously trivial: #29: a copied equation also goes in the MathML clipboard formats, #1297; previously trivial: #24: the Spike, Ctrl+F3 and Ctrl+Shift+F3; previously trivial: VML freeforms read and kept on save; previously trivial: consistent preferred cell widths; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: page-break-only list paragraphs hide their labels; previously trivial: floating-table overlap ignores empty line-break lines; previously trivial: copies keep their formatting on the clipboard as HTML, #1523; previously trivial: sample-text formulas on Enter, #1067; previously trivial: #29: copied equations as MathML, OMML open as #1297, #816; previously trivial: the Font list no longer keeps every previewed font in memory, #848; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw Table and Eraser landed, #303; previously minor: beta distance restated: ~15 points, ~150–230 h; previously: first version; every known shortfall from the 2026-10-10 re-measure, ranked) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4+> 2026-10-27 · #4558 preview follow-up: table Dashed uses 4:4, DashSmallGap 4:1 and DotDash 7:3:3:3, scaled by the painted stroke width; the paragraph DotDash preview uses the same document pattern. Dotted previews retain their existing behavior. Painted-shape regressions cover several pen widths; readiness estimates unchanged.+> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up. > **Highlight update:** 2026-10-25 · Highlight shortcut toggles the last chosen colour off when the whole selection has it; explicit colour commands remain setters (#4085). Readiness estimates unchanged. > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-25 · **Change:** trivial (#7: Custom Document Properties dialog, #2982; previously trivial: egui 0.37 migration: the interface catalogs stay shared and pinned by `craft-i18n.rev` at `9205108cfdced5177706264038848b68b2422d2b` (27 languages, English fallback); input-method handling has new regressions but managed CI passed, and native IME acceptance plus native-speaker catalog review remain open; previously trivial: Markdown code spans keep line-broken text literal, #3738; previously trivial: small follow-ups from the field, table and AutoFormat batch, #4232; previously trivial: highlight target includes selected paragraph marks, #4085; previously trivial: full-target highlight check beyond 10,000 runs, #4085; previously trivial: Exact-spacing table contact uses the specified line height rather than paragraph-mark metrics (#3977); previously trivial: cu20we: restrict pre-spacing float origins to paragraph anchors; document cap helpers and regressions; previously trivial: a command that changes nothing is not an edit: no undo step, no unsaved changes, no relayout, and the redo stack survives it; previously minor: #8 narrowed: Spanish proofing (Spain, Mexico, Latin America, Uruguay) from the installed Hunspell dictionaries, #3360, #3553; previously trivial: gap 10: group connector rerouting preserves transformed free and unresolved endpoints under nonuniform scaling; obstacle routing still missing; readiness estimates unchanged; previously trivial: a word with no break opportunity in it no longer makes the layout quadratic, #3412; previously trivial: the ranked gap list held two rows each for #19, #20 and #21; each gap appears once now; a document with many relationships opens in the time its part takes, #3411; previously trivial: the file commands that change the document are checked on a protected document, the protection of a protected document needs an explicit stop, the session author can't change through `file.setAuthor` under protection (the CLI's `--author` uses the same protection check), and the post-check compares the settings and the metadata; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: text mini toolbar available with the right-click menu, #2959; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: tracked table/row/cell/section property changes record in WordCraft, narrowing gap 5; previously trivial: a document with many content controls saves in the time the controls take, #13; previously trivial: Format Page Numbers dialog carries Word's number formats and Continue from previous section / Start at, #1113; previously trivial: centred list labels after leading page breaks, #2964; previously trivial: fixed font inputs in four layout controls; previously trivial: a right, centre or decimal tab whose text doesn't fit, or a left tab past the right indent, goes to the next line with its text, #1840; previously trivial: Bullets and Numbering toggle off style-inherited lists at their effective level, including basedOn chains and numbered ListParagraph styles; other paragraphs and list definitions stay unchanged (related to #3459); previously trivial: Russian sorting keeps ё with е and recognises decomposed ё/й; previously trivial: #8: English dialects — en-GB, en-CA, en-AU… flag each other's spellings, #1281; previously trivial: #1: shape gradients and transparency, #1500; previously trivial: text typed into a content control takes the control's formatting; localized placeholder styles recognised; previously trivial: forms protection keeps its content controls: no inserting, Properties or Remove Content Control; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: line breaking: a slash opening a word travels whole to the next line, #2963; previously trivial: recipient list search and merged-only view, #1576; previously trivial: #2 impact restated: only ink rendering and OLE editing remain; previously trivial: #2 narrowed: native ink nested in groups and drawing canvases kept on save; previously trivial: opening a DOCX no longer copies its pictures; previously trivial: RTF export writes sections (gap 19); previously trivial: ODT export writes sections (gap 19); previously trivial: automatic Asian/Latin and Asian/number spacing laid out, #2358; previously trivial: hint-reliant CJK outlines; previously trivial: numbered headings, #1793; previously trivial: legacy outline, shadow, emboss and imprint text effects drawn, #2534; previously trivial: #8 narrowed: Indonesian proofing from the installed Hunspell dictionary, #498; previously trivial: glossary/building blocks closed; previously trivial: Split Cells and Convert Text to Table follow the Word check, #2592; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717); previously trivial: #29: a copied equation also goes in the MathML clipboard formats, #1297; previously trivial: #24: the Spike, Ctrl+F3 and Ctrl+Shift+F3; previously trivial: VML freeforms read and kept on save; previously trivial: consistent preferred cell widths; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: page-break-only list paragraphs hide their labels; previously trivial: floating-table overlap ignores empty line-break lines; previously trivial: copies keep their formatting on the clipboard as HTML, #1523; previously trivial: sample-text formulas on Enter, #1067; previously trivial: #29: copied equations as MathML, OMML open as #1297, #816; previously trivial: the Font list no longer keeps every previewed font in memory, #848; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously trivial: formatting revisions landed, #41; previously trivial: Draw Table and Eraser landed, #303; previously minor: beta distance restated: ~15 points, ~150–230 h; previously: first version; every known shortfall from the 2026-10-10 re-measure, ranked) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4 @@ -99,6 +101,8 @@ blocking gaps, and closing them lifts file formats, layout, stability and UI eno full number from ~60% to ~75%. Everything else is depth on the way to full parity. > **Three-column preset update:** 2026-10-15 · the header/footer preset uses editable table cells and screen-only editing guides (#2197). Synthetic command, undo/redo and repeated DOCX save/reopen checks cover this preset; broader template/layout gaps and readiness estimates remain unchanged.+>+> 2026-10-27 · Gap 4 follow-up (#4558): dashSmallGap has its own model/import/export/render path. Paragraph and table-style previews distinguish it from Dashed; synthetic paint regressions cover the preview corrections. Native Word comparison and broader layout gaps remain; estimates unchanged. ## By kind @@ -142,10 +146,13 @@ Small follow-ups from the 2026-10-25 field, table and AutoFormat batch (#4232): ## Revision history +> 2026-10-27 · #4558 preview follow-up: table Dashed uses 4:4, DashSmallGap 4:1 and DotDash 7:3:3:3, scaled by the painted stroke width; the paragraph DotDash preview uses the same document pattern. Dotted previews retain their existing behavior. Painted-shape regressions cover several pen widths; readiness estimates unchanged.+> 2026-10-27 · #4558: distinct dashSmallGap and corrected paragraph/table border previews; synthetic regressions, estimates unchanged.+> > 2026-10-23 · cu20we review follow-up: Only paragraph-relative box floats use the pre-spacing origin. Line-relative floats and page/margin fallbacks in cells and text boxes keep the text-top origin. Synthetic controls compare zero and 24 pt space-before across all four box contexts. New cap conversion helpers and regression tests document their contracts; readiness estimates unchanged.-+> > 2026-10-23 · cu20we: DrawingML flat, square and round line caps are imported, saved, displayed and exported to PDF; absent or unknown caps default to flat. VML end caps (including shapetype inheritance) are preserved through DOCX save. Ink and metafile stroke handling remain separate. Synthetic DOCX, raster and PDF regressions cover the change; no new native Word comparison.-+> > 2026-10-23 · cu20we: Paragraph-relative floats in headers, footers, cells and text boxes now start above effective space before; synthetic layout regressions cover all four contexts. Framed paragraphs already used the pre-spacing position. No new native Word comparison; broader object-position parity remains open. | Date | Change | Summary |@@ -356,3 +363,5 @@ Small follow-ups from the 2026-10-25 field, table and AutoFormat batch (#4232): ## Layout validation fonts Four geometry-dependent regression controls request Source Sans 3 explicitly. Platform-installed substitutes otherwise change their expected line counts. Assertions remain unchanged; renderer font metrics and substitution gaps remain open.++> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up.@@ -1,6 +1,8 @@ # Layout and pagination parity with Microsoft Word > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-27 · **Change:** trivial (continuous sections one after another go onto new pages instead of running off the page; empty marks after another empty section mark take a line each until the page is full, then stay at its bottom drawing nothing, not even a list label; an empty mark that takes no room draws no list label either; a kept-together paragraph is measured against the page it would move to, so a tall different first-page header no longer splits it, #3907; previously trivial: a justified line ending in a manual line break is stretched to the margin unless `w:doNotExpandShiftReturn` is set, #3924; previously trivial: a no-break space is as wide as a space, #4192; previously trivial: a bookmark or other zero-width marker is no line-break opportunity, #4193; previously trivial: Arabic list labels: `arabicAlpha` and `arabicAbjad` draw the 28 Arabic letters (alphabetical and abjad order), doubling past the last letter; Hebrew, Hindi, Thai and Vietnamese still show decimal (`doc::section::tests::arabic_letters_count_in_both_orders`); previously trivial: Preserve grapheme edit/wrap boundaries across independently drawn font/style pieces; Exact-spacing table contact uses the specified line height rather than paragraph-mark metrics (#3977); previously trivial: cu20we: restrict pre-spacing float origins to paragraph anchors; document cap helpers and regressions; previously trivial: cu20we: outline caps; previously trivial: cu20we: box float paragraph origin; previously trivial: group connector rerouting preserves transformed free and unresolved endpoints under nonuniform scaling; readiness estimates unchanged; previously trivial: a word with no break opportunity in it no longer makes the layout quadratic, #3412; previously trivial: an empty paragraph whose mark is hidden shows nothing, not even its list number, which is still counted, #3982; previously trivial: a Thai run with Latin finds one installed font covering it all on Linux too, #1549; previously trivial: symbol fonts keep their line height without the font; previously trivial: an equation-array row without `&` is centred, #2617; previously trivial: a superscript or subscript sizes its line at the full font size, without its raise or drop, as Word does; previously trivial: an object dragged near the bottom of a page lands where it is dropped, #3169; previously trivial: centred list labels after leading page breaks, #2964; previously trivial: fixed font inputs in four layout controls; previously trivial: justified lines shrink their spaces by Word's measured limits; previously trivial: a right, centre or decimal tab whose text doesn't fit, or a left tab past the right indent, goes to the next line with its text, #1840; previously trivial: a click below a floating table goes to the text beside or after it, not to a cell of its last row, #2038; previously trivial: shapes drawn with their gradients and transparency, #1500; previously trivial: paragraphs above a float's anchor wrap around it, also when that pushes the anchor onto the next page, #2048; previously trivial: triple borders draw three lines, #1740; previously trivial: the caret, clicks and selection edges fall between the letters of a ligature, #1974; previously trivial: a word after a slash wraps whole, like Word, #2963; previously trivial: VML header-cell floats always on the page, user-checked in Word for Mac, #1775; previously trivial: an at-least row with no room for its minimum starts the next page whole, #1742; previously trivial: AutoFit donors lose equal widths down to their content minima; previously trivial: automatic space between Asian text and Latin text or digits, #2358; previously trivial: hint-reliant CJK outlines; previously trivial: positional tabs go to the margins or indents, #2367; previously trivial: field results with right-to-left text read right to left, #1670; previously trivial: a list bullet no installed font can draw shows the level's default bullet, #1683; previously trivial: a missing Thai font is drawn in one Thai face for the whole run, #1549; previously trivial: the caret after spaces hanging past the margin stays at the margin, #2146; previously trivial: covered black-circle fallback before UI sans; previously trivial: resolved split-cell continuation top insets; previously trivial: Symbol PCL6 alias uses Symbol encoding; previously trivial: exact full font names select their installed face; previously trivial: Arial Unicode MS uses proportional fallbacks; previously trivial: DrawingML outline dashes, including zero-width paths; previously trivial: TOCs include table-cell headings and retain full targets; previously trivial: kept table rows follow the next row; previously trivial: consistent cell widths override a stale table grid; previously trivial: multi-paragraph field instructions no longer add blank lines; previously trivial: page-break-only list paragraphs hide their labels; previously trivial: floating-table overlap ignores empty line-break lines; previously trivial: paragraph spacing adds up when the document turns HTML auto spacing off; previously trivial: an inherited footer sizes its percentage tables by its own section; previously trivial: an empty section mark stays on a full page; previously trivial: a fitting row with less room than its minimum height moves on whole; oversized rows still split; previously trivial: text past an exact-height row is cut off; previously trivial: a list number stays with text after a leading page break; previously trivial: a bookmark after a page break takes no line; previously trivial: a page break followed by a page break before or a next-page section starts one page; previously trivial: All Caps and Small Caps draw ß as SS, #1581; previously trivial: justified vertical page alignment, #1320; previously trivial: page numbers restart at 0; previously trivial: a list label moves with its first line when the paragraph is centred or end-aligned (#1159); previously trivial: PAGE fields in a paragraph split across pages show the page they are on, #1352; previously trivial: a dragged floating object anchors in the column it lands in, #884; previously trivial: a paragraph ending on a page with footnotes keeps its space after above the separator, #1116; previously trivial: symbol-font text drawn as Unicode symbols, #776; previously trivial: large-table scrolling measured and fixed, #811; previously trivial: text boxes use their own margins; Resize shape to fit text never cuts text, #743; previously trivial: complex-script shaping and Myanmar line breaking, #604; previously trivial: body page totals, table-cell footnotes and bookmark link pages fixed, #450 #451 #455; previously major: first version; line breaking, pagination and object placement checked against Word's behaviour from the layout source on origin/main) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4+> 2026-10-27 · #4558 preview follow-up: table Dashed uses 4:4, DashSmallGap 4:1 and DotDash 7:3:3:3, scaled by the painted stroke width; the paragraph DotDash preview uses the same document pattern. Dotted previews retain their existing behavior. Painted-shape regressions cover several pen widths; readiness estimates unchanged.+> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up. A document only "opens correctly" if its pages break where Word breaks them: the same lines, the same page count, footnotes and pictures on the same pages. This checklist covers line breaking,@@ -89,6 +91,8 @@ Exact line spacing keeps the run font baseline around tall equations; automatic | Fields: PAGE, NUMPAGES, SECTIONPAGES, TOC page numbers, PAGEREF in headers and footers | ✅ | #52; totals in the body need a second pass once the page count is known (#451); SECTIONPAGES includes shared continuous-section start pages; a PAGE field in a paragraph that runs onto a later page (a page break inside it, or a natural split) shows that page's number, the rest of the paragraph broken again for the wider result (#1352); PAGEREF in headers and footers shows its bookmark's page, filled in after pagination like their totals (#1477); in the body it keeps its result until fields are updated | — | | Page-by-page comparison harness against Word | ❌ | Run Word locally on our own synthetic documents, export PDF, compare line breaks; Word output stays under `plan/` (never committed) | 8–12 | +> 2026-10-27 · Border dash update (#4558): dashSmallGap is kept separately from Dashed. Document rendering uses four-width dashes with one-width gaps; paragraph Dashed previews use equal dash/gap lengths. The table preview uses width-scaled Dashed (4:4), dashSmallGap (4:1) and DotDash (7:3:3:3) patterns; paragraph DotDash uses the document pattern too. Dotted previews retain their prior behavior. Synthetic coverage only; estimates unchanged.+ ## Missing black-circle glyphs When the requested face lacks U+25CF (●), try installed Times New Roman before the UI sans@@ -256,12 +260,15 @@ layout suite are pending; this is not a new Word/native-IME acceptance claim. ## Revision history +> 2026-10-27 · #4558 preview follow-up: table Dashed uses 4:4, DashSmallGap 4:1 and DotDash 7:3:3:3, scaled by the painted stroke width; the paragraph DotDash preview uses the same document pattern. Dotted previews retain their existing behavior. Painted-shape regressions cover several pen widths; readiness estimates unchanged.+> 2026-10-27 · #4558: distinct dashSmallGap and corrected paragraph/table border previews; synthetic regressions, estimates unchanged.+> > 2026-10-25 · Arabic list labels: `arabicAlpha` and `arabicAbjad` draw the 28 Arabic letters (alphabetical and abjad order), doubling past the last letter; Hebrew, Hindi, Thai and Vietnamese still show decimal (`doc::section::tests::arabic_letters_count_in_both_orders`).-+> > 2026-10-23 · cu20we review follow-up: Only paragraph-relative box floats use the pre-spacing origin. Line-relative floats and page/margin fallbacks in cells and text boxes keep the text-top origin. Synthetic controls compare zero and 24 pt space-before across all four box contexts. New cap conversion helpers and regression tests document their contracts; readiness estimates unchanged.-+> > 2026-10-23 · cu20we: DrawingML flat, square and round line caps are imported, saved, displayed and exported to PDF; absent or unknown caps default to flat. VML end caps (including shapetype inheritance) are preserved through DOCX save. Ink and metafile stroke handling remain separate. Synthetic DOCX, raster and PDF regressions cover the change; no new native Word comparison.-+> > 2026-10-23 · cu20we: Paragraph-relative floats in headers, footers, table cells and text boxes start above effective paragraph space before, consistent with the body layout path (cu20we). Synthetic regressions cover all four contexts; native Word comparison remains pending. | Date | Change | Summary |@@ -428,3 +435,5 @@ and balloon layout while supplying explicit cell identity at every box call. The probes above are historical; this rebase has no new native or other-platform measurement. Repeated table-cell control, 12 October 2026: four same-style contextual paragraphs with 6 pt before/after and exactly 24 pt lines retain zero extra gap at every boundary. The body control uses the same fixture. This is an original specification-based regression; no new native Word table comparison was run.++> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up.@@ -1,6 +1,8 @@ # UI parity with Microsoft Word -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-25 · **Change:** trivial (Custom Document Properties dialog from File › Info › Properties › Advanced Properties…, #2982; previously trivial: View › Window › New Window opens another window on the document, each with its own caret and view; previously trivial: mail merge: First Record, Last Record and a record number box in Preview Results; Finish & Merge asks which records to merge or print, #3028; previously trivial: selection bar for right-to-left paragraphs and table rows; previously trivial: read only and comments-only protection grey out edits; previously trivial: the Font dialog previews "NaN" or "inf" in the Size box at 12 pt, #3663; previously trivial: File › Options disables the User name field while Restrict Editing is active; previously trivial: while editing a header or footer, a click in the other one edits it there without scrolling; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: Insert Table of Figures dialog: any caption label, #3013; previously trivial: Home › Underline drop-down shows its lines, #2738; previously trivial: the text context menu includes the formatting mini toolbar, #2959; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: the scrollbar page tip stays on one line as the page number grows, #3341; previously trivial: File › Home and New: templates and recent documents are buttons named for screen readers, #3176; previously trivial: forms protection greys out the Developer tab's control buttons and Properties; previously trivial: AltGr doesn't open KeyTips, #2388; previously trivial: closing the header or footer puts the caret back where it was in the body, #3331; previously trivial: Format Page Numbers dialog: number format and Continue from previous section / Start at, #1113; previously trivial: inline pictures drag to a dashed insertion cursor and stay inline, #2233, #2234; previously trivial: Save Changes prompt: a text file saved over itself closes, #2376; previously trivial: the equation being edited is framed as in Word: an outline as tall as its line, a grip, an options strip that opens its menu, and its current argument shaded; previously trivial: the table handles show while the caret is in the table, #2428; previously trivial: legacy menu keys, #1697; previously trivial: Shape Fill › Gradient and the Format Shape pane, #1500; previously trivial: Focus fills the screen, and Full Screen View shows the pages alone, #1678; previously trivial: the text pointer over the page is drawn black or white on Windows, #1746; previously trivial: a click in the header/footer band from the body no longer scrolls to the body text, #2103; previously trivial: File › Recover follows the app theme, #3243; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: dragging the vertical scrollbar names the page at the top of the window, #2551; previously trivial: Add Font imports every selected font file, #1789); previously trivial (File › Close keeps the window, #1712; previously trivial: the Spike: Ctrl+F3 and Ctrl+Shift+F3; previously trivial: Ctrl+wheel zoom no longer scrolls the document, #1743; previously trivial: a mouse drag on a table leaves the view where it is, #1738; previously trivial: numbered headings, #1793; previously trivial: Navigation Find exposes Results, #2096; previously trivial: the tab strip never draws tabs over Comments / Editing / Share, #2026; previously trivial: Columns on selected text, #2024; previously trivial: Different First Page headers reachable from page 1, #2826; previously trivial: a copied equation also goes in the clipboard's MathML formats, #1297; previously trivial: Read Mode keeps the keyboard, shows whole columns and keeps text clear of the page-turn bar, #1772); previously trivial: font list entries of tall-ascent fonts sit in their row, not cut off, #2570); previously trivial: Split Cells and Convert Text to Table dialogs follow Word's merged-cell limits and Initial column width, #2592; previously trivial: a new source's Tag is made like Word's, three letters of the author and two digits of the year with a number added when taken, and an edit keeps the Tag, #2094; previously trivial: Web Layout text fills the window width, #1876; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717)); previously trivial: comment balloons readable in the dark theme, #2045; previously trivial: Recently Used Fonts section at the top of the font list, #2068; previously trivial: web preferences kept between visits, #2132; previously trivial: dialog close control: a Windows-style box at the title bar's right end, the whole box clickable, red on hover, #1885); previously trivial (Modify Table Style formats every table style part, #714); previously trivial: a click on the ribbon chrome hands the keyboard to the page in the same frame, #1093 follow-up; previously trivial: Page Setup vertical alignment, #1320; previously trivial: the app opens on the Home tab every launch, as in Word; previously trivial: no document behind the Start screen, #1129; previously trivial: equation pictures share a few textures, #1002; previously trivial: selection bar in the left margin, #856; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously major: first version; ribbon, dialogs, shortcuts and on-canvas interaction measured from `crates/ui-egui` and the command registry) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-27 · **Change:** trivial (Custom Document Properties dialog from File › Info › Properties › Advanced Properties…, #2982; previously trivial: View › Window › New Window opens another window on the document, each with its own caret and view; previously trivial: mail merge: First Record, Last Record and a record number box in Preview Results; Finish & Merge asks which records to merge or print, #3028; previously trivial: selection bar for right-to-left paragraphs and table rows; previously trivial: read only and comments-only protection grey out edits; previously trivial: the Font dialog previews "NaN" or "inf" in the Size box at 12 pt, #3663; previously trivial: File › Options disables the User name field while Restrict Editing is active; previously trivial: while editing a header or footer, a click in the other one edits it there without scrolling; previously trivial: explicit documents keep the editor when recovery discovery finishes; readable recovery controls; previously trivial: Insert Table of Figures dialog: any caption label, #3013; previously trivial: Home › Underline drop-down shows its lines, #2738; previously trivial: the text context menu includes the formatting mini toolbar, #2959; previously trivial: personal templates in File › New and Save as Word Template, #2852; previously trivial: the scrollbar page tip stays on one line as the page number grows, #3341; previously trivial: File › Home and New: templates and recent documents are buttons named for screen readers, #3176; previously trivial: forms protection greys out the Developer tab's control buttons and Properties; previously trivial: AltGr doesn't open KeyTips, #2388; previously trivial: closing the header or footer puts the caret back where it was in the body, #3331; previously trivial: Format Page Numbers dialog: number format and Continue from previous section / Start at, #1113; previously trivial: inline pictures drag to a dashed insertion cursor and stay inline, #2233, #2234; previously trivial: Save Changes prompt: a text file saved over itself closes, #2376; previously trivial: the equation being edited is framed as in Word: an outline as tall as its line, a grip, an options strip that opens its menu, and its current argument shaded; previously trivial: the table handles show while the caret is in the table, #2428; previously trivial: legacy menu keys, #1697; previously trivial: Shape Fill › Gradient and the Format Shape pane, #1500; previously trivial: Focus fills the screen, and Full Screen View shows the pages alone, #1678; previously trivial: the text pointer over the page is drawn black or white on Windows, #1746; previously trivial: a click in the header/footer band from the body no longer scrolls to the body text, #2103; previously trivial: File › Recover follows the app theme, #3243; previously trivial: long navigation headings wrap onto further lines within the pane, #3015; previously trivial: clearing a no-match font query keeps the recent heading visible, #2068; previously trivial: dragging the vertical scrollbar names the page at the top of the window, #2551; previously trivial: Add Font imports every selected font file, #1789); previously trivial (File › Close keeps the window, #1712; previously trivial: the Spike: Ctrl+F3 and Ctrl+Shift+F3; previously trivial: Ctrl+wheel zoom no longer scrolls the document, #1743; previously trivial: a mouse drag on a table leaves the view where it is, #1738; previously trivial: numbered headings, #1793; previously trivial: Navigation Find exposes Results, #2096; previously trivial: the tab strip never draws tabs over Comments / Editing / Share, #2026; previously trivial: Columns on selected text, #2024; previously trivial: Different First Page headers reachable from page 1, #2826; previously trivial: a copied equation also goes in the clipboard's MathML formats, #1297; previously trivial: Read Mode keeps the keyboard, shows whole columns and keeps text clear of the page-turn bar, #1772); previously trivial: font list entries of tall-ascent fonts sit in their row, not cut off, #2570); previously trivial: Split Cells and Convert Text to Table dialogs follow Word's merged-cell limits and Initial column width, #2592; previously trivial: a new source's Tag is made like Word's, three letters of the author and two digits of the year with a number added when taken, and an edit keeps the Tag, #2094; previously trivial: Web Layout text fills the window width, #1876; previously trivial: Language dialog keeps inherited proofing language and no-proof choices (#2717)); previously trivial: comment balloons readable in the dark theme, #2045; previously trivial: Recently Used Fonts section at the top of the font list, #2068; previously trivial: web preferences kept between visits, #2132; previously trivial: dialog close control: a Windows-style box at the title bar's right end, the whole box clickable, red on hover, #1885); previously trivial (Modify Table Style formats every table style part, #714); previously trivial: a click on the ribbon chrome hands the keyboard to the page in the same frame, #1093 follow-up; previously trivial: Page Setup vertical alignment, #1320; previously trivial: the app opens on the Home tab every launch, as in Word; previously trivial: no document behind the Start screen, #1129; previously trivial: equation pictures share a few textures, #1002; previously trivial: selection bar in the left margin, #856; previously trivial: table column and row markers on the rulers, #700; previously trivial: table borders and the resize handle drag on the page, #217; previously major: first version; ribbon, dialogs, shortcuts and on-canvas interaction measured from `crates/ui-egui` and the command registry) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4+> 2026-10-27 · #4558 preview follow-up: table Dashed uses 4:4, DashSmallGap 4:1 and DotDash 7:3:3:3, scaled by the painted stroke width; the paragraph DotDash preview uses the same document pattern. Dotted previews retain their existing behavior. Painted-shape regressions cover several pen widths; readiness estimates unchanged.+> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up. Recovery discovery no longer interrupts an explicitly created or opened document. Older copies remain in File › Recover, whose buttons use the interface palette. See [local recovery](recovery.md). @@ -68,6 +70,8 @@ Save Changes exposes the document-specific question as an alert-dialog name and The Language dialog reads effective character formatting, including document defaults, paragraph styles and character styles. Accepting it unchanged keeps inherited language and no-proof choices (#2717); explicit direct formatting still takes precedence. Other proofing and Windows-specific reports remain separate. +> 2026-10-27 · Border preview update (#4558): the Borders dialog previews Dashed with equal four-width dashes and gaps. The live table-style preview uses a smaller-gap pattern for dashSmallGap instead of sharing Dashed. Table Dashed and DotDash now have distinct patterns matching the document, scaled by the pen width; paragraph DotDash also matches. Painted-shape regressions verify all three dash styles over multiple widths; Dotted behavior is unchanged. Estimates unchanged.+ ## Find and Replace: regular expressions (#4177) With **Regular expressions** on (Search Options), Replace with expands capture groups: `$1`…`$n`, `${n}`, `${name}` and `$name` (the longest run of letters, digits and `_`), `$0` / `${0}` (the whole match), and `\1`…`\9` as in wildcard Replace; `$$` is a dollar sign, `\t` a tab, `\\` a backslash, `\$` and `\^` a `$` or `^` as typed, and `\n` a paragraph mark, which splits the paragraph as `^p` does (Replace All stays one undo step). Word's `^&`, `^p`, `^t`, `^c` and the other `^` codes work there too (with Special characters off, only the `^` codes are taken literally). A group that doesn't exist, didn't take part in the match or is out of range expands to nothing; a `$` that starts no group, an unclosed `${`, and other `\` escapes stay as written. Plain and wildcard Replace are unchanged. Word has no regular-expression mode; this follows the Rust `regex` crate's Replace syntax.@@ -80,6 +84,9 @@ Footnote and endnote editing keeps body and note text at normal opacity, on ligh ## Revision history +> 2026-10-27 · #4558 preview follow-up: table Dashed uses 4:4, DashSmallGap 4:1 and DotDash 7:3:3:3, scaled by the painted stroke width; the paragraph DotDash preview uses the same document pattern. Dotted previews retain their existing behavior. Painted-shape regressions cover several pen widths; readiness estimates unchanged.+> 2026-10-27 · #4558: distinct dashSmallGap and corrected paragraph/table border previews; synthetic regressions, estimates unchanged.+ | Date | Change | Summary | |---|---|---| | 2026-10-22 | trivial | View › Window › New Window opens another window on the document, focused and cascaded; two windows on one document are titled `Name:1` and `Name:2` (one window: the plain name). Each window keeps its own selection, scroll position, zoom, view mode, ruler and panes; the text, undo history, unsaved state and file are the document's, so an edit or Undo in either window shows in both, and a caret in text the other window deleted moves to the nearest place left. Closing one of a document's windows asks nothing; closing its last asks about unsaved changes, and quitting asks once per document. Switch Windows lists every window. The web app keeps one window |@@ -313,3 +320,5 @@ labels unambiguous. Those extra-number assignments have not been compared with W | 2026-10-20 | trivial | File › Home and New: each template (thumbnail and caption) and each recent document is one button named by its caption or file name (with the path when two recent file names are the same), so a screen reader announces it instead of unnamed text (#3176) | | 2026-10-23 | trivial | Font dialog: "NaN" or "inf" in the Size box previews the text at 12 pt instead of stopping the app while drawing the preview (#3663) | | 2026-10-25 | trivial | Customize Ribbon, Quick Access Toolbar and Customize Keyboard pickers: filter-as-you-type command search across all commands (label or id, case-insensitive); clearing restores the category scope (#1845) |++> 2026-10-27 · #4558 follow-up: document border token conversion, stroke selection and PDF dash output; extend synthetic coverage of small-gap PDF output, the paragraph preview ratio and RTF round trips. Integrated current main while retaining both progress histories; no production behavior or readiness estimate changes in this follow-up.