Docker-ized version of the MathJax-Server: https://github.com/tiarno/mathjax-server
2.2K
Docker-ized version of the mathjax-server.
Node server listens for MathJax POST, returns rendered math. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers. It was designed with the goal of consolidating the recent advances in web technologies into a single, definitive, math-on-the-web platform supporting the major browsers and operating systems.
It was written to assist our ILIAS instance in generating PDFs, but might be useful for other purposes as well.
This Docker files / image aims to facilitate setting up the MathJax Server in an isolated environment, either as part of the docker(-compose) network on the same host as ILIAS, or distributed to another physical or virtual host. This service does not require a connection to ILIAS or its database; however ILIAS must be able to connect to this service in order to be useful. Users of ILIAS do not need connect to this service directly, instead ILIAS will proxy and cache rendered formulae.
It is
There are multiple versions/ tags available under dockerhub:unihalle/mathjax/tags/. Please ensure the tag matches your requirements.
docker run -d \
--name TestMathJaxServer \
-p "8003:8003" \
unihalle/mathjax
After the server started, you can test your MathJax server at http://localhost:8003/
curl \
-o /tmp/img.png \
--header "Content-Type: application/json" \
--request POST \
--data '{"format":"TeX","math":"a + b * \\sqrt{c}","png":true,"width":100}' \
http://localhost:8003/
xdg-open /tmp/img.png
curl \
--header "Content-Type: application/json" \
--request POST \
--data '{"format":"TeX","math":"a + b * \\sqrt{c}","svg":true,"width":100}' \
http://localhost:8003/
A comprehensive example on how to get containers/services of this image behind a reverse-proxy is provided on github.com/uni-halle/maximapool-docker.
Go to Administration→Third Party Software→Settings→MathJax
MathJax Settings:
127.0.0.1 should work. If running as a container in the same compose network as ILIAS, your chosen service name, should work. The latter - for instance - allows running the service without exposing it to the public. Note that it might be possible to use HTTP basic auth credentials in this field as part of the URL.5 seems to be a sensible default.MathJax-Server decided, in versions below 1.0 relying on batik SVG generator (Java), and in later versions, to use Phantom.JS.
Maybe not, although pull-requests are always welcome.
Content type
Image
Digest
Size
146.3 MB
Last updated
over 7 years ago
docker pull unihalle/mathjax