I ported LaTeX to Javascript
21–30 of 73 posts
Re: I ported LaTeX to Javascript
#22Promising. I am getting some error messages though. lstat(/bin) failed ... /bin : No such file or directory warning: kpathsea: configuration file texmf.cnf not found in these directories:
These errors are save to ignore. You have to wait some seconds until compiling has completed. Note that the browser might prevent the website from opening the PDF (Pop-up blocking)
Re: I ported LaTeX to Javascript
#23Does this presume a local Unix filesystem? It sure doesn't like the lack of a /bin directory on Windows.
Re: I ported LaTeX to Javascript
#24Re: I ported LaTeX to Javascript
#25Some background would be nice. Wasn't LaTeX notoriously hard to port – to the point that a LateX app for iPad actually ran in an emulator initially [1]. Is this port based on web2c as well? [1] http://www.litchie.com/?p=419
Nevertheless it's a good effort as a proof of concept. I'd also appreciate info on whether Latex packages will be supported in the future. At the moment this does not seem to be the case, though I can imagine this would be a challenging problem to solve for in-browser compilation of documents.
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...
Re: I ported LaTeX to Javascript
#26This part of the document isn't rendered correctly in the resulting pdf: In printing, text is usually emphasized with an \emph{italic} type style. In my pdf it looks like the every other letter, starting with the first, is missing from the word italic. It looks like " t l c ". Maybe something is wrong with the fonts. I'm using the latest Chrome on OSX.
I could not figure out which file is missing, yet. but as soon as I find it, I will include it and fix this.
Re: I ported LaTeX to Javascript
#27Does this presume a local Unix filesystem? It sure doesn't like the lack of a /bin directory on Windows.
No, emscripten emulates a virtual unix filesystem. That's why you see this error on a Windows machine.
And yeah, expected error messages like the no-/bin should probably be filtered out. But man, great idea!
Re: I ported LaTeX to Javascript
#28Nice, but this constantly crashes Safari when the content goes below the fold. The whole page goes white and then the browser dies.
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.
Re: I ported LaTeX to Javascript
#29I would hardly call this porting something.
EDIT: I just remembered I ported Microsoft Word to Linux by running it inside a Windows VM.
Re: I ported LaTeX to Javascript
#30Pointlessly awesome. Care to describe why it would make sense to run LaTeX on JS?