Bug 248796 - new port: www/mathjax3: cross-browser JavaScript display engine for mathematics, Version 3
Summary: new port: www/mathjax3: cross-browser JavaScript display engine for mathemati...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-21 06:37 UTC by Marko Cupać
Modified: 2020-10-28 03:31 UTC (History)
4 users (show)

See Also:
lwhsu: maintainer-feedback? (marko.cupac)


Attachments
distinfo, Makefile, pkg-desc (1.24 KB, text/plain)
2020-08-21 06:37 UTC, Marko Cupać
no flags Details
mathjax3.shar (1.92 KB, text/plain)
2020-10-27 02:56 UTC, Li-Wen Hsu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Cupać 2020-08-21 06:37:09 UTC
Created attachment 217407 [details]
distinfo, Makefile, pkg-desc

Hi,

current port www/mathjax is for now legacy version, v2. Current version of MathJax is v3. v2 is still supported and gets patch releases, but v3 is intended for new deployments.

Upgrading v2 to v3 is not in-place upgrade, url of the script changes, which also requires change config of web server which hosts it. Therefore I think it is better to introduce new version as mathjax3.
Comment 1 Li-Wen Hsu freebsd_committer 2020-08-21 06:53:50 UTC
How about copy current www/mathjax to www/mathjax2 and upgrade www/mathjax to v3?
Comment 2 Marko Cupać 2020-08-21 09:33:44 UTC
(In reply to Li-Wen Hsu from comment #1)

I'm not sure that is a good idea from user's point of view.

There's quite lengthy page about upgrading v2 to v3:

http://docs.mathjax.org/en/latest/upgrading/v2.html

TL;DR: "MathJax v3 is a complete rewrite of MathJax from the ground up (see What’s New in MathJax v3.0), and so its internal structure is quite different from that of version 2. That means MathJax v3 is not a drop-in replacement for MathJax v2, and upgrading to version 3 takes some adjustment to your web pages."

In my case, It was quite easy to create new apache vhost (mathjax3.example.org instead of mathjax.example.org) which points to now document root (/usr/local/www/MathJax3/es5 instead of /usr/local/www/MathJax), and to point my websites to new script url (https://mathjax3.example.org/tex-mml-chtml.js instead of https://mathjax.example.org/MathJax.js?config=TeX-AMS-MML_CHTML). But some unsuspecting users will probably end up with broken mathjax on ther websites after pkg upgrade if we just give them v3 instead of v2.

Perhaps we could make the switch further down the road when people get the chance to test new port and get familiar with it.
Comment 3 Li-Wen Hsu freebsd_committer 2020-08-21 09:35:17 UTC
(In reply to Marko Cupać from comment #2)
Thanks for the explanation, that makes sense to me.
Comment 4 Marko Cupać 2020-10-05 14:48:26 UTC
(In reply to Li-Wen Hsu from comment #3)

Anything else that needs to be done to get port included in official ports tree?
Comment 5 Li-Wen Hsu freebsd_committer 2020-10-27 02:56:17 UTC
Created attachment 219134 [details]
mathjax3.shar

Sorry for the delay, I update the port to fix some issues. Please check the new attachment and approve it. Thanks!