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

Persist KaTeX macros across render calls #129747

Merged
merged 2 commits into from
Aug 5, 2021
Merged

Conversation

chrisyeh96
Copy link
Contributor

This PR fixes the regression identified in #125425.

Sets the "globalGroup" option in KaTeX to true for both markdown file previews and for notebook cell rendering.

Now, markdown such as the following should render properly:

$\newcommand{\ra}{\rightarrow}$

$\ra$

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 5, 2021

Thanks! This will be in the next insiders build and is scheduled for VS Code 1.60

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 5, 2021

Were you seeing this working? I just merged this but when I tested the above equation, it still shows:

ParseError: KaTeX parse error: Undefined control sequence: \ra at position 1: \̲r̲a̲

@chrisyeh96
Copy link
Contributor Author

@mjbvz No, I didn't actually build VSCode with my changes. (It would really nice to have GitHub Codespaces to try out new builds!)

I was hoping that this would just work, but I guess I wasn't lucky this time. Any chance you could help debug this? Being able to persist KaTeX macros across render calls would be a huge plus for me.

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 6, 2021

Ok, please try building and debugging VS Code locally to see what may be going wrong

@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants