MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

> I don't think matching against Chinese is really the right answer, here.

Open Toofan777 opened this issue 1 year ago • 1 comments

          > I don't think matching against Chinese is really the right answer, here.

When you are using dollar signs within text and you don't want them to be treated as math delimiters, you need to quote them with a backslash, as in \$1一个香蕉\$2. In order to get a literal backslash into a javascript string, you need to use two backslashes:

const tempstr = ref('\\$1一个香蕉\\$2');

the handling of \$ as an escape for $ is controlled by the processEscapes option in the tex block of your configuration. It is true by default, so this should work as is.

But the text content is not known in advance, it is returned by the ChatGPT. So I can only use regular matching '$...$',and then determine if there is Chinese inside, and then split the character '\' before '$'?

Originally posted by @guoyutao in https://github.com/mathjax/MathJax/issues/3265#issuecomment-2262427807

Toofan777 avatar Sep 27 '24 19:09 Toofan777

What is your purpose in reposting this here? There is no new question, and there is already a response to that post.

dpvc avatar Sep 28 '24 00:09 dpvc

What do third-party math-equation-running services for websites have to do with the Foreign Intelligence Surveillance Act of 1978?

justinacolmena avatar Jan 16 '25 22:01 justinacolmena