Describe the bug
Using sphinx-build to generate a field list inside an rst file in creates a defnition list instead (according to the lists explained here https://sphinx-rtd-theme.readthedocs.io/en/latest/demo/lists_tables.html#definition-lists)
To Reproduce
Steps to reproduce the behavior:
index.rst file content
Welcome to my documentation!
========================
:Author: abc
:Contact: [email protected]
:Status: alpha
:External: a
:Sphinx: b
conf.py: (although there are more entries, they where not changed from me and are not relevant i guess)
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
# 'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
"sphinx_rtd_theme",
]
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_options = {
'canonical_url': '',
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'style_nav_header_background': 'red',
#Toc options
'collapse_navigation': False,
'sticky_navigation': True,
'navigation_depth': 1,
'includehidden': True,
'titles_only': False
}
html_css_files = [
'custom.css',
]
pygments_style = None
Dockerfile:
FROM python:3
WORKDIR /srv
COPY dockerize/pip.conf/ /etc/pip.conf
# install all needed python modules
COPY dockerize/requirements.txt .
RUN pip install -r requirements.txt
RUN pip config list
RUN python setup.py install
RUN apt update && apt install -y python3-sphinx python3-sphinx-rtd-theme python3-guzzle-sphinx-theme python3-sphinx-bootstrap-theme python3-certifi && apt-get clean all
requirements.txt:
rstcloth
requests
pyyaml
Sphinx
sphinx-rtd-theme
guzzle_sphinx_theme
sphinx_bootstrap_theme
pip.conf:
[global]
no-cache-dir = true
trusted-host = pypi.org
pypi.python.org
files.pythonhosted.org
find-links = https://pypi.org/simple/
timeout = 30
Expected behavior
The html output of the example field list should have key and value in one single line, _not with value below_.
Your project
Link to your sphinx project, or attach zipped small project sample.
I try to.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment info
Additional context
see tar.gz file.
Since Sphinx-2.0, Sphinx has started to output HTML5 by default. And it converts field lists to definition lists. But, unfortunately, sphinx-rtd-theme does not support it yet. As a workaround, please set html4_writer = True in your conf.py. Then field list is rendered as tables as in the past.
Thanks,
Many thanks. It resolved the issue!
Most helpful comment
Since Sphinx-2.0, Sphinx has started to output HTML5 by default. And it converts field lists to definition lists. But, unfortunately, sphinx-rtd-theme does not support it yet. As a workaround, please set
html4_writer = Truein your conf.py. Then field list is rendered as tables as in the past.Thanks,