ekp-alignment selects the paragraph alignment. Non-justify modes keep inter-word glue rigid (arrays and class params zeroed at para build) while the DP gains a per-line flexibility ekp-ragged-stretch-pixel (default ≈2 em): badness = 100·(shortfall/R)³, so Knuth-Plass still globally minimizes raggedness — this is \raggedright with a finite \rightskip stretch, not first-fit. Rendering distributes each line's leftover by mode: trailing (ragged-right), split evenly (center), leading (ragged-left); the spacers are ekp-glue-marked, so buffer roundtrips stay exact. C module 1.3: set-penalties gains an extra-stretch scalar (reset when omitted); max_w widens by it, so the prefix-based flexibility picks it up automatically. Cache keys include alignment and R. Tests: 56 ERT green incl. per-mode invariants (fit, rigid interior glue, flush edges, centered leftover ±1px) and four-mode C parity; fuzz 300/300. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| ekp-bench.el | ||
| ekp-demo.el | ||
| ekp-fuzz.el | ||
| ekp-region-tests.el | ||
| ekp-tests.el | ||
| run-tests.sh | ||
| text-de_DE.txt | ||
| text-en_US.txt | ||
| text-fr.txt | ||
| text-zh2-en_US.txt | ||
| text-zh-en_US.txt | ||
| text-zh.txt | ||