What do I do about the "No version information available for component" warning?

14 views
Skip to first unread message

Christian Lawson-Perfect

unread,
Jun 25, 2025, 10:05:07 AMJun 25
to mathj...@googlegroups.com
I've got a custom TeX package that I load from a static file. When the page loads, MathJax produces a console warning "No version information available for component".


What kind of version information is MathJax expecting, and how do I give it?

Davide Cervone

unread,
Jun 25, 2025, 10:40:55 AMJun 25
to mathj...@googlegroups.com
Christian:

The MathJax build tools add code like the following

import {VERSION} from 'mathjax-full/js/components/version.js';
if (MathJax.loader) {
  MathJax.loader.checkVersion('component-name', VERSION, 'tex-extension');
}

into any component files that it builds, where component-name is the name that you use in the loader's load array in your configuration.  I assume you aren't using any of the tools in components/bin?  Are you web packing your files at all, or just loading a raw one?  You can add these lines into your component by hand ion you need to.

One thing to keep in mind, however, is that if you are import commands to load MathJax modules directly, then you will need to use the build tools in order to properly share code with MathJax, otherwise you may end up duplicating large parts of the TeX input jax, and when you register your extension, it will not register with the correct objects (it will be with the duplicates rather than the ones used by MathJax).  If you are using MathJax._.input.tex to access the shared objects, then you would be OK without using the MathJax tools (converting regular imports to using MathJax._ is one of the main things those tools do.

If you need more, it would help to see some of the actual code so that I know how your are structuring it.

Davide


--
You received this message because you are subscribed to the Google Groups "MathJax Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-dev/CAEMHSOhGzmGJw8F5nJrSzAdpDW-2-C5bbjJVoeNK61X4BpN-Ww%40mail.gmail.com.

Christian Lawson-Perfect

unread,
Jun 27, 2025, 8:09:13 AMJun 27
to mathj...@googlegroups.com
Thanks. I wish that was documented somewhere!

I'm loading a plain javascript file, and using it along with MathJax loaded from the CDN. I've never yet got on with the MathJax build system.

So is the intention that I rebuild the extension for each point release of MathJax?


Davide Cervone

unread,
Jun 27, 2025, 9:58:43 AMJun 27
to mathj...@googlegroups.com
Thanks. I wish that was documented somewhere!

Yes, me, too.  I'm working on the v4 documentation, and it is probably about 400 pages when printed.  It includes many more examples and finishes the sections on node applications and the other "under constructions" pages.  I will also be updating the node demos and web demos repositories, but haven't gotten there yet.  Still, there is a lot of the API that still needs more.  Things like this, that are part of the build system, aren't documented at this point.

I'm loading a plain javascript file, and using it along with MathJax loaded from the CDN. I've never yet got on with the MathJax build system.

Well, the v4 changes I hope will improve that, but the documentation there is still limited.  There are several examples (even in v3) of how this works, but there could certainly be more.

So I assume you use MathJax._ to access the shared parts of MathJax that you are using?


So is the intention that I rebuild the extension for each point release of MathJax?

The warning message is there to indicate that if there are issues, it may be because the MathJax internals have changed and the extension needs to be updated.  It is an informational warning only, and doesn't prevent you from using the extension in the incorrect version.  Because extensions share code with MathJax it is important that the extension and MathJax have the same idea of what those shared parts look like.  Right now the version check is just for equal versions, but it would be possible to make it more sophisticated and perhaps use the "tex-extension" part to determine if anything important has changed since the version used by the extension, but that currently isn't done.  It might also be possible for the extension to indicate the versions that it works with, but that would only work for letting it know about older versions of MathJax, since it can't know what changes newer ones might entail.  

So for now, extensions would need to rebuild for each version of MathJax.  There is a configuration option to disable the version checking, if the warnings are too annoying.

Davide

Reply all
Reply to author
Forward
0 new messages