1# Native paragraph formatting controls
2
3`tools/native/paragraph-formatting.ps1` authored one page, "Paragraph
4formatting", with six paragraphs of mixed bold/italic/plain runs: native
5defaults, explicit zero values, centred spacing, right-aligned RTL, a named
6style (`h1`, Georgia 18 bold with spacing) inherited, and the same style with
7paragraph 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
10inherited `spaceBefore="8"`/`spaceAfter="4"` as 288/144 in the read, while
11explicit 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
15alignment, zero space before, 2 pt after and 16 pt line spacing, with runs,
16direction and quick styles untouched. `cold/` is its fresh OneNote 2010 read:
17each paragraph is centred with `spaceAfter="2.0"` and `spaceBetween="16.0"`,
18the zero space before is omitted, `RTL="true"` survives on the right-aligned
19case, `quickStyleIndex` and the bold/italic runs match `before/read`, and
20`tools/verify-document.py` finds no differences. `tools/test_paragraph_format.py`
21checks these without a VM.
22
23Regenerate the candidate with `ONESTORE_PARAGRAPH_FORMAT_EXPORT` set to a new
24absolute directory while running
25`paragraph_properties_preserve_native_mixed_runs_and_shared_styles`, then
26cold-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
29tools/native/paragraph-formatting.ps1 --expected-pages 2 --collect-notebook`.