teachlab / latex_string_to_pdf.py
anh-dangv94's picture
new update
19e044c
raw
history blame contribute delete
234 Bytes
import pylatex import Document, NoEscape
def string_to_pdf(latex_string):
doc = Document()
#Adding the given latex string to the doc
doc.append(NoEscape(latex_string))
doc.generate_pdf('worksheet', clean_temp=True)