-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
For non-html output, let sphinx pick the best format. #14683
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
Conversation
See https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html?highlight=figure#images We were hardcoding the image format before anyways (for html, things are different because we make the format configurable). This enables one to support third-party builders instead of having to explicitly list them in the template. Admittedly this will now break if someone tries e.g. to do a build without generating figures in *any* of the formats supported by the sphinx builder, whereas previously we would just skip all images; I think that's reasonable though...
@anntzer, sorry, I think I don't fully understand the alternative. With this, plot directive only would create the images and then, users should call explicitly image directive to include them? Thanks |
I think this should still properly cause the images to be included, doesn't it? (I may be wrong...) |
Right, apologies, I messed up with my testing. Indeed, this causes the images to be included. Now, I face another problem related to the third party builder: confluence builder does not handle the star at the end of the image name. |
It should be handled by sphinx, but the confluence builder may need to define https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.html.StandaloneHTMLBuilder.supported_image_types? |
I'm going to merge this as it simplifies the code significantly. @jjcaballero If you can not get the confluence builder to support |
@meeseeksbot backport to v3.1.x backport to v2.2.x |
@meeseeksbot backport to v3.1.x |
@meeseeksdev backport to v3.1.x @meeseeksdev backport to v2.2.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
@meeseeksdev backport to v2.2.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
1 similar comment
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
This can be backported to v2.2.x if there is a champion for it. |
…-v3.1.x Backport PR #14683: For non-html output, let sphinx pick the best format
See https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html?highlight=figure#images
We were hardcoding the image format before anyways (for html, things are
different because we make the format configurable).
This enables one to support third-party builders instead of having to
explicitly list them in the template.
Admittedly this will now break if someone tries e.g. to do a build
without generating figures in any of the formats supported by the
sphinx builder, whereas previously we would just skip all images; I
think that's reasonable though...
Alternative for #14681.
PR Summary
PR Checklist