Move to AngouriMath 2.0, which renamed Latexise to Latexize - #262
Open
Rafael-SOWNet wants to merge 1 commit into
Open
Move to AngouriMath 2.0, which renamed Latexise to Latexize#262Rafael-SOWNet wants to merge 1 commit into
Rafael-SOWNet wants to merge 1 commit into
Conversation
AngouriMath 2.0 renames ILatexiseable.Latexise to ILatexizeable.Latexize.
MathItem implements the new interface explicitly, so CSharpMath's own public
surface does not change: MathItem.Latexise stays the name callers know, and
PublicAPI.Unshipped.txt is untouched. The public-API analyzer confirms it --
no RS warnings.
Only two call sites are on AngouriMath's side of the boundary and move:
Content.Latexize() on an AngouriMath.Entity, and the ILatexizeable parameter
in Interpret.
One test expectation changes. 2.0 splits a radical over a positive factor, so
1+\sqrt{2x} expands to 1+\sqrt{2}\sqrt{x}. sqrt(2x) = sqrt(2)sqrt(x) holds for
all complex x when the factored constant is positive, so the new output is
sound; it is a rendering change rather than a correctness one.
955 of 955 tests pass.
Collaborator
|
@Rafael-SOWNet Can you also add the implementation and tests for the new forms of LaTeX that AngouriMath started to produce? |
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.
Hello — I maintain AngouriMath, which
CSharpMath.Evaluationbuilds on. AngouriMath 2.0 renamesILatexiseable.LatexisetoILatexizeable.Latexize, so this is advance notice with the work already done rather than a bug report after the fact.Entirely your call whether to take it now or when 2.0 is final — the only thing that would need changing then is the version string.
CSharpMath's own public API does not change
This is the part I wanted to get right.
MathItemimplements the renamed interface explicitly, soMathItem.Latexise()stays exactly the name your callers know:PublicAPI.Unshipped.txtis untouched, and the public-API analyzer agrees — the build produces noRSwarnings. Your consumers see nothing.If you would rather follow the rename through to your own member for consistency, that is a two-line change and yours to make; I did not presume it.
What actually moves
Only what is on AngouriMath's side of the boundary. I let the compiler establish the list rather than grepping for the name — several sites that look affected are your own
MathItemand are not:Evaluation.cs:45MathItem : ILatexiseable→ILatexizeableEvaluation.csILatexizeable.Latexize()addedEvaluation.cs:54Content.Latexise()→Content.Latexize()(receiver isAngouriMath.Entity)Interpret.cs:6,7CSharpMath.Evaluation.csprojAngouriMath1.4.0→2.0.0-preview.2Evaluation.cs:64,Evaluation.cs:76andEvaluationTests.cs:809callMathItem.Latexise()— your method — and are untouched.One test expectation changes, and it is a real rendering change
InterpretTests:1+\sqrt{2x}now expands to1+\sqrt{2}\sqrt{x}rather than staying1+\sqrt{2 x}. AngouriMath 2.0 splits a radical over a positive factor.The identity
√(2x) = √2·√xholds for all complexxwhen the factored-out constant is positive, so the output is sound — but it is a change in what your users will see rendered, so I have flagged it rather than quietly updated it. Only theExpandedline differs;Input,SimplifiedandFactorizedare unchanged.A bug of ours that your test suite found
Running your suite against
2.0.0-preview.1failed two tests. The second was ours:\mathbb R+1rendered as\mathrm{undefined}, becauseExpandturnedRR + 1intoNaN— a 2.0 regression where collecting like terms wrote a factor back asbase^1, which is an identity only where the power is defined at all.Fixed in asc-community/AngouriMath#852 and released in
2.0.0-preview.2, which is what this PR references. Thank you — your tests caught something ours did not.Measured
Against
2.0.0-preview.2:For reference, before this change: 955 green on
AngouriMath 1.4.0, two red on2.0.0-preview.1.Happy to adjust anything here, or to close it and simply leave the heads-up if you would rather do the upgrade yourselves.