Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round trip conversion leads to invalid LaTeX #57

Closed
Smurf-IV opened this issue Sep 11, 2019 · 4 comments
Closed

Round trip conversion leads to invalid LaTeX #57

Smurf-IV opened this issue Sep 11, 2019 · 4 comments
Labels
Resolution/Works as intended The described scenario works as intended. Type/Bug

Comments

@Smurf-IV
Copy link

Describe the bug

To Reproduce
Use the following as the source of the LaTeX
F_n=\frac{5V_m}{\sqrt{g}}

            MathListBuilder mlb = new MathListBuilder(inputLaTeX);
           Trace.Write(mathList.StringValue);

Output is this:
F_{n}=\\atop{0,515V_{m}}{\\Sqrt{g⋅L_{WL}}}

which is invalid

Expected behavior
Source LaTex produces this
image

Round Trip produces this:
image

These images are from http://www.wiris.com/editor/demo/en/developers

Environment (please complete the following information):
using CSharpMath.Atoms;
using CSharpMath.Enumerations;
using CSharpMath.Interfaces;
.Net Core 2.2

@Happypig375
Copy link
Collaborator

StringValue is debug-only and is not required to be valid LaTeX. For MathList->LaTeX, use MathListBuilder.MathListToString.

@charlesroddie
Copy link
Collaborator

Renames called for?
StringValue -> DebugString
MathListBuilder.MathListToString -> MathListBuilder.MathListToTeX (or remove and have MathList.ToTeX instead)

@Smurf-IV
Copy link
Author

Smurf-IV commented Sep 13, 2019

Thanks for the info.

MathListBuilder.MathListToString : It's a static .... That's why it wasn't showing up in the intelli-sense, perhaps put a redirect in place as well ?

@Happypig375 Happypig375 added the Resolution/Works as intended The described scenario works as intended. label Sep 13, 2019
@Happypig375
Copy link
Collaborator

Merged into #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution/Works as intended The described scenario works as intended. Type/Bug
Projects
None yet
Development

No branches or pull requests

3 participants