texlive.js – A LaTeX Compiler for Javascript Usage var pdftex = new PDFTeX(); var latex_code = "" + "\\documentclass{article}" + "\\begin{document}" + "\\LaTeX is great!" + "$E = mc^2$" + "\\end{document}"; pdftex.compile(latex_code) .then(function(pdf) { window.open(pdf) }); Demo LaTeX Input Compile this LaTeX code to a PDF Start Collaboration Mode \documentclass[12pt]{article} \usepackage{amsmat