question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade auto-render extension for AMS environments and Pandoc delimiters

See original GitHub issue

The KaTeX main branch now includes eight environments that AMS LaTeX accepts in text mode. That is, in AMS LaTeX, these environments do not not need enclosing \[…\] delimiters. It would be good if the auto-render extension could also recognize those environments and invoke KaTeX without need for \[…\] delimiters.

The relevant environments are:

  • {align}
  • {align*}
  • {alignat}
  • {alignat*}
  • {equation}
  • {equation*}
  • {gather}
  • {gather*}

KaTeX has a new rendering option, called topEnv which has been included for this purpose. If the auto-render extension matches one of these environments, it should call KaTeX with rendering option topEnv: true and then KaTeX will know how to handle it.

While we’re at this, I think it would also be good if the $...$ option (if included) be adjusted in line with Pandoc, which imposes the following constraint:

The opening $ must have a non-space character immediately to its right, while the closing $ must have a non-space character immediately to its left, and must not be followed immediately by a digit.

Either or both or these improvements may be better if there was a configuration flag that allowed the extension to work in the old manner.

@danielhollas You once expressed a willingness to take this on. Are you still game?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ronkokcommented, Aug 3, 2020

Sure. Also for clarity, I think changes to core KaTeX are separate from what @danielhollas has agreed to do. Another one of us needs to take that on.

1reaction
ronkokcommented, Aug 3, 2020

@edemaine Just to be sure that I understand, you are asking for an adjustment to core KaTeX so that it would accecpt a string either with or without an enclosing $…$. Is that correct?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases - Pandoc
When converting e.g. an align environment to an aligned environment inside a Math element, we need to include a newline before the \end{aligned}...
Read more >
Auto-render Extension - KaTeX
This is an extension to automatically render all of the math inside of text. It searches all of the text nodes within a...
Read more >
pandoc-2.6-bp151.2.2 - SUSE Package Hub -
Pandoc.Data`: store paths in dataFiles using posix separators. ... We were including the ams environment type in addition to the number.
Read more >
Fossil: Timeline - Fossil SCM
Extracted the Docker containers material from www/build.wiki and moved it into a new document dedicated to the topic, containers.md. It was already pushing...
Read more >
Adding LaTeX to your Jekyll Site - Jonathan Chan
It uses KaTeX's auto-render extension to render everything within the specified delimiters. display: true is equivalent to a displaymath ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found