see http://manuels.github.io/unix-toolbox.js/ and https://github.com/manuels/unix-toolbox.js-imagemagick/tree/...
33 karma · joined January 19, 2013
see http://manuels.github.io/unix-toolbox.js/ and https://github.com/manuels/unix-toolbox.js-imagemagick/tree/...
For more Unix tools ported to Javascript have a look a the unix-toolbox.js project [2]
[1] http://emscripten.org/ [2] http://manuels.github.io/unix-toolbox.js/
I hope you like it.
[1] https://gist.github.com/tobeytailor/421369 [2] http://www.exactcode.com/site/open_source/exactimage/bardeco... [3] http://manpages.ubuntu.com/manpages/lucid/man1/bardecode.1.h... [4] http://emscripten.org/
Yes, the main work is done in the webworker (~250kb) + the tex format file latex.fmt (~700kb)
The first package supported is geometry. If you want to add another, append the required files to the supported_packages array.
This is what it looks like for the geometry package: https://github.com/manuels/texlive.js/blob/master/website/ma...
This script reqiures a lot of computation in JS and communication between the website and the webworker (~300kb). Maybe Safari is unable to cope with this in a decent amount of time.
I could not figure out which file is missing, yet. but as soon as I find it, I will include it and fix this.
In theory one could search the LaTeX code for '\usepackage' stings and download the required files and mount them into the virtual filesystem of emscripten.
See https://github.com/manuels/texlive.js/blob/master/website/ma...
Yes, I used emscripten to port it to Javascript. It was not that hard. Emscripten had three bugs I had to fix (the hardest was to find that the %g format was not supported by emscripten's sscanf).
But it was compiled almost like for x86: first convert the pdftex 'web' souce code to c using web2c, then compile it to LLVM bytecode and the LLVM bytecode to JS.