pandoc-crossref icon indicating copy to clipboard operation
pandoc-crossref copied to clipboard

wikilink image cross-references are not implemented

Open InnocenseYu opened this issue 1 year ago • 3 comments

Currently pandoc can be implemented ![[image.ext|image_caption]] syntax according to https://github.com/jgm/pandoc/issues/8853#issuecomment-1698419064

according to the current pandoc-crossref image syntax, hopefully can be like this: ![[image.ext|image_caption]]{#fig:label width=50%}

InnocenseYu avatar Apr 16 '24 19:04 InnocenseYu

Wikilink images are not treated as figures and don't have attributes, AFAICT. Ostensibly, I could try to hack around this, but I'd rather not tbf. Perhaps you want to open an issue upstream.

lierdakil avatar Apr 16 '24 20:04 lierdakil

Wikilink images are not treated as figures and don't have attributes, AFAICT. Ostensibly, I could try to hack around this, but I'd rather not tbf. Perhaps you want to open an issue upstream.

I made an issue on the Pandoc repo a while ago about supporting link attributes on wikilinks, but it is currently closed as "out of scope" because the wikilink + link attribute syntax combo is not natively supported anywhere at the moment:

We could support it. But the point of the wikilinks extension was to allow interoperability with specific platforms that support this syntax, and they don't support the use of image attributes with it... - jgm

Feel free to add your thoughts on the issue: https://github.com/jgm/pandoc/issues/9048

FeralFlora avatar May 14 '24 12:05 FeralFlora

I mean, if upstream says it's out of scope, I can't really argue with that :shrug: The only argument I have is it would be convenient for some users, but you could've made the same exact argument, too.

So... I dunno. The minimal support can be hacked together with a lua filter. But it'll be limited wrt the attributes it can admit -- at least unless someone's willing to do the legwork of making a proper attribute parser in lua, which is not exactly fun.

Doing this upstream will be a bit easier. But upstream is a bit conservative about introducing new syntax, which isn't a bad thing in itself.

lierdakil avatar May 19 '24 00:05 lierdakil