]> git.scottworley.com Git - paperdoorknob/commitdiff
wrapfig → wrapstuff, for \wrapstuffclear
authorScott Worley <scottworley@scottworley.com>
Thu, 21 Dec 2023 08:24:04 +0000 (00:24 -0800)
committerScott Worley <scottworley@scottworley.com>
Thu, 21 Dec 2023 08:24:48 +0000 (00:24 -0800)
glowfic.py
paperdoorknob.py
paperdoorknob_test.py

index c8246a15b2598554ab60f79ed27ac3d70dadd740..c969ac055de6f96b921b9a6dc0b489173193cd90 100644 (file)
@@ -109,12 +109,12 @@ class BelowIconLayout(Layout):
         self._image_size = image_size
 
     def renderChunk(self, chunk: Chunk) -> bytes:
         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
 %s\\cr
 %s\\cr
 %s\\cr
 %s\\cr
-}\\end{wrapfigure}
+}\\end{wrapstuff}
 
 %s
 
 
 %s
 
index 24ccccd19d471482cc37542731c1bc1699bd6b41..f2a81d2247b898f7450f2e9d037e976db3821762 100644 (file)
@@ -19,7 +19,7 @@ def parse(content: bytes) -> BeautifulSoup:
 def process(spec: Spec) -> None:
     spec.texout.write(b'''\\documentclass{article}
 \\usepackage{graphicx}
 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[' +
 ''')
     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'''
         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)
 
 ''')
         spec.domfilter(r)
index 612ee8d1c4cad8b054e089308be39ec771cd9304..a89e8bb37c98d6f1df4c0bc22097c9069dbc3fd6 100644 (file)
@@ -47,16 +47,16 @@ class BaseTestProcess(ABC):
         paperdoorknob.process(spec)
         assert buf.getvalue() == b'''\\documentclass{article}
 \\usepackage{graphicx}
         paperdoorknob.process(spec)
         assert buf.getvalue() == b'''\\documentclass{article}
 \\usepackage{graphicx}
-\\usepackage{wrapfig}
+\\usepackage{wrapstuff}
 \\usepackage[margin=20mm]{geometry}
 \\begin{document}
 This is glowfic
 
 \\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}?
 
 
 You \\emph{sure}?
 
-\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill
+\\wrapstuffclear\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill
 
 Pretty sure.
 \\end{document}
 
 Pretty sure.
 \\end{document}