Open notjagan opened 8 years ago
@physikerwelt Do you have any idea about this? Carriage returns are getting eaten. How should we preserve them?
Example
x=a+b+c
+d+\sum_{n=0}^\infty a_n
becomes
x=a+b+c+d+\sum_{n=0}^\infty a_n
The carriage returns should be preserved.
I don't get the context. texvc does not allow equation https://en.wikipedia.org/wiki/User:Physikerwelt/cases
@physikerwelt Ok. I changed the above example.
The carriage returns are important.
@HowardCohl the example you give still does not render for me.
@physikerwelt I don't know what happened. I changed the markup, but the change did not appear.
I have updated the math source and also edited https://en.wikipedia.org/wiki/User:Physikerwelt/cases to demonstrate.
Of course, I know a way to fix the issue, but I don't know if you would be happy with this.
Everytime you have a carriage return, you could insert a special string such as <_>
and after texvcjs has processed the code, every time you find a <_>
you then replace it with a carriage return.
I'm not sure about the problem. Both expression look the same for me on my userpage. What's the significance of the the newline. And why do you want to preserve the newline.
Let me guess:
You want to present the string that was processed by texvc to a human being?
@physikerwelt I think we've had this discussion along the lines of conversations with Bruce in one of our GitHub issues regarding LaTeXML (I might be able to find the discussion if I was able to search for GitHub issues I've participated in a certain GitHub repo).
Of course, the rendered result is the same.
The formatting (with return characters) is a good thing, and has been chosen carefully by a human so that it is easier to read (as a human). We do not want to lose that information.
@physikerwelt I don't remember the name of the Deyan's GitHub repo for LaTeXML servers that we had that long discussion about line breaking. I thought it was something like tlxpgsi or something like that.
As of now, whitespace (under the
_
rule) is consumed in its entirety. However, newlines in math mode should be preserved. I'm not really certain how to make this change.