Skip to content

prf:proof defaults to enumerated: false (amsthm convention)#57

Merged
mmcky merged 3 commits into
mainfrom
feature/proof-unnumbered
Jun 12, 2026
Merged

prf:proof defaults to enumerated: false (amsthm convention)#57
mmcky merged 3 commits into
mainfrom
feature/proof-unnumbered

Conversation

@mmcky

@mmcky mmcky commented Jun 12, 2026

Copy link
Copy Markdown

Fixes #35

What

The bare proof / prf:proof directive now defaults to enumerated: false, matching the LaTeX amsthm convention: \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

  • Only the bare proof name changes (proof and prf:proof); all theorem-like kinds (prf:theorem, prf:lemma, prf:algorithm, …) keep enumerated: true.
  • :enumerated: true opts a proof back into numbering; the legacy :nonumber: flag behaves exactly as before (it takes precedence either way).
  • Docs sentence in proofs-and-theorems.md updated to state the exception.

Testing

  • New parametrized tests pin the default per kind (proof/prf:proof → false; prf:theorem/prf:lemma/prf:algorithm → true), the enumerated: true opt-in, and nonumber on theorem kinds; the existing fixture's enumerated: true expectation updated to false.
  • Full monorepo build + test pass (one local rerun needed for the known-flaky Jupyter execution e2e tests — fetch failed, unrelated; see CI: flaky tests in test workflow (Jupyter timing + live DOI network) #29).

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 12, 2026 02:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 proofDirective to default enumerated based 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.

Comment thread docs/proofs-and-theorems.md Outdated
@mmcky mmcky merged commit 75e07a9 into main Jun 12, 2026
6 checks passed
@mmcky mmcky deleted the feature/proof-unnumbered branch June 12, 2026 03:12
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prf:proof: default enumerated: false to match LaTeX amsthm \begin{proof} convention

2 participants