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

Link attributes on Wikilink images don't seem to work #9048

Closed
FeralFlora opened this issue Sep 1, 2023 · 5 comments
Closed

Link attributes on Wikilink images don't seem to work #9048

FeralFlora opened this issue Sep 1, 2023 · 5 comments

Comments

@FeralFlora
Copy link

FeralFlora commented Sep 1, 2023

Explain the problem.
I am exporting from markdown to pdf with this command:

-f markdown+wikilinks_title_after_pipe --defaults=C:\Users\User\Documents\Notir\Obsidian-notes\pandoc.yaml --citeproc --resource-path="${currentPath}" --resource-path="${attachmentFolderPath}" --metadata title="${currentFileName}" -s -o "${outputPath}" -t pdf

The variables are resolved using the Enhancing Export plugin for Obsidian, and the export works - including the images 🎉

However, I cannot resize the images, because link attributes do not seem to be working for wikilinks.

I am testing the new wikilink image support in a test note like so:

![A cute cat.](cat-png-17.png){#fig:cat width=50%}

![[cat-png-17.png|A cute cat]]{#fig:cat width=50%}

The first example works as expected, but the wikilink does not. The image size is unchanged, and {#fig:cat width=50%} is added in plain text. Adding the link_attributes extension doesn't make a difference in either case

Pandoc version?
pandoc 3.1.7-nightly-2023-09-01
Features: +server +lua
Scripting engine: Lua 5.4
Operating system: Windows 10 Home 10.0.19045

@FeralFlora FeralFlora added the bug label Sep 1, 2023
@FeralFlora
Copy link
Author

I use a nightly version because Windows wouldn't allow me to run version 3.1.7, instead opening a pop-up saying:

"This app can't run on your pc: To find a version for your pc check with the software publisher"

But that's a separate issue. It's interesting that the nightly version didn't have this issue, though.

@jgm
Copy link
Owner

jgm commented Sep 1, 2023

Right. I am reluctant to support a syntax that nobody supports. I don't think you can provide such attributes on, e.g., GitHub wiki or Obsidian...

@FeralFlora
Copy link
Author

FeralFlora commented Sep 1, 2023

@jgm I'm not entirely sure which syntax you are referring to. If it's the wikilink image syntax, then didn't you just add support for that?

If it's the {width=50%} image size syntax, then my question is, isn't that the default Pandoc image sizing/attribute syntax?

Or perhaps it's the combination that you are reluctant about? If so, can you clarify why? Since Pandoc now supports wikilink images, there should be some way to specify their size too, don't you think?

@jgm
Copy link
Owner

jgm commented Sep 1, 2023

I meant the combination.
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...

@tarleb
Copy link
Collaborator

tarleb commented Apr 30, 2024

Closing as "out of scope" for now.

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

No branches or pull requests

3 participants