| 1 | # Native paragraph formatting controls |
| 2 | |
| 3 | `tools/native/paragraph-formatting.ps1` authored one page, "Paragraph |
| 4 | formatting", with six paragraphs of mixed bold/italic/plain runs: native |
| 5 | defaults, explicit zero values, centred spacing, right-aligned RTL, a named |
| 6 | style (`h1`, Georgia 18 bold with spacing) inherited, and the same style with |
| 7 | paragraph overrides. `before/` holds the authored notebook and its native read |
| 8 | (`before/read`, captured with `--expected-pages 2 --collect-notebook`; |
| 9 | `before-capture/` retains that run's records). OneNote reports the style's |
| 10 | inherited `spaceBefore="8"`/`spaceAfter="4"` as 288/144 in the read, while |
| 11 | explicit paragraph values read back in points. |
| 12 | |
| 13 | `candidate/` is the page writer's output for the model edit in |
| 14 | `crates/onestore/tests/paragraph_formatting.rs`: every paragraph set to centre |
| 15 | alignment, zero space before, 2 pt after and 16 pt line spacing, with runs, |
| 16 | direction and quick styles untouched. `cold/` is its fresh OneNote 2010 read: |
| 17 | each paragraph is centred with `spaceAfter="2.0"` and `spaceBetween="16.0"`, |
| 18 | the zero space before is omitted, `RTL="true"` survives on the right-aligned |
| 19 | case, `quickStyleIndex` and the bold/italic runs match `before/read`, and |
| 20 | `tools/verify-document.py` finds no differences. `tools/test_paragraph_format.py` |
| 21 | checks these without a VM. |
| 22 | |
| 23 | Regenerate the candidate with `ONESTORE_PARAGRAPH_FORMAT_EXPORT` set to a new |
| 24 | absolute directory while running |
| 25 | `paragraph_properties_preserve_native_mixed_runs_and_shared_styles`, then |
| 26 | cold-open it with `tools/native_runner.py OUTPUT COLD --expected-pages 2 |
| 27 | --collect-notebook`. Regenerate `before/` by running the runner on |
| 28 | `corpus/create-notebook` style input with `--author |
| 29 | tools/native/paragraph-formatting.ps1 --expected-pages 2 --collect-notebook`. |