From: Scott Worley Date: Wed, 20 Dec 2023 23:25:53 +0000 (-0800) Subject: New dependency: wrapfig TeX package X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/8d583d5bdb7c8c2c6f7dfc3336c48a9ac04393ca?ds=sidebyside;hp=aa060d9ba5891fd87fc62664fb30b75bf0463e3e New dependency: wrapfig TeX package --- diff --git a/default.nix b/default.nix index 3e02638..c27c9e6 100644 --- a/default.nix +++ b/default.nix @@ -1,7 +1,7 @@ { pkgs ? import { }, lint ? false }: pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, makeWrapper , autopep8, mypy, pylint, beautifulsoup4, requests, requests-cache - , texliveBasic, types-beautifulsoup4, types-requests, xdg-base-dirs + , texliveFull, types-beautifulsoup4, types-requests, xdg-base-dirs , pandoc-cli }: buildPythonPackage rec { pname = "paperdoorknob"; @@ -11,7 +11,7 @@ pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, makeWrapper propagatedBuildInputs = [ beautifulsoup4 requests requests-cache xdg-base-dirs ]; nativeCheckInputs = - [ mypy pandoc-cli texliveBasic types-beautifulsoup4 types-requests ] + [ mypy pandoc-cli texliveFull types-beautifulsoup4 types-requests ] ++ lib.optionals lint [ autopep8 pylint ]; doCheck = true; checkPhase = "./test.sh"; diff --git a/paperdoorknob.py b/paperdoorknob.py index 84ed702..160f0db 100644 --- a/paperdoorknob.py +++ b/paperdoorknob.py @@ -17,7 +17,7 @@ def parse(content: bytes) -> BeautifulSoup: def process(spec: Spec) -> None: - spec.texout.write(b'\\documentclass{article}\n') + spec.texout.write(b'\\documentclass{article}\n\\usepackage{wrapfig}\n') if spec.geometry is not None: spec.texout.write(b'\\usepackage[' + spec.geometry.encode('UTF-8') + diff --git a/paperdoorknob_test.py b/paperdoorknob_test.py index 7ceb3ea..4291bb4 100644 --- a/paperdoorknob_test.py +++ b/paperdoorknob_test.py @@ -45,6 +45,7 @@ class BaseTestProcess(ABC): buf) paperdoorknob.process(spec) assert buf.getvalue() == b'''\\documentclass{article} +\\usepackage{wrapfig} \\usepackage[margin=20mm]{geometry} \\begin{document} This is glowfic