From: Scott Worley Date: Thu, 21 Dec 2023 08:24:04 +0000 (-0800) Subject: wrapfig → wrapstuff, for \wrapstuffclear X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/357f37be787409c5655df646f8aa0ed4abfa5eaf wrapfig → wrapstuff, for \wrapstuffclear --- 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}