Replies: 3 comments
-
I think this is for |
Beta Was this translation helpful? Give feedback.
-
@cscheid indeed this is for the |
Beta Was this translation helpful? Give feedback.
-
We could consider a step in our filter chain that does this conversion, but it shouldn't ever happen automatically. You could also write the filter yourself. It would have to detect the images you want to change (I would recommend using a specific class, like "inline-svg"), and then replace the image element with a raw HTML block. The following is untested, but should give you an idea: function Image(image)
if not image.classes:includes("inline-svg") then return nil end
-- this assume images has relative path
local filename = pandoc.path.join(pandoc.path.directory(quarto.doc.input_file), image.src)
local contents = io.open(filename, "r"):read("*all")
return pandoc.RawInline("html", contents)
end This will still put the image inside a paragraph. If you need to remove the paragraph, then you'll have to write a filter with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
SVG support hyperlinks, which is nice to make clickable diagrams. Do to so, I got it to work by inserting raw html like so:
It would be more convenient to be use the image syntax, like so:
However, because images get rendered as
<p><img src="test-url.svg" class="img-fluid"></p>
, the hyperlink no longer works.When using d2, I run into the same issue of the hyperlinks not working because it is being rendered as an
<img>
by quarto.Any suggestions how we could solve this? I could try to implement an extension if and when we have an idea how to make this work.
Beta Was this translation helpful? Give feedback.
All reactions