]> git.scottworley.com Git - paperdoorknob/blobdiff - paperdoorknob.py
LaTeX output is a valid LaTeX file
[paperdoorknob] / paperdoorknob.py
index 32daf4f4d9372b07ee1e5eb801037ea2efa129ad..8ab62f10b655f6b9f7c21cc4dd5a1f5379d066be 100644 (file)
@@ -84,9 +84,11 @@ def process(
         texout: IO[bytes],
         pandoc: str,
 ) -> None:
         texout: IO[bytes],
         pandoc: str,
 ) -> None:
+    texout.write(b'\\documentclass{article}\n\\begin{document}\n')
     html = clean(fetch(url, session, timeout))
     for r in replies(html):
         texout.write(html_to_tex(pandoc, r))
     html = clean(fetch(url, session, timeout))
     for r in replies(html):
         texout.write(html_to_tex(pandoc, r))
+    texout.write(b'\\end{document}\n')
 
 
 def main() -> None:
 
 
 def main() -> None: