Skip to content

MathJax3 in Jupyterlab4 #3829

@fleming79

Description

@fleming79

It looks like JupyterLab 4 switched to using MathJax3 (jupyterlab/jupyterlab#13877).

Looking in the source for ipywidgets ipywidgets/packages/controls/src/utils.ts the function typeset hasn't been upgraded to work with MathJax3. source here and copied below.

export function typeset(element: HTMLElement, text?: string): void {
  if (text !== void 0) {
    element.textContent = text;
  }
  if ((window as any).MathJax !== void 0) {
    MathJax!.Hub!.Queue(['Typeset', MathJax.Hub, element]);
  }
}

The MathJax upgrade notes here explain that Mathjax.Hub has" been removed entirely" which results in an attribute error in the code snippet above Mathjax content is not empty.

The issue was observed in the package ipylab which subclasses a VBox to create new classes Panel and SplitPanel. The issue is reported here: jtpio/ipylab#129 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions