Earlier quoted context omitted.
I don't mean to offend, but I still fail to understand the excitement around this.
It's OK, you don't have to be excited about things others are excited about. You also don't have to rain on their parade.
I ported LaTeX to Javascript
61–70 of 73 posts
Re: I ported LaTeX to Javascript
#62EDIT: I managed to find the answer to this question myself. I want to generate a bunch of bytes programmatically, then have the user click on a button, and allow the user to save a file containing the generated bytes. This should run entirely client-side, with no talking to the server (except for static loading of the HTML page, JS files, images, css, etc). I've been wanting to do this since I wrote my first Java app…
Re: I ported LaTeX to Javascript
#63EDIT: I managed to find the answer to this question myself. I want to generate a bunch of bytes programmatically, then have the user click on a button, and allow the user to save a file containing the generated bytes. This should run entirely client-side, with no talking to the server (except for static loading of the HTML page, JS files, images, css, etc). I've been wanting to do this since I wrote my first Java app…
data: URIs are deprecated for generating content. Use object URLs and Blobs ( https://developer.mozilla.org/en-US/docs/DOM/Blob ). If you want to force saving the file to a disk use
Re: I ported LaTeX to Javascript
#64Earlier quoted context omitted.
Sad to hear that. I don't use Safari, but maybe it cannot compete with the JS engines of Firefox and Chrome's version of the Webkit engine. 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've seen emscripten-generated JS crash Safari before. It's not a performance issue; jsc is plenty fast and beats SpiderMonkey in most benchmarks. However, emscripten seems to exercise certain corners of JS that pose stability problems for jsc.
Re: I ported LaTeX to Javascript
#65Pointlessly awesome. Care to describe why it would make sense to run LaTeX on JS?
Re: I ported LaTeX to Javascript
#66Re: I ported LaTeX to Javascript
#67Something completely off-toppic: I don't like TeX. I use it and i like the output, but I have never realy understood the language and therefore I don't like it. The syntax for optional arguments([]) seems very odd to me, aswell as the separation between mouth and the rest. The support for named parameters is IMO very hacky. Wouldn't be a Tcl based macro processor with the tex-Backend nice? Or is this silly?
(It's also no coincidence that the development of BibTeX coincides with the crack epidemic, but I digress.)
Re: I ported LaTeX to Javascript
#68Re: I ported LaTeX to Javascript
#69EDIT: I managed to find the answer to this question myself. I want to generate a bunch of bytes programmatically, then have the user click on a button, and allow the user to save a file containing the generated bytes. This should run entirely client-side, with no talking to the server (except for static loading of the HTML page, JS files, images, css, etc). I've been wanting to do this since I wrote my first Java app…
data: URIs are deprecated for generating content. Use object URLs and Blobs ( https://developer.mozilla.org/en-US/docs/DOM/Blob ). If you want to force saving the file to a disk use
Just as annoyingly, IE10 has createObjectURL too, but only allows the created URLs to be used for , and . To save a blob, you have to use something ms-prefixed instead, and this doesn't allow inline PDF viewing.
Re: I ported LaTeX to Javascript
#70Thanks for your hints! I added a 'Open PDF' button to circumvent popup blockers. 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…
Top, top work. I love it. Now to try with my monster list of packages...