File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/resources/filters/quarto-post Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,16 @@ function render_typst_fixups()
9696 traverse = " topdown" ,
9797 Image = function (image )
9898 image = _quarto .modules .mediabag .resolve_image_from_url (image ) or image
99+ -- REMINDME 2024-09-01
100+ -- work around until https://github.com/jgm/pandoc/issues/9945 is fixed
101+ local height_as_number = tonumber (image .attributes [" height" ])
102+ local width_as_number = tonumber (image .attributes [" width" ])
103+ if image .attributes [" height" ] ~= nil and type (height_as_number ) == " number" then
104+ image .attributes [" height" ] = tostring (image .attributes [" height" ] / PANDOC_WRITER_OPTIONS .dpi ) .. " in"
105+ end
106+ if image .attributes [" width" ] ~= nil and type (width_as_number ) == " number" then
107+ image .attributes [" width" ] = tostring (image .attributes [" width" ] / PANDOC_WRITER_OPTIONS .dpi ) .. " in"
108+ end
99109 return image
100110 end ,
101111 Div = function (div )
You can’t perform that action at this time.
0 commit comments