Skip to content

Say that Latexise output is parsed, in another repository (#822) - #823

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
docs/latexise-cross-repo-contract
Aug 8, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
docs/latexise-cross-repo-contract

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Closes #822.

AGENTS.md said:

Latexise is under no such obligation — nothing parses LaTeX.

That is not true. CSharpMath.Evaluation reads LaTeX back into an Entity, and states the contract in its own source:

// CSharpMath must handle all LaTeX coming from AngouriMath or a bug is present!

So the obligation exists. The correction says so, and says the thing that makes it worth knowing: it is weaker than Stringize's, not stronger. StringizeRoundTripTest fails in this repository the moment the printed form stops parsing; a LaTeX break surfaces as somebody else's bug report months later, because the test that would catch it lives in a repository we do not control. Anyone changing what Latexise emits needs to check it against CSharpMath and open a PR there too.

Docs only — no code, no tests affected.

AGENTS.md said Latexise was under no round-trip obligation because nothing parses
LaTeX. CSharpMath.Evaluation does, into an Entity, and states the contract in its
own source: "CSharpMath must handle all LaTeX coming from AngouriMath or a bug is
present!"

So the obligation exists and is weaker than Stringize's rather than absent:
StringizeRoundTripTest fails here the moment the printed form stops parsing, while
a LaTeX break surfaces as somebody else's bug report months later. Anyone changing
Latexise output needs to know that, and to open a PR against CSharpMath too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Rafael-SOWNet
Rafael-SOWNet merged commit 61de353 into master Aug 8, 2026
24 checks passed
Rafael-SOWNet added a commit that referenced this pull request Aug 9, 2026
The same false claim #823 corrected in AGENTS.md -- "nothing parses LaTeX" -- was
in Syntax.md as well, and I fixed only the one I had been pointed at.
CSharpMath.Evaluation reads LaTeX back into an Entity and states the contract in
its own source, so the sentence was wrong in both places.

The point worth keeping is the one the correction adds: Latexise is still free to
use \frac and the rest, but a change to what it emits can break a downstream
project and nothing here will catch it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Rafael-SOWNet added a commit that referenced this pull request Aug 9, 2026
* Bring Syntax.md up to date with the functions that now exist

Syntax.md still listed floor, ceil, ceiling, round, min, max and gcd under
"Refused by name". Six of them have existed since #827 and #828, so the document
was telling a caller the opposite of what the parser does -- and AGENTS.md is
explicit that a stale one of these is worse than none. I changed the grammar twice
and did not update it either time.

The entries say what each does rather than only that it parses, since the
conventions are the part a caller cannot guess: rounding toward the infinities
rather than zero, round going to the nearest even on a tie and so not being
floor(x + 1/2), the componentwise reading of a complex argument, min and max
leaving an unordered pair alone, and gcd covering rationals.

Every claim in the new text was checked against a build rather than written from
memory, including that the four still-refused names still raise and that re and im
are still read as products.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Say in Syntax.md too that LaTeX output is parsed elsewhere

The same false claim #823 corrected in AGENTS.md -- "nothing parses LaTeX" -- was
in Syntax.md as well, and I fixed only the one I had been pointed at.
CSharpMath.Evaluation reads LaTeX back into an Entity and states the contract in
its own source, so the sentence was wrong in both places.

The point worth keeping is the one the correction adds: Latexise is still free to
use \frac and the rest, but a change to what it emits can break a downstream
project and nothing here will catch it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <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.

Update AGENTS.md for Latexise

1 participant