-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typst writer: add #box
around image to make it inline.
#9149
Conversation
As far as typst is concerned, I think it's enough to provide either of width or height. It looks from my reading of the code that the logic around Assuming I'm right, I think this is not ideal. I think the |
ok, I've made a small change, see how that looks |
I think that works. It took me a bit because my non-Haskell brain has a hard time reading the block inside the case statement |
No, your instinct was right, the code isn't right. I'll fix. |
I think this is cleaner, but I've been writing in haste, so it needs a close look and testing. |
Yes - this looks symmetric wrt exchanging width and height, which makes me think it's more obviously right. |
An
#image
by itself in typst is a block-level element. To force images to be inline (as they are in pandoc), we need to add a box with an explicit width. When a width is not given in image attributes, we compute one from the image itself, when possible.Closes #9104, supersedes #9105.