Skip to content

[builtins] Install the builtin mathjax distribution together with JSROOT - #23908

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:install-builtin-mathjax
Oct 30, 2026
Merged

guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:install-builtin-mathjax

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

With builtin_mathjax=ON, the mathjax distribution is only unpacked into js/mathjax in the build tree, but nothing installs it: the install rule for JSROOT copies the js directory of the source tree. JSROOT loads mathjax/es5/tex-svg.js relative to its own location (see js/modules/base/latex.mjs), so an installed ROOT always falls back to the CDN, and the builtin_mathjax option has no effect for the installation.

Install the distribution next to JSROOT, like in the build tree.

Fixes the problem that js/mathjax is missing from the install tree:

[I] omen nix-shell ~/c/r/root_build > ls js/
build  changes.md  files  img  index.htm  LICENSE  mathjax  modules  scripts
[I] omen nix-shell ~/c/r/root_build > ls ../root_install/js/
build  changes.md  files  img  index.htm  LICENSE  modules  scripts
[I] omen nix-shell ~/c/r/root_build >

This is another fix when I exercised the nix packaging of the 6.42.00 release candidate.

With builtin_mathjax=ON, the mathjax distribution is only unpacked into
js/mathjax in the build tree, but nothing installs it: the install rule
for JSROOT copies the js directory of the source tree. JSROOT loads
mathjax/es5/tex-svg.js relative to its own location (see
js/modules/base/latex.mjs), so an installed ROOT always falls back to
the CDN, and the builtin_mathjax option has no effect for the
installation.

Install the distribution next to JSROOT, like in the build tree.
@guitargeek
guitargeek requested a review from linev October 30, 2026 08:53
@guitargeek guitargeek self-assigned this Oct 30, 2026
@guitargeek
guitargeek requested a review from bellenot as a code owner October 30, 2026 08:53
@linev

linev commented Oct 30, 2026

Copy link
Copy Markdown
Member

There is PR #23877 which converts jsroot into builtin option.

Probably I should add there install instruction there for:

 install(DIRECTORY ${CMAKE_BINARY_DIR}/js/ DESTINATION ${CMAKE_INSTALL_JSROOTDIR}/ ${DIR_PERMISSIONS})

Then this PR will be not necessary

@guitargeek

guitargeek commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Yep I'm aware of that! But do you really plan to port #23877 at this point? Looks like a fat change for making after the 6.42.00 release candidate is already out. And I think your builtin_jsroot PR will require several packagers to change recipes after the release candidate. That's why I'm suggesting this minimal fix. Your #23877 can always go on top of it

@linev

linev commented Oct 30, 2026

Copy link
Copy Markdown
Member

But do you really plan to port

Not sure yet.
It makes builtins organization for jsroot, openui5 and mathjax symmetric.

@guitargeek

Copy link
Copy Markdown
Contributor Author

Not sure yet.

Okay. In this case, are you fine with merging my PR here, so things work correctly for the release whatever is the fate of #23877?

@linev

linev commented Oct 30, 2026

Copy link
Copy Markdown
Member

In this case, are you fine with merging my PR here,

If you want to backport it to 6.42 - then let merge yours first and I will rebase my PR

@guitargeek
guitargeek merged commit ac47670 into root-project:master Oct 30, 2026
33 checks passed
@guitargeek
guitargeek deleted the install-builtin-mathjax branch October 30, 2026 11:20
@guitargeek

Copy link
Copy Markdown
Contributor Author

/backport to 6.42

@root-project-bot

Copy link
Copy Markdown

Preparing to backport PR #23908 to branch 6.42 requested by guitargeek

@root-project-bot

Copy link
Copy Markdown

This PR has been backported to branch 6.42: #23913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants