prf:proof defaults to enumerated: false (amsthm convention)#57
Merged
Conversation
In LaTeX with amsthm, \begin{proof} is unnumbered: the proof is
conceptually pinned to the theorem it proves. The previous default
assigned every bare proof a phantom enumerator (present in JSON and
xref metadata, never displayed in HTML) that silently consumed a
counter slot. Theorem-like kinds are unchanged; `enumerated: true`
opts a proof back in, and `nonumber` behaves as before.
Fixes #35
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adjusts myst-ext-proof so the bare proof directive (proof / prf:proof) defaults to not being enumerated, aligning with LaTeX amsthm and avoiding “phantom” counter consumption in metadata.
Changes:
- Update
proofDirectiveto defaultenumeratedbased on whether the directive is a bare proof kind. - Update/add tests to pin default enumeration behavior per directive kind and ensure opt-in/legacy flags still work.
- Update documentation and add a changeset entry describing the behavior change.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/myst-ext-proof/src/proof.ts | Changes default enumerated behavior for proof / prf:proof while preserving theorem-like defaults and nonumber precedence. |
| packages/myst-ext-proof/tests/proof.spec.ts | Updates existing expectation and adds parameterized coverage for default/opt-in/legacy behaviors. |
| docs/proofs-and-theorems.md | Documents the new default enumeration exception for proofs. |
| .changeset/proof-unnumbered.md | Adds a patch changeset noting the default enumeration change and opt-in path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mmcky
added a commit
that referenced
this pull request
Jun 12, 2026
…res (#58) VERSION.yml: bumps qe_version to qe-v8; adds merged features 10 (code-numbering, 7385451) and 11 (proof-unnumbered, 75e07a9); sets tag: qe-v8 on features 8-11 (fancy-lists, cite-code-span, code-numbering, proof-unnumbered). UPSTREAM-PRS.yml: appends the code-numbering squash to the book-mode-with-section-scope bundle (its scope half builds on the bundle's AUTO_PREFIX_KINDS machinery); adds a standalone proof-unnumbered candidate (verified byte-identical to upstream before the change, clean cherry-pick). After squash-merging this PR, tag the resulting main commit: git tag qe-v8 <sha> -m "qe-v8: fancy lists, cite code-span guard, code numbering, unnumbered proofs" git push origin qe-v8 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #35
What
The bare
proof/prf:proofdirective now defaults toenumerated: false, matching the LaTeXamsthmconvention:\begin{proof}is unnumbered because a proof is conceptually pinned to the theorem it proves.The previous default produced "phantom" numbering — every
:::{prf:proof}block got an enumerator (e.g.9.2.1) present in MyST's JSON and xref metadata but never displayed in rendered HTML, silently consuming a counter slot per proof.Scope
proofandprf:proof); all theorem-like kinds (prf:theorem,prf:lemma,prf:algorithm, …) keepenumerated: true.:enumerated: trueopts a proof back into numbering; the legacy:nonumber:flag behaves exactly as before (it takes precedence either way).proofs-and-theorems.mdupdated to state the exception.Testing
proof/prf:proof→ false;prf:theorem/prf:lemma/prf:algorithm→ true), theenumerated: trueopt-in, andnonumberon theorem kinds; the existing fixture'senumerated: trueexpectation updated tofalse.fetch failed, unrelated; see CI: flaky tests in test workflow (Jupyter timing + live DOI network) #29).🤖 Generated with Claude Code