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

upgrade to MathJax 3 [with git history] #13877

Merged
merged 126 commits into from
Mar 16, 2023
Merged

Conversation

dlqqq
Copy link
Member

@dlqqq dlqqq commented Jan 28, 2023

References

Code changes

  • Bumps MathJax version to 3
  • Ports existing labextension from jupyter-renderers/mathjax3-extension while preserving git history.
  • Removes packages/mathjax2{,-extension} and adds packages/mathjax-extension.

User-facing changes

Screen Shot 2023-01-25 at 4 21 53 PM

Screen Shot 2023-01-25 at 4 28 28 PM

Bugs

  • JL4 regression: MathJax context menu options (e.g. "Scale 1.5x") no longer work. Recommend this gets addressed in a follow-up PR.

Backwards-incompatible changes

None known.

jasongrout and others added 30 commits July 31, 2018 10:32
Left align math in cell outputs for KaTeX and MathJax3 extensions.
 - @jupyterlab/fasta-extension@0.17.2
 - @jupyterlab/geojson-extension@0.17.1
 - @jupyterlab/katex-extension@0.18.0
 - @jupyterlab/mathjax3-extension@0.2.0
 - @jupyterlab/plotly-extension@0.17.1
 - @jupyterlab/vega2-extension@0.17.1
 - @jupyterlab/vega3-extension@0.17.1
 - @jupyterlab/katex-extension@0.18.1
 - @jupyterlab/mathjax3-extension@0.2.1
From the update-dependency script in @jupyterlab/buildutils:

update-dependency.js --lerna --minimal --regex '^@jupyterlab/' ^next
 - @jupyterlab/fasta-extension@0.18.0
 - @jupyterlab/geojson-extension@0.18.0
 - @jupyterlab/katex-extension@0.19.0
 - @jupyterlab/mathjax3-extension@0.3.0
 - @jupyterlab/plotly-extension@0.18.0
 - @jupyterlab/vega2-extension@0.18.0
 - @jupyterlab/vega3-extension@0.18.0
@dlqqq
Copy link
Member Author

dlqqq commented Mar 15, 2023

CI failures all seem to be related to yarn install failing. @jtpio I need an interim release of @jupyterlab/mathjax-extension to get CI passing.

[LabBuildApp] yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
error Couldn't find any versions for "@jupyterlab/mathjax-extension" that matches "^4.0.0-alpha.21"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Other CI failures are due to upstream issues, e.g. server error from pre-commit.ci and failing visual regression tests on latest version of master.

@jtpio
Copy link
Member

jtpio commented Mar 15, 2023

nterim release of @jupyterlab/mathjax-extension to get CI passing.

Normally the package should already be published on npm (from the last time): https://www.npmjs.com/package/@jupyterlab/mathjax-extension

@dlqqq
Copy link
Member Author

dlqqq commented Mar 15, 2023

@jtpio The latest version published is 4.0.0-alpha.17, whereas this branch requires 4.0.0-alpha.21.

@jtpio
Copy link
Member

jtpio commented Mar 15, 2023

Right, I'll have a look and report here.

@jtpio
Copy link
Member

jtpio commented Mar 15, 2023

@dlqqq I just published a newer version and restarted the CI checks.

@fcollonval
Copy link
Member

bot please update snapshots

@github-actions
Copy link
Contributor

Documentation snapshots updated.

@github-actions
Copy link
Contributor

Galata snapshots updated.

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dlqqq

Merging as is to reduce burden - but we should solve the remaining points/issues before 4.0.0 final

@fcollonval
Copy link
Member

Remaining CI failures are not relevant

@jmshea
Copy link

jmshea commented Jan 5, 2024

Can anyone help me understand how to call MathJax methods now?

Background: My Python+Javascript library JupyterQuiz generates interactive quizzes that can include LaTeX, but I need to call the appropriate method to tell MathJax to typeset the LaTeX code, because it is loaded by Javascript. For MathJax 3, the usual way to do this to to pass the element to MathJax.typeset(), but the MathJax global object in JupyterLab 4+ does not have the appropriate methods -- it still looks like the pre-loading version of the MathJax object.

Reference: From the MathJax 3 docs: "The global variable MathJax is used to store the configuration for MathJax. Once MathJax is loaded, however, MathJax changes the MathJax variable to contain the various methods needed to control MathJax."

It seems that the MathJax variable never gets updated in JupyterLab 4.

Any help would be greatly appreciated!

@krassowski
Copy link
Member

@jmshea folks usually don't look at comments on closed PRs so I would suggest that you open a new issue instead, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change A change that should be accompanied by a major version increase Design System CSS documentation maintenance pkg:extensionmanager pkg:mathjax2 tag:CSS For general CSS related issues and pecadilloes tag:Examples tag:Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to MathJax 3
10 participants