Live data from Hacker News

I ported LaTeX to Javascript

manuels.github.com

41–50 of 73 posts

Re: I ported LaTeX to Javascript

#41
post #34

Earlier quoted context omitted.

Anyone want to test a webkit nightly? I don't have a desktop machine handy tight now to test on :( Or even just a bug report at bugs.webkit.org Thanks :)

Just tried it, crashes in the exact same way: 1. Hitting "Compile" does whatever it should do successfully. 2. Then hitting "Open PDF" opens a new tab which stalls out and crashes I would almost say its actually a PDF thing that is crashing Safari vs a JS thing. At least, that's what has happened consistently on my machine with latest Safari and WebKit nightly. Edit: However, taking the generated PDF from Chrome and…

Yup, that is for sure it. I took the Chrome generated PDF, turned it into a data URL, then copy-pasted the data URL into Safari's URL bar. Crash.

Drag and dropping the file itself into Safari, works fine.

Re: I ported LaTeX to Javascript

#42
post #34

Earlier quoted context omitted.

Anyone want to test a webkit nightly? I don't have a desktop machine handy tight now to test on :( Or even just a bug report at bugs.webkit.org Thanks :)

Just tried it, crashes in the exact same way: 1. Hitting "Compile" does whatever it should do successfully. 2. Then hitting "Open PDF" opens a new tab which stalls out and crashes I would almost say its actually a PDF thing that is crashing Safari vs a JS thing. At least, that's what has happened consistently on my machine with latest Safari and WebKit nightly. Edit: However, taking the generated PDF from Chrome and…

Nice debugging, not a fan of making blanket assumptions when something isn't working as expected.

Re: I ported LaTeX to Javascript

#45

Just wanted to comment that this works better in Internet Explorer 10, documents seemed to compile significantly faster than on Chrome. Running Windows 8x64, for reference.

Really?! I didn't expect that! (I don't run Windows, and so I didn't try it in IE.) Good to know, thanks!

Re: I ported LaTeX to Javascript

#46

Wow, I really would like to know how this was achieved... Note that it is somewhat broken for me: http://imgur.com/twIG75m

Wow is indeed the best way to describe this project!

From what I see, the main work horse is this 250k "binary": https://raw.github.com/manuels/pdftex.js/master/release/pdft...

This webworker script in combination with a .fmt (latex format file) generates the PDF. All in JS. @manuels__ this is awesome!

Re: I ported LaTeX to Javascript

#50

Wow, I really would like to know how this was achieved... Note that it is somewhat broken for me: http://imgur.com/twIG75m

Wow is indeed the best way to describe this project! From what I see, the main work horse is this 250k "binary": https://raw.github.com/manuels/pdftex.js/master/release/pdft... This webworker script in combination with a .fmt (latex format file) generates the PDF. All in JS. @manuels__ this is awesome!

Thanks ivan_ah! I really didn't expect so much positive response!

Yes, the main work is done in the webworker (~250kb) + the tex format file latex.fmt (~700kb)

Post reply on HN