Skip to content

Commit

Permalink
typeset for .tex support
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulranjansah committed Apr 12, 2024
1 parent 3eebf5f commit b6a102b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions typeset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# global import
import sys

filename = sys.argv[1]

with open("output.tex", 'r', encoding='utf-8') as output:
data = output.read()

content = "\\documentclass{article}\n\\usepackage{amsmath}\n\n\\begin{document}\n\n" + data + "\n\\end{document}"

with open("output.tex", 'w', encoding='utf-8') as output:
output.write(content)

0 comments on commit b6a102b

Please sign in to comment.