Skip to content

KaTeX update #3833

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

KaTeX update #3833

wants to merge 4 commits into from

Conversation

arunpersaud
Copy link
Contributor

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

tested by creating a demo site and adding

$$\\sin(x) = \\frac{1}{3}$$                                                                          
\\begin{align*} \\sin(x) &= \\frac{1}{3} \\\\  \\cos(x)+5  &= \\int^1_0\exp(x) \\end{align*}         

to the post.

Based on #3710, Fixes #3709

Review needed since I haven't used math mode in nikola before and, for example, not sure about "double " needed in input. Also, KaTeX seems to support some more environment and I'm not sure if the the setup one should only use the * version of those or the one without star or both?

@@ -1025,10 +1025,14 @@ PRETTY_URLS = ${PRETTY_URLS}
# KATEX_AUTO_RENDER = """
# delimiters: [
# {left: "$$", right: "$$", display: true},
# {left: "\\\\[", right: "\\\\]", display: true},
# {left: "\\\\[", right: "\\\\]", display: true}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# {left: "\\\\[", right: "\\\\]", display: true}
# {left: "\\\\[", right: "\\\\]", display: true},

@Kwpolska
Copy link
Member

Double backslashes are usually required when using markdown or reST, we can’t do much about it.

The default value that KaTeX uses is:

[
  {left: "$$", right: "$$", display: true},
  {left: "\\(", right: "\\)", display: false},
  {left: "\\begin{equation}", right: "\\end{equation}", display: true},
  {left: "\\begin{align}", right: "\\end{align}", display: true},
  {left: "\\begin{alignat}", right: "\\end{alignat}", display: true},
  {left: "\\begin{gather}", right: "\\end{gather}", display: true},
  {left: "\\begin{CD}", right: "\\end{CD}", display: true},
  {left: "\\[", right: "\\]", display: true}
]

We should probably use that and add equation*, because IIRC some input format will generate that. I’m not sure about align vs align*, we probably want both.

@arunpersaud
Copy link
Contributor Author

Added equation and align* and fixed the missing comma.

@arunpersaud
Copy link
Contributor Author

just checking in, if anything else is needed here

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

Successfully merging this pull request may close these issues.

KaTeX is out of date, align* environment missing (current is 0.10.2, latest is 0.16.8)
3 participants