sphinx
sphinx copied to clipboard
figure not centered in html
Describe the bug
I have just updated to sphinx 5.1.1 on FreeBSD 13.1 and the figures in the HTML output for the RTEMS documentation are not centered. The figures are centered in the PDF output.
A ReST example of an image is .. https://git.rtems.org/rtems-docs/tree/user/exe/executables.rst#n37.
The image is centered in our public builds which still use sphinx 3.1.2 .. https://docs.rtems.org/branches/master/user/exe/executables.html
I have removed all styles we have and the issue is still present.
The <figure..> has class="align-center" however the <img ... > it contains does not. Manually adding class="align-center" to the <img ... > with the Inspector tool centered the image. The figure caption also in the <figure..> block is not centered.
How to Reproduce
$ pip install sphinx
$ pip install sphinxcontrib-bibtex
$ git clone git://git.rtems.org/rtems-docs.git
$ cd rtems-docs
$ ./waf configure
$ ./waf
Expected behavior
The figure is centered.
Your project
https://docs.rtems.org/
Screenshots
No response
OS
FreeBSD 13.1
Python version
3.9.13
Sphinx version
5.1.1
Sphinx extensions
sphinxcontrib-bibtex
Extra tools
Firefox, Chrome on MacOS
Additional context
No response