Closed hypernova0 closed 8 years ago
It sounds to me like everything should work. Any web server should do; I've used both Apache2 and Node http-server for local testing. Getting the paths set up just right was a bit tricky though. Can you provide more information, maybe console messages or 404's from the network debugger?
If you want to see a working integration, you can check out my project googledrive/drivetex; in index.js#251 I'm taking the pdf
data URL in the callback and shoving that into an iframe for inline viewing. You can see at line 238 that I use an optional constructor parameter to set up the path within the project; I actually submitted pull request #29 to @manuels to make that possible.
Thanks a heap @xylo04! You pointed me in the right direction and now I have texlive.js up and running on my web server. I truly appreciate your help!
Hey, sorry for the newbie question, but I'm having great difficulty actually understanding how texlive.js is integrated into a website.
All I've wanted to do is get the example at the top of the page working - I think I could take the rest from there. That is:
I've tried downloading the zip file of the github project, running index.html locally, then running 'compile this latex document' and get an error about difficulty establishing a web worker.
I've tried using (what I thought were) the main scripts of this project, i.e., promise.js, pdftex.js, and pdftex-worker.js, and then running the above code but that didn't work either.
What am I missing here? Is emscripten required to get texlive.js up and running? Is there a backend aspect to texlive.js that I'm completely missing? My understanding is that everything in this project is client-side, so shouldn't it be possible to throw up all the files in the project on my server, load up the index.html, then insert the above code in the console and have a tab pop open with the 'LaTeX is great!' pdf?
Thanks for any help!