From 357f37be787409c5655df646f8aa0ed4abfa5eaf Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 21 Dec 2023 00:24:04 -0800 Subject: [PATCH 1/1] =?utf8?q?wrapfig=20=E2=86=92=20wrapstuff,=20for=20\wr?= =?utf8?q?apstuffclear?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- glowfic.py | 4 ++-- paperdoorknob.py | 4 ++-- paperdoorknob_test.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/glowfic.py b/glowfic.py index c8246a1..c969ac0 100644 --- a/glowfic.py +++ b/glowfic.py @@ -109,12 +109,12 @@ class BelowIconLayout(Layout): self._image_size = image_size def renderChunk(self, chunk: Chunk) -> bytes: - return b'''\\begin{wrapfigure}{l}{0pt}\\oalign{ + return b'''\\begin{wrapstuff}[l]\\oalign{ %s\\cr %s\\cr %s\\cr %s\\cr -}\\end{wrapfigure} +}\\end{wrapstuff} %s diff --git a/paperdoorknob.py b/paperdoorknob.py index 24ccccd..f2a81d2 100644 --- a/paperdoorknob.py +++ b/paperdoorknob.py @@ -19,7 +19,7 @@ def parse(content: bytes) -> BeautifulSoup: def process(spec: Spec) -> None: spec.texout.write(b'''\\documentclass{article} \\usepackage{graphicx} -\\usepackage{wrapfig} +\\usepackage{wrapstuff} ''') if spec.geometry is not None: spec.texout.write(b'\\usepackage[' + @@ -34,7 +34,7 @@ def process(spec: Spec) -> None: else: # h/t https://tex.stackexchange.com/questions/309856 spec.texout.write(b''' -\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill +\\wrapstuffclear\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill ''') spec.domfilter(r) diff --git a/paperdoorknob_test.py b/paperdoorknob_test.py index 612ee8d..a89e8bb 100644 --- a/paperdoorknob_test.py +++ b/paperdoorknob_test.py @@ -47,16 +47,16 @@ class BaseTestProcess(ABC): paperdoorknob.process(spec) assert buf.getvalue() == b'''\\documentclass{article} \\usepackage{graphicx} -\\usepackage{wrapfig} +\\usepackage{wrapstuff} \\usepackage[margin=20mm]{geometry} \\begin{document} This is glowfic -\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill +\\wrapstuffclear\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill You \\emph{sure}? -\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill +\\wrapstuffclear\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill Pretty sure. \\end{document} -- 2.44.1