Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wikilink image cross-references are not implemented #432

Open
InnocenseYu opened this issue Apr 16, 2024 · 3 comments
Open

wikilink image cross-references are not implemented #432

InnocenseYu opened this issue Apr 16, 2024 · 3 comments

Comments

@InnocenseYu
Copy link

Currently pandoc can be implemented ![[image.ext|image_caption]] syntax according to jgm/pandoc#8853 (comment)

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

@lierdakil
Copy link
Owner

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.

@FeralFlora
Copy link

FeralFlora commented May 14, 2024

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: jgm/pandoc#9048

@lierdakil
Copy link
Owner

lierdakil commented May 19, 2024

I mean, if upstream says it's out of scope, I can't really argue with that 🤷 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants