[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MathJax, npm and LibreJS
MathJax, npm and LibreJS
Sat, 10 Oct 2020 21:10:56 +0100
I would like advice on how to refer to MathJax JS libraries (for use
by the texi2any program and HTML produced for Texinfo manuals), and
in general libraries provided through npm.
I have read
However, this part of the second link has a problem:
> .tar.gz archive, or a .zip archive. If a source archive includes
> 00-INDEX that lists the order in which individual source files should
> be concatenated to produce a single file that's equivalent to what's
> hosted on the site.
some complex build process that is more than just concatenating files.
For example, MathJax uses npm to download dependencies and to build
an HTML file needs to refer to.
I have not seen much discussion of npm in relation to the LibreJS
initiative, but from my understanding of it it is quite problematic.
If users are going to be able to access to the source code of
the dependencies too. npm provides these dependencies through a
centralised repository, but this may change or break over time
depending on the decisions and wishes of package developers
and/or npm Inc. (a subsidiary of Microsoft). This famously
happened in 2016 when a commonly-used package was unpublished:
Hence, what I have in mind to do is to bundle the MathJax source with
all of its dependencies along with a README file explaining how to
build it using npm. After getting the most recent version from git,
run "npm install", and then create a tarball of everything you get.
I would reference an upload of this tarball in the third column of
the labels table.
Would this be a good approach for using MathJax or any other npm
This would provide a backstop in case npm and/or MathJax stop
distributing all the necessary source code. Unfortunately, this
is a huge file: 205M. Users could be directed to MathJax's own
instructions in the first instance, so they may not be downloading
the huge file that often: it is just there in case npm and/or MathJax
break in the future.
I imagine that each entity with a webpage referencing MathJax would
distribute this file if they wanted to make sure the source code for
it was available (even if this wasn't required by the licences of
MathJax or its dependencies).
For example, the GNU project could have one upload of this file that
the Texinfo manuals of GNU packages could refer to. Other entities
could provide copies separately to avoid the problem of centralised
hosting (in principle it is bad whether the FSF or npm Inc. does it).
PS I am not really looking for criticism of the idea of using MathJax
with Texinfo here. If anybody wants to discuss that, please write to
|[Prev in Thread]
||[Next in Thread]|
- MathJax, npm and LibreJS,
Gavin Smith <=