Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.
/ svgtex Public archive
forked from agrbin/svgtex

Using MathJax and PhantomJS to create SVGs on server side with minimum overhead.

Notifications You must be signed in to change notification settings

benetech/svgtex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

svgtex

Using MathJax and PhantomJS to create SVGs on server side with minimum overhead.

MathJax is a great tool! Why not use it on a server side too?

To avoid loading whole phantomjs and MathJax into memory with every call the service is exposed via HTTP.

$ phantomjs main.js

loading bench page
server started on port 16000
you can hit server with http://localhost:16000/?2^n
.. or by sending latex source in POST (not url encoded)

And then (in a different console).. curl it up!

$ curl localhost:16000/?x

<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="width: 1.34ex; height: 1.099ex; vertical-align: -0.124ex; margin-top: 1px; margin-right: 0px; margin-bottom: 1px; ...

CDN loading

Current implementation uses internet connection to load bench page (it loads the MathJax from CDN, only once, before server is started), this can be avoided by downloading mathjax into wokring dir and changing the index.html where it links with mathjax.

Stability

experimental.

About

Using MathJax and PhantomJS to create SVGs on server side with minimum overhead.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published