X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/c04b2e7812ebd48c2d9273122deef888483bc9f6..e10b5b6f112c057ab33ad46f8a3385d3bcd23e1d:/paperdoorknob.py diff --git a/paperdoorknob.py b/paperdoorknob.py index 2bcf31a..26eb7be 100644 --- a/paperdoorknob.py +++ b/paperdoorknob.py @@ -37,7 +37,12 @@ def replies(html: BeautifulSoup) -> Iterable[Tag]: def process(spec: Spec) -> None: - spec.texout.write(b'\\documentclass{article}\n\\begin{document}\n') + spec.texout.write(b'\\documentclass{article}\n') + if spec.geometry is not None: + spec.texout.write(b'\\usepackage[' + + spec.geometry.encode('UTF-8') + + b']{geometry}\n') + spec.texout.write(b'\\begin{document}\n') html = parse(spec.htmlfilter(spec.fetcher.fetch(spec.url))) for r in replies(html): spec.domfilter(r)