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

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

Open
Toofan777 opened this issue Sep 27, 2024 · 1 comment

Comments

@Toofan777
Copy link

          > 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 #3265 (comment)

@dpvc
Copy link
Member

dpvc commented Sep 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants