Skip to content

KaTeX not rendering correctly #6276

@letian-w

Description

@letian-w

Context

No response

Bug description

Bug

KaTeX does not render array environment correctly.

The following is rendered correctly.

$$
\begin{array}{rcl}
E(X) & = & \displaystyle\sum_{k=0}^n k \cdot ({}_n C_k) p^k q^{n-k}\\\\
     & = & \displaystyle\sum
\end{array}
$$

The following results in the entire math section being rendered as raw code in a paragraph.

$$
\begin{array}{rcl}
E(X) & = & \displaystyle\sum_{k=0}^n k \cdot ({}_n C_k) p^k q^{n-k}\\\\
     & = & \displaystyle\sum_{k=0}
\end{array}
$$

Note the only difference is that I added _{k=0} to the second line of the equation.

Expecting

Copy and paste the following code into this KaTeX demo tool to see how it should be rendered.

\[
\begin{array}{rcl}
E(X) & = & \displaystyle\sum_{k=0}^n k \cdot ({}_n C_k) p^k q^{n-k}\\\\
     & = & \displaystyle\sum_{k=0}
\end{array}
\]

Related links

Reproduction

bug.zip

Steps to reproduce

  1. get the right dependencies
    mkdocs==1.5.3
    mkdocs-material-insiders==9.4.2
    
  2. run mkdocs serve

Browser

Chrome

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions