Add paperspec correct, check math forms and datasets, and give the tools public names

The work the other paper tools planned for paperspec (paperdesk PLAN M5.4,
paperform PLAN 4.2):

- paperspec correct and paperspec.revision apply proposed corrections to a
  package, folder or zip, and write it only once it validates.
- doc.math.form is checked: label and style commands always, the form's own
  spelling when papermath is installed or forms= is passed.
- paperspec.datasets and seven doc.dataset.* rules check a package's datasets.
- fixtures/invalid gains suspect-witness and math-form-label (33 in all).
- Canonical JSON reads numbers as doubles, so 1e20 round-trips.
- The registries and the JSON-LD context ship in the wheel.
- Public names for what paperdesk and paperform imported as private ones,
  with the old names kept as aliases.
- The text and lossy-projection functions are about three times faster
  through the gate, tested equal to the old code on every code point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013XwDhn4LkrKQfw4ArDEr2E
This commit is contained in:
alexmandClaude committed 2026-10-20 22:10:17 -04:00
1 parent 8c07dd7c15
commit 4fb8b4f5a7
70 files changed
+4470 -270

No files matched your search

+1
View File
@@ -150,4 +150,5 @@ A consumer MAY rely on these properties of a source that carries `form`:
A producer writes `form` only on a source it has spelled in that form.
A correction that changes such a source writes the new source in the form too, since the gate does not implement the form and cannot check it.
A validator that implements the form reports a source with `form` that is not its own canonical spelling as `doc.math.form`.
One that does not can still report a `scienting-math/1` source that holds `\tag`, `\label`, `\nonumber`, `\notag`, a style command such as `\displaystyle`, `\dfrac` or `\tfrac`, which the form never holds ([9.4](09-figures-tables-equations.md#94-the-math-form)); the reference validator does that, and checks every source with papermath when it is installed.
`form` enters no content value, so adding it to a source already in the form changes no hash, ID or anchor, while respelling a source in the form changes them as any edit of the source does ([5.2](05-hashes.md#52-own-content)).