-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 does not convert size unit #6353
Comments
Indeed, the behaviour was changed in cb7b0a6#diff-9da4893eeab88b87f94db2b69af787ff without updating the MANUAL. The commit says:
Should we just update the MANUAL, or..? |
Interesting! I'm no haskeller, but it looks like the unit conversion funcitonality was completely removed? Or is there some other way to do that in Pandoc? |
No, it's still there for certain output format and unit combinations... but centimeters are actually valid units in CSS, and some people want them to be passed through as is. I'm not sure I agree with this, since CSS just defines |
The manual says: So, the attributes are treated as pixels only if no unit is specified. Here a unit is specified, and it's passed through unchanged. That accords with the docs, no? |
Oh, I see now: " Dimensions are converted to pixels for output in HTML-like formats. " |
Seems like we just need to update the documentation? |
See https://www.w3.org/Style/Examples/007/units.en.html |
You're right, I'll stick with I got mislead by all the materials on the internet discouraging from using real life units, but they seem to be focused on manual designing sites from scratch. For documents generated automatically using them seems fine. Thank you! |
Yeah, I actually liked having the But yeah, guess it doesn't really matter. The markdown width/height attributes are probably only used mostly for one-off documents anyway, and nobody appears to have complained about the change. |
@jgm You've closed this issue, are the docs updated already? |
will be put live in the next release, you can see the change here 82eb4df |
I'm converting an MD to a HTML. According to the docs, the
link_attributes
extension should convert an image size unit to px for the HTML output. It doesn't seem to happen:prints
Enabling the extension manually doesn't fix the issue.
-f markdown+link_attributes
has no effect, but-t html+link_attributes
causes an error:The extension link_attributes is not supported for html
.pandoc --version
:The text was updated successfully, but these errors were encountered: