Closed Astro-Aionia closed 3 weeks ago
Hi. Thanks for the report! Could you specify versions of pandoc-crossref and pandoc you're using, just to make sure we're on the same page?
I vaguely suspect this might be the same issue all over again, since Pandoc drastically changed how it represents figures in v3.0.
I am using Pandoc 3.0 and pandoc-crossref 0.3.15.0. Sorry for forgetting to illustrate before.
Okay, so I've taken a quick look, and it seems Pandoc does create bookmarks for divs, spans, code blocks, tables and plain images but indeed not figures. I should be able to whip up a PR over the weekend.
As a stopgap measure, this lua filter should work (it just wraps all figures in divs with the same identifier):
function Figure(el)
return pandoc.Div(el, pandoc.Attr(el.identifier))
end
P.S. as was the case the last time, filter order is important, you'll want to run this lua filter after pandoc-crossref.
Thanks for your reply. I have just tried this script. It works well for me.
@lierdakil The issue was just fixed upstream. Not released yet, though.
Thanks for the update. I guess I'll need to remember to close this when updating to the next pandoc release... which all things considered is somewhat improbable, but I'll try :sweat_smile:
I'll try to post a reminder at that time ;)
Presumably was fixed in pandoc v3.2.1, so a couple releases ago.
Hi, I found hyperlinks to figures actually located to word bookmarks with the same name as fig ids defined in markdown files. But in fact, these bookmarks were not exist in the output DOCX document, so when I used the hyperlinks with Ctrl+L Click, they always linked to the start of the document.
I have referred #147 and tried the lua script liedakil provided, but it didn't work. I'm wondering if there are some way ti fix the hyperlink for the latest pandoc-crossref.