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 140 forks source link

LaTeX code in JavaScript string requires additional escapes #23

Closed xylo04 closed 9 years ago

manuels commented 9 years ago

Not sure what you mean here. https://github.com/manuels/texlive.js/blob/master/index.html#L54 is just plain HTML and not javascript, isn't it? Do you get an encoding error somehere?

xylo04 commented 9 years ago

I was looking at this is in the browser and decided to copy/paste it into the console to try it out, and found that the resulting string was "documentclass{article}egin{document}LaTeX is great!$E = mc^2$end{document}" instead of "\documentclass{article}\begin{document}\LaTeX is great!$E = mc^2$\end{document}". The slashes have to be escaped.

manuels commented 9 years ago

Oh, yes. You're absolutely right!