manuels / texlive.js

Compiling LaTeX (TeX live) in your browser
http://manuels.github.com/texlive.js/
GNU General Public License v2.0
1.25k stars 139 forks source link

compilation fails the second time #12

Open jimhefferon opened 10 years ago

jimhefferon commented 10 years ago

I go to the github project page. I follow the link to the website. I compile. Works great-- you are great!

I compile again, with or without changing the input text. It never returns.

When I try it on my home machine I get an error that I do not understand pointing to the first line of the webworker.js file. Sorry; I don't know enough js to fix it myself.

Jim

manuels commented 10 years ago

Hi Jim,

thanks for your bug report! Yes, I can reproduce the bug. It occurs when the script doesn't create a new instance of pdflatex and texlive when it runs.

// this should NOT work:
var pdftex = new PDFTeX('./');
var texlive = new TeXLive(pdftex);
button.click(function() {
  texlive.compile(...);
}

// this should work:
button.click(function() {
  var pdftex = new PDFTeX('./');
  var texlive = new TeXLive(pdftex);
  texlive.compile(...);
}

when I find the time, I'll fix it in the demo!

jimhefferon commented 10 years ago

Thanks so much.

I appreciate your work, a lot.

Jim


Does not the Captain seek your advice, sir?' Not always,' said Stephen.