Closed poortho closed 8 years ago
@physikerwelt @ClaudeZou
Isn't it the case that texvc assumes that the input is in math mode? If this is the case, then $ as a command which switches to math mode, does not really make sense in this situation. Right?
Yes, this replacement was basically done for security reasons, when LaTeX was actually used to render the expression. Otherwise people could leave the the math mode and get access to the server... https://www.explainxkcd.com/wiki/index.php/327:_Exploits_of_a_Mom
So Claude, you basically need to parse a LaTeX file and determine if you are in math mode or not.
If you are in math mode then you should search for replacements. Otherwise, you should not.
Determining whether you are in math mode or not might be tricky, since there are many ways to get in and out of math mode in LaTeX. Right Moritz?
@HowardCohl ... we are almost always in math mode. So we do not want to support to leave the math mode via $ in texvcjs, because texvcjs is a parser it knows if it's inside a \text{ or another boxed mode
@HowardCohl ... we are almost always in math mode.
This is not true. Claude is now working on writing a program to parse, for instance, the KLS and KLSadd datasets. And these are not almost always in math mode. One needs to check if they are.
So we do not want to support to leave the math mode via $ in texvcjs, because texvcjs is a parser it knows if it's inside a \text{ or another boxed mode
Yes, Claude is not using texvcjs to do this. He is writing a program which calls texvcjs.
Seems like claude is re-inventing LaTeXML?
Oh I see. Claude, this requires something different than what we are thinking. We should parse Wikitext. In this case, it will be much easier to determine if we are in math mode or not.
This is the expected behavior. I think @pkra does not mind that I copied his label.
For example:
becomes