Skip to content

Vector accents, \vec, do not render when using KaTeX #8519

@Thiti517

Description

@Thiti517

Context

No response

Bug description

I am using KaTeX for math rendering in Material for MkDocs. Most formulas render correctly (sums, products, fractions, greek letters, ...).

However, vector accents do not appear at all, for example when using \vec{F}.

Additional Verification

Rendering the exact same formula in a standalone HTML page using only KaTeX does show the vectors correctly, so the issue appears to not be browser related.

This suggests that some of Material CSS could be preventing KaTeX from rendering accurately.

Related links

Reproduction

9.6.23-katex-vectorial-arrows-are-not-rendering.zip

Steps to reproduce

  1. Install MkDocs and Material for MkDocs.

  2. Create a new MkDocs project and configure theme -> name: material in mkdocs.yml.

  3. Enable KaTeX following the Material for MkDocs math reference guide.

  4. Add a formula using vector accents, for example:

    $$
    \vec{F}_T = \sum_{i=1}^{N} \vec{F}_i = m \vec{a}
    $$
    
  5. Run mkdocs serve or mkdocs build.

  6. Observe that the vector arrows do not appear in the rendered output.

Browser

Firefox

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions