-
-
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
rst figure options are applied to image only #7473
Comments
Tangentially I'm working on adding explicit figure representation in pandoc. It doesn't yet work on RST though. |
Currently figures are just represented as images in a paragraph, so there isn't anywhere else to add the attributes. This will change when Figure gets added with @argent0's work. |
Great, that's good to know. Let me know if there's anything I can do to help with that. I'm not really familiar with this codebase, but I've got some time and I enjoy working with Haskell. |
This is now fixed for |
Fixes #7473 Previously, `figclass`es weren't being extracted correctly. `figclass` and `align` annotations are now implemented following the rst docs: these options apply to the figure while other options are passed onto the underlying image.
Explain the problem.
When converting a reStructuredText
figure
directive to HTML, options likefigclass
andalign
are only applied to the image and not the entire figure in the output. Based on the reference documentation forfigure
, I think these options are intended to apply to the entire figure.For example, if I run the following command:
I would expect the output to be:
Instead, I get the following, where the
class=foobar
attribute is part of theimg
tag.This issue causes the image and caption to get separated if the CSS stylesheet tries using something like
float
to align the figure.Pandoc version?
I can reproduce this issue with the current development version (git) and pandoc 2.14.0.2 (pacman version: 2.14.0.2-2).
My OS is Arch Linux.
The text was updated successfully, but these errors were encountered: