Repository navigation
Image alignment not respected in reStructuredText #163
Description
Activity
python-creole, which seems to be used for
rest2html, does not support it at the moment.
I've made a fix & pull-request to jedie/python-creole#11 for fixing it.oh, my bad. I assumed it is used here.
I'm gonna look into it.Align is deprecated in HTML5: http://stackoverflow.com/questions/14551305/align-attribute-deprecated
This bug is not fixed,
:align: righthas no impact on the emitted HTML, which is wrong. please reopenReacted by Gregor Sturm, Abdur-Rahmaan Janhangeer, Ondřej Cífka, Hugo van Kemenade, Ondrej Baranovič, Dominic Davis-Foster, Giovanni Palla, Suman Adhya and Rambaud Pierrick- added a commit that references this issue
on Oct 6, 2018 I think this is still an issue. Any help?
Align is deprecated in HTML5: http://stackoverflow.com/questions/14551305/align-attribute-deprecated
@gjtorikian reStructuredText’s
alignis not HTML, is reStructuredText syntax. And it is not deprecated (emphasis mine):The alignment of the image, equivalent to the HTML
tag's deprecated "align" attribute or the corresponding "vertical-align" and "text-align" CSS properties. The values "top", "middle", and "bottom" control an image's vertical alignment (relative to the text baseline); they are only useful for inline images (substitutions). The values "left", "center", and "right" control an image's horizontal alignment, allowing the image to float and have the text flow around it. The specific behavior depends upon the browser or rendering software used.
Reacted by Waldir PimentaI don’t work at GitHub anymore, please contact their support.
Reacted by Adrián Chaves@kivikakk Any chance you could reopen this issue?
#1222 is an old attempt by me to fix this, and I assume it didn’t fix this because of gjtorikian/html-pipeline#302. Not entirely sure if that’s still the case.
We just need someone at GitHub to start caring at some point.
Reacted by Dominic Davis-Foster and Giovanni PallaI also don't work at GitHub anymore, sorry; contacting support remains your best option.
Reacted by Waldir Pimenta@kivikakk Sorry, I saw your commits were the most recent, I did not realize they were from more than 1 year ago.
I wonder if GitHub is even maintaining this anymore.
Reacted by Asherah Connor and Dominic Davis-Foster@aharpole Could we reopen this issue?
Reacted by Stefan Bogdan and Waldir PimentaI am experiencing the same problem. The
README.rstdoes not take into account the:align:or:width:for me. But if I use the sameREADME.rstas a long description for PyPI it is rendered exactly as I want. I think this should be reopened too.Reacted by Michael HuckaIn case people aren't aware of this workaround note Github does however respect
align="right"within an html<img>tag contained within a restructuredTextraw:: htmldirective e.g... raw:: html <img src="figures/logo.png" align="right" width="300px" alt="right-aligned logo in README">does work even if the equivalent rst
imagedirective unfortunately does not:.. image:: figures/logo.png :align: right :width: 300 :alt: right-aligned logo in READMEReacted by Waldir Pimenta and Fantix KingReacted by Waldir Pimenta and Fantix KingThe
alignfeature in rst seems to be working now! See example here.Reacted by Adrián Chaves, Waldir Pimenta and Philipp A.The
alignfeature in rst seems to be working now! See example here.At last! I assume this was fixed by #1452.
The
alignfeature in rst seems to be working now! See example here.It doesn't work for me using a PNG file, either a local one or an URL.
Reacted by Waldir PimentaDoes work for us: https://github.com/scverse/anndata#readme
It's a SVG, but I'm unsure how this could be relevant.
Here you have a gist showcasing both cases https://gist.github.com/jmi2k/f422df7d4a67dde9c19e74d091c3582e.
Here you have a gist showcasing both cases https://gist.github.com/jmi2k/f422df7d4a67dde9c19e74d091c3582e.
Interesting, the PNG one does not seem to get
align="right"there.Reacted by José Miguel Sánchez García, Leonid Kostrykin and Jérôme LafréchouxAlign still doesn't work in README.rst: see https://github.com/akkana/metapho/blob/master/README.rst


If I try to right-align an image in reStructuredText:
It comes out left-aligned: https://github.com/jkleint/blamethrower/blob/master/README.rst