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

KaTeX dies when attempting to render \begin\displaystyle #3942

Open
3 tasks done
Aresiel opened this issue Apr 3, 2024 · 1 comment
Open
3 tasks done

KaTeX dies when attempting to render \begin\displaystyle #3942

Aresiel opened this issue Apr 3, 2024 · 1 comment
Labels

Comments

@Aresiel
Copy link

Aresiel commented Apr 3, 2024

Before reporting a bug

Describe the bug:
Attempting to render \begin\displaystyle causes KaTeX to crash with the error message "Expected node of type textord, but got node of type styling".

To Reproduce:
Steps to reproduce the behavior:

  1. Go to https://katex.org/
  2. Write \begin\displaystyle in the demo box
  3. See error in box directly to the right of demo box

Expected behavior:
I expect it to either render correctly as LaTeX (whatever this now entails), or for KaTeX to display it as invalid LaTeX as usual.

Screenshots:
image

Environment (please complete the following information):

  • KaTeX Version: 0.16.10
  • Device: Desktop
  • OS: Windows 11
  • Browser: Firefox
  • Version: 125.0b7

Additional context:
This issue originally occured on a separate site, but as it's reproducable on https://katex.org/, that ought not matter.

@Aresiel Aresiel added the bug label Apr 3, 2024
@edemaine
Copy link
Member

edemaine commented Apr 3, 2024

I guess this input should generate a KaTeX parse error instead of a general error, but otherwise this behavior seems correct.

For comparison, LaTeX generates the cryptic error Missing \endcsname inserted. 🙂

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

No branches or pull requests

2 participants