We can have citations inside figure captions (plus bonus migration script) #8799
Replies: 3 comments 1 reply
-
As you have a project setup already, can you try if this work with bare pandoc ?
In this case, we take over pandoc to process caption and create the figure, and this process handle citation. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
well... color me surprised @cscheid I believed I did test that at some point and had persuaded myself it didn't work. Did it not work some time in the past, and the upgrades fixed it, or was I always delusional? Hard to say. |
Beta Was this translation helpful? Give feedback.
-
Description
As noted on my quarto blog,
citations inside figure captions do not work, we need to use figure divs
e.g. this is no good
But this is fine:
For these to come out nicely as Figures with captions, need to give all our figure divs an id starting with
#fig-
. I wrote a python script which does this automatically by inventing an id inspired by the filename, so that I could migrate my figures from hugo:Initially I tried to write it as a lua pandoc filter thinking the parsing woudl be more principled than hacky regexes..., before discovering that pandoc is not idempotent when applied to markdown.
Hoping this helps someone.
Beta Was this translation helpful? Give feedback.
All reactions