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

Cannot render align environment (new feature of KaTeX 0.13) #943

Closed
hotarugali opened this issue May 4, 2021 · 9 comments
Closed

Cannot render align environment (new feature of KaTeX 0.13) #943

hotarugali opened this issue May 4, 2021 · 9 comments
Labels
Area: Math Issue: Enhancement Improvements in existing features. Res: Fixed Fix is checked in, but it might be a few weeks until a release.
Milestone

Comments

@hotarugali
Copy link

Problem

Katex supports align environment https://katex.org/docs/support_table.html, but it seems that Markdown All In One doesn't support. When I write align environment in my vscode, Markdown All In One render error, just as follows:

图片

Or are there some options needed to be set?
Thanks.

yzhang-gh pushed a commit that referenced this issue May 4, 2021
@yzhang-gh
Copy link
Owner

Thanks for the feedback.

I have updated the KaTeX module. Please check out the dev build.

@yzhang-gh yzhang-gh added Area: Math Res: Fixed Fix is checked in, but it might be a few weeks until a release. labels May 4, 2021
@Lemmingh
Copy link
Collaborator

It is strange and tedious that we have to bump markdown-it-katex every time updating KaTeX.

We should relax the range there and control its version here.

What about:

{
  "dependencies": {
    "katex": "*"
  },
  "devDependencies": {
    "jest": "^26.6.3",
    "markdown-it": "12",
    "markdown-it-testgen": "^0.1.6"
  },
  "peerDependencies": {
    "katex": "0",
    "markdown-it": ">=6"
  }
}

@yzhang-gh
Copy link
Owner

peerDependencies

Interesting.

It is strange and tedious that we have to bump markdown-it-katex every time updating KaTeX.

It was not an issue before as KaTeX only updates few times every year, although there have been quite a few patches recently.

I agree with the suggested solution. Only one small question: what is the meaning of 0 in "katex": "0"?

@Lemmingh
Copy link
Collaborator

In an X-Range, x is optional. Thus, 0 is equivalent to 0.x.x, and is interpreted as >=0.0.0 <1.0.0.


dependencies declares requirement.

"katex": "*" says the package relies on any KaTeX.

peerDependencies declares compatibility.

"katex": "0" says the package is expected to be compatible with all KaTeX 0.x.x versions.

npm v6 and v7 process peerDependencies slightly differently. But it shouldn't affect us in a few years.


In this way, markdown-it-katex won't lock things tightly.

@yzhang-gh
Copy link
Owner

Thanks

@Lemmingh Lemmingh added this to the v3.5.0 milestone May 22, 2021
yzhang-gh pushed a commit that referenced this issue Jun 20, 2021
@Lemmingh Lemmingh added the Issue: Enhancement Improvements in existing features. label Jul 9, 2021
@Lemmingh Lemmingh changed the title Markdown all in one cannot render align environment Cannot render align environment (new feature of KaTeX 0.13) Jul 9, 2021
@Firestar-Reimu
Copy link

Firestar-Reimu commented Nov 9, 2021

Update 2021.11

still does not support align

Screenshot_20211109_202630

Even markdown original support by vscode supports this: (I shut down the math support)

Screenshot_20211109_202824

@Lemmingh
Copy link
Collaborator

Lemmingh commented Nov 9, 2021

#966

Sorry for the inconvenience. Please try the dev build for now:
https://github.com/yzhang-gh/vscode-markdown#latest-development-build

@Firestar-Reimu
Copy link

OK, solved. Wish that it will release soon.

@yzhang-gh
Copy link
Owner

released in v3.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Math Issue: Enhancement Improvements in existing features. Res: Fixed Fix is checked in, but it might be a few weeks until a release.
Projects
None yet
Development

No branches or pull requests

4 participants