Skip to content
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

rendering wrong in docutils 0.17 (unordered list, maybe more?) #1115

Closed
rkdarst opened this issue Apr 5, 2021 · 28 comments · Fixed by #1185
Closed

rendering wrong in docutils 0.17 (unordered list, maybe more?) #1115

rkdarst opened this issue Apr 5, 2021 · 28 comments · Fixed by #1185
Labels
Bug A bug Needed: patch A pull request is required
Milestone

Comments

@rkdarst
Copy link
Contributor

rkdarst commented Apr 5, 2021

I am giving this issue a broad title to collect other issues.

Problem

With docutils 0.17, it seems that bullet points don't render properly (the marker is missing), spacing too little (see images below)

An immediate fix is already in sphinx_rtd_theme==0.5.2 (just released), see (#1111, #1112 for issues, #1114 for fix), but that seems to only pin docutils==0.16 so other things that broke should still be tracked. I tested using the sphinx_rtd_theme docs themselves. #1112 shows this with a problem in the sidebar.

With 0.16:

image

With 0.17:

image

I originally thought this was another Sphinx problem, but it seems to not be present in the default Sphinx theme, but (only/at least) sphinx_rtd_theme.

Reproducible Project

sphinx_rtd_theme with docutils==0.16. Installed from the master branch pip install docutils=0.17 immediately after.

git clone https://github.com/readthedocs/sphinx_rtd_theme
cd sphinx_rtd_theme
git checkout ca2719b
pip install -e . -r docs/requirements.txt docutils==0.17
(cd docs ; make clean html)
# open build/html/changelog.html, does not work
pip install docutils==0.16
# refresh page, works

Error Logs/Results

none I see as relevant

Expected Results

...

Environment Info

  • Python Version: Python 3.7.3
  • Sphinx Version: Sphinx 3.5.3
  • RTD Theme Version: ca2719b
Package                       Version   Location                          
----------------------------- --------- ----------------------------------
alabaster                     0.7.12    
Babel                         2.9.0     
certifi                       2020.12.5 
chardet                       4.0.0     
docutils                      0.16      
idna                          2.10      
imagesize                     1.2.0     
Jinja2                        2.11.3    
MarkupSafe                    1.1.1     
packaging                     20.9      
pip                           18.1      
pkg-resources                 0.0.0     
Pygments                      2.8.1     
pyparsing                     2.4.7     
pytz                          2021.1    
requests                      2.25.1    
setuptools                    40.8.0    
six                           1.15.0    
snowballstemmer               2.1.0     
Sphinx                        3.5.3     
sphinx-rtd-theme              0.5.2     /home/$USER/git/sphinx_rtd_theme
sphinxcontrib-applehelp       1.0.2     
sphinxcontrib-devhelp         1.0.2     
sphinxcontrib-htmlhelp        1.0.3     
sphinxcontrib-httpdomain      1.7.0     
sphinxcontrib-jsmath          1.0.1     
sphinxcontrib-qthelp          1.0.3     
sphinxcontrib-serializinghtml 1.1.4     
urllib3                       1.26.4    

See also

@Blendify
Copy link
Member

Blendify commented Apr 5, 2021

In the 0.17 changelog, I do not see any mention of changes to unordered list. Perhaps this is a bug in sphinx?

@bugwelle
Copy link

bugwelle commented Apr 6, 2021

This can also be seen in this project's docs as well:

0.5.1 latest
Screen Shot 2021-04-06 at 21 16 51 Screen Shot 2021-04-06 at 21 16 38

By hard-coding docutils to v0.16, everything is back to normal:

pip3 install sphinx sphinx-rtd-theme docutils==0.16 

Edit:// My bad, the first post also mentions the changelog as an example 🤦

@rkdarst
Copy link
Contributor Author

rkdarst commented Apr 6, 2021 via email

@stsewd
Copy link
Member

stsewd commented Apr 7, 2021

there was an error in the requirements #1118, docs from the theme should be good now https://sphinx-rtd-theme.readthedocs.io/en/latest/changelog.html

@Blendify Blendify added this to the 1.0 milestone Apr 7, 2021
@Blendify
Copy link
Member

Blendify commented Apr 7, 2021

I still want to address docutils 0.17 and sphinx4 support for the upcoming 1.0 release.

@1313e
Copy link

1313e commented Apr 7, 2021

Names of a table of contents are now also rendered incorrectly in the contents menu on the left it seems.
This can be seen in my last render of my CMasher docs: https://cmasher.readthedocs.io/index.html
The table of contents names are now in white and left-aligned instead of blue and center-aligned.

@stsewd
Copy link
Member

stsewd commented Apr 7, 2021

@1313e you need to set the theme version explicitly to 0.5.2 https://github.com/1313e/CMasher/blob/master/docs/requirements_docs.txt, the default version may not be the latest see https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html#don-t-rely-on-implicit-dependencies

@1313e
Copy link

1313e commented Apr 7, 2021

Alright, will fix that.
However, docutils v0.17 will still cause the issue I mentioned.

@Blendify
Copy link
Member

Blendify commented Apr 7, 2021

The issue with docutils 0.17 is the change from <div class="section"> to <section>.
Our css selector for lists is .section ol we will need to update our css to fix this.

I will have a fix out soon.

@Blendify
Copy link
Member

Blendify commented Apr 9, 2021

Looked into this and we need to fix our css for the new semantic tags <main>, <section>, <header>, <footer>, <aside>, <figure>, and <figcaption>.

anzoman added a commit to xlab-si/xopera-opera that referenced this issue Apr 9, 2021
When pushing our docs to GitHub pages in the last days we were
surprised when some parts were not rendered correctly. We have
discovered that this has something to do with the version of Read the
docs theme we're using (more info is available her in this issue:
readthedocs/sphinx_rtd_theme#1115), so we had
to upgrade sphix-rtd-theme package to 0.5.2 and we also updated Sphinx
to the latest 3.5.3 version.
anzoman added a commit to xlab-si/xopera-opera that referenced this issue Apr 9, 2021
When pushing our docs to GitHub pages in the last days we were
surprised when some parts were not rendered correctly. We have
discovered that this has something to do with the version of Read the
docs theme we're using (readthedocs/sphinx_rtd_theme#1115), so we had
to upgrade sphix-rtd-theme package to 0.5.2 and we also updated Sphinx
to the latest 3.5.3 version.
anzoman added a commit to xlab-si/xopera-opera that referenced this issue Apr 9, 2021
When pushing our docs to GitHub pages in the last days we were
surprised when some parts were not rendered correctly. We have
discovered that this has something to do with the version of Read the
Docs theme we're using (readthedocs/sphinx_rtd_theme#1115), so we had
to upgrade sphix-rtd-theme package to 0.5.2 and we also updated Sphinx
to the latest 3.5.3 version.
aqw added a commit to psyinfra/onyo that referenced this issue Jan 24, 2023
Currently running into this bug: readthedocs/sphinx_rtd_theme#1115

Hoping bumping the python version alone is sufficient, rather than
specifying build dep versions.
aqw added a commit to psyinfra/onyo that referenced this issue Jan 24, 2023
Currently running into this bug: readthedocs/sphinx_rtd_theme#1115

Hoping bumping the python version alone is sufficient, rather than
specifying build dep versions.

fix #273
aqw added a commit to psyinfra/onyo that referenced this issue Jan 24, 2023
Currently running into this bug: readthedocs/sphinx_rtd_theme#1115

This comment explains why pinning is necessary: readthedocs/sphinx_rtd_theme#1115 (comment)

fix #273
aqw added a commit to psyinfra/onyo that referenced this issue Jan 24, 2023
Currently running into this bug: readthedocs/sphinx_rtd_theme#1115

This comment explains why pinning is necessary: readthedocs/sphinx_rtd_theme#1115 (comment)

fix #273
@GregDMeyer
Copy link

GregDMeyer commented Jan 31, 2023

I have deeply read the above and am still a little confused which packages exactly I need to pin to get this to work. The docs build fine locally, but still don't have bullets on readthedocs.

My docs (most recent iteration of) requirements.txt, although I've found that many different combinations seem to successfully build locally and break on readthedocs:

Sphinx==5.3.0
ipykernel==6.21.0
nbsphinx==0.8.12
sphinx_rtd_theme==1.2.0rc2
myst-parser==0.18.1
docutils==0.18.1

My .readthedocs.yaml:

version: 2

build:
  os: ubuntu-22.04
  tools:
    python: "3.11"

python:
  install:
  - requirements: docs/requirements.txt

edit: I should note that I've found that when I pin docutils==0.16, I get this error when building locally, I guess because I am using myst:

ERROR: Error in "include" directive:
unknown option: "parser".

.. include:: pubs.md
   :parser: myst_parser.sphinx_

@benjaoming
Copy link
Contributor

@GregDMeyer since you are using Read the Docs, can you create a build with the configuration and point to the build log and a page where the issue is demonstrated? Thanks 🙏

szymonlopaciuk added a commit to szymonlopaciuk/xsuite that referenced this issue Feb 1, 2023
Due to an issue with the compatibility of sphinx-rtd-theme
and docutils, there are problems with rendering some doc elements
when using the most recently installed versions.

This is a known bug (see, among others,
readthedocs/sphinx_rtd_theme#1115).

This pins Sphinx and sphinx-rtd-theme to versions that work.
Also add it to conf.py so that the problems can be simulated
locally.

Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
szymonlopaciuk added a commit to szymonlopaciuk/xsuite that referenced this issue Feb 1, 2023
Due to an issue with the compatibility of sphinx-rtd-theme
and docutils, there are problems with rendering some doc elements
when using the most recently installed versions.

This is a known bug (see, among others,
readthedocs/sphinx_rtd_theme#1115).

This pins Sphinx and sphinx-rtd-theme to versions that work.
Also add it to conf.py so that the problems can be simulated
locally.

Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
szymonlopaciuk added a commit to szymonlopaciuk/xsuite that referenced this issue Feb 1, 2023
Due to an issue with the compatibility of sphinx-rtd-theme
and docutils, there are problems with rendering some doc elements
when using the most recently installed versions.

This is a known bug (see, among others,
readthedocs/sphinx_rtd_theme#1115).

This pins Sphinx and sphinx-rtd-theme to versions that work for
now.

Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
szymonlopaciuk added a commit to szymonlopaciuk/xsuite that referenced this issue Feb 1, 2023
Due to an issue with the compatibility of sphinx-rtd-theme
and docutils, there are problems with rendering some doc elements
when using the most recently installed versions.

This is a known bug (see, among others,
readthedocs/sphinx_rtd_theme#1115).

This pins Sphinx and sphinx-rtd-theme to versions that work for
now.

Signed-off-by: Szymon Łopaciuk <szymon@lopaciuk.eu>
@GregDMeyer
Copy link

@benjaoming Thanks for following up! I actually got it working since then by doing pip freeze > requirements.txt---pinning literally every package to the same version that I have locally. This doesn't feel like a particularly clean solution though ;-)

I just tried to revert to a commit where it was broken in order to give you an example in case you want to dig further, and... the docs look fine, from the exact same commit that was broken before. Is there some sort of caching or something that could cause this to happen? In any case, my bullet points look fine now, so I guess no biggie, I'm fine to not spend any more time worrying about it!

abkfenris added a commit to abkfenris/xpublish that referenced this issue Mar 8, 2023
It's likely the source of the version mismatch between docutils and sphinx_rtd_theme making bullets disappear.

xref: readthedocs/sphinx_rtd_theme#1115
AyanSinhaMahapatra added a commit to nexB/scancode-toolkit that referenced this issue Mar 14, 2023
Looks like there was an issue in docutils/sphinx-rtd-theme so we
needed to downgrade to docutils < 0.17 for the unordered lists to
be rendered again properly.

Reference: readthedocs/sphinx_rtd_theme#1115
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
abkfenris added a commit to xpublish-community/xpublish that referenced this issue Mar 21, 2023
* Plugin documentation

I've introduced the plugin system with descriptions and examples for the 4 main kinds of plugins (app/dataset routers, dataset providers, and hook spec). I've also tried to explain the common functionality and enough of the underlying system to get folks started building their own.

* Trying to fix bullet formatting

* Include missing self arg

ht @jr3cermak

* python.version is deprecated

It's likely the source of the version mismatch between docutils and sphinx_rtd_theme making bullets disappear.

xref: readthedocs/sphinx_rtd_theme#1115

* Additional mismatch of theme version

xref: https://stackoverflow.com/questions/67542699/readthedocs-sphinx-not-rendering-bullet-list-from-rst-file/71069918#71069918
TomWinder added a commit to QuakeMigrate/QuakeMigrate that referenced this issue Apr 8, 2023
TomWinder added a commit to QuakeMigrate/QuakeMigrate that referenced this issue Apr 8, 2023
Seems this issue is still not fully handled in latest versions of
sphinx / sphinx_rtd_theme (see readthedocs/sphinx_rtd_theme#1115)

But hopefully this now covers it.
AyanSinhaMahapatra added a commit to nexB/purldb that referenced this issue Jul 7, 2023
Looks like there was an issue in docutils/sphinx-rtd-theme so we
needed to downgrade to docutils < 0.17 for the unordered lists to
be rendered again properly.

Reference: readthedocs/sphinx_rtd_theme#1115
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
AyanSinhaMahapatra added a commit to nexB/purldb that referenced this issue Jul 7, 2023
Looks like there was an issue in docutils/sphinx-rtd-theme so we
needed to downgrade to docutils < 0.17 for the unordered lists to
be rendered again properly.

Reference: readthedocs/sphinx_rtd_theme#1115
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
AyanSinhaMahapatra added a commit to nexB/purldb that referenced this issue Jul 10, 2023
Reference: readthedocs/sphinx_rtd_theme#1115
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
AyanSinhaMahapatra added a commit to nexB/purldb that referenced this issue Jul 10, 2023
Reference: readthedocs/sphinx_rtd_theme#1115
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
sajith added a commit to atlanticwave-sdx/sdx-docs that referenced this issue Nov 3, 2023
There's an old bug in sphinx_rtd_theme which made rendering bullet
lists buggy. That bug since has been fixed, but sometimes pip-compile
resolves to use the older buggier version of the theme.

https://stackoverflow.com/questions/67542699/readthedocs-sphinx-not-rendering-bullet-list-from-rst-file/74355734
readthedocs/sphinx_rtd_theme#1115
readthedocs/sphinx_rtd_theme#1185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: patch A pull request is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.