reStructuredText is a lightweight markup language intended to be highly readable in source format.
Questions tagged [restructuredtext]
1265 questions
16
votes
1 answer
How to create custom directives in Sphinx
I'm currently documenting a rest API written in Python. All the project's documentation is created using Sphinx, and for the REST API I would like to create some special directives. For instance, let's say I have this resource…

Blubber
- 2,214
- 1
- 17
- 26
16
votes
2 answers
How to convert reStructuredText to plain text
I plan to use reStructuredText to write documentation with the main purpose of generating some nice HTML pages. For this I use the docutils rst2html.py tool.
However, I may also need to present the documentation in nice plain text format, that is…
DrZ
15
votes
8 answers
Readthedocs / Sphinx not rendering bullet list from rst file
I have a set of rst files that I am building in readthedocs with sphinx. The files have multiple bullet lists, but they are not being rendered correctly.
The text appears, but there are no bullet symbols or nesting / indentation.
To make sure it was…

FlyingTurbine
- 323
- 2
- 9
15
votes
1 answer
Render output from markdown file inside .rst file
I am using Sphinx for documenting a Python project and would like to have content from an existing .md file display inside of a .rst file.
( I have already set up my conf.py to allow for markdown).
For example, I have a file called tutorial.md. I…

Jared Wilber
- 6,038
- 1
- 32
- 35
15
votes
1 answer
Parent element of nested list is bold?
I am currently using sphinx to create a complete documentation about the python-project i am working on. The two ouput formats are HTML and Latex/PDF.
Whenever i create a nested list, the parent element is rendered bold in both the html page and…

TheBigOlDino
- 188
- 6
15
votes
2 answers
RST: how to present the output of a `tree` command?
I would like to present the output of a tree command in a Restructured Text document. I am using this code:
.. code-block:: bash
project
├── demo.py
├── LICENCE.txt
├── processes
│ ├── area.py
│ └── bboxinout.py
…

Luís de Sousa
- 5,765
- 11
- 49
- 86
15
votes
6 answers
Insert clickable SVG image into Sphinx documentation
I have SVG image file with several nodes each is associated with URL. If I open this file directly in browser I can click on each node and it will open different URLs. However when I use this picture in my Sphinx documentation it doesn't work -…
user2288008
15
votes
3 answers
How do I set up custom styles for reStructuredText, Sphinx, ReadTheDocs, etc.?
I want to extend the theme used by Sphinx and ReadTheDocs with my own custom styles.
What is the best way I can do this so that my changes will stick?

zerobandwidth
- 1,213
- 11
- 18
15
votes
0 answers
List subclasses in Sphinx using autodoc
Is there an autodoc-directive that will list all subclasses of a given class?
If I have the following Python-Code:
class Base(object):
pass
class A(Base):
pass
class B(Base):
pass
Is there a way to generate an Output like:
Classes…

milnet
- 259
- 2
- 8
15
votes
1 answer
How to convert reStructuredText files with images to markdown?
I have rst files containing lines like
.. figure:: examples/foo.png
:scale: 80%
Fig. 1 : Illustration of the awesomeness of stackoverflow
now I want this file to be converted into markdown. I tried using pandoc,
pandoc -s -w rst --toc…

nye17
- 12,857
- 11
- 58
- 68
14
votes
1 answer
Duplicate index warning on sphinx build; How do I include a file without indexing its contents?
I wish to create an single_html.rst file that contains all my class/method/attribute/etc... , but also split categorised symbols into seperate pages.
e.g.
single_html.rst
.. single html
.. include:: foo.rst
.. include:: bar.rst
bar.rst
..…

coderatchet
- 8,120
- 17
- 69
- 125
14
votes
1 answer
Sphinx: Linking to Embedded Binary Files (PDFs)
I'm using sphinx and RST to generate some tech documentation as HTML and having issues getting a local PDF reference to work as a hyperlink. I've seen people use :download: to link to local PDFs, but I'm embedding the PDFs inside a /docs directory…

SliverNinja - MSFT
- 31,051
- 11
- 110
- 173
14
votes
1 answer
The image alignment doesn't work with .rst in github
I have an image that I want to align in README.rst file in github but giving the specs :
.. image:: Logo/PNG/respawn-logo.png
:height: 109 px
:width: 126 px
:scale: 50 %
:alt: respawn
:align: center
doesn't work with the image still…

Scooby
- 3,371
- 8
- 44
- 84
14
votes
2 answers
How do I access a variable in sphinx conf.py from my .rst file?
I'm brand new to Sphinx and reStructuredText.
Inside my Sphinx conf.py I defined:
version = '0.0.2'
Inside of tutorial.rst I want access the version variable and display 0.0.2 in my html file. I tried:
version
|version|
:version:
..…

nu everest
- 9,589
- 12
- 71
- 90
14
votes
9 answers
Is there an intelligent editor for ReST files?
I'm just learning Sphinx, and I need to edit ReST files. Is there an intelligent editor for it? Like, an editor that gives me code coloration, easy indentation, code completion (hopefully), etc.

Ram Rachum
- 84,019
- 84
- 236
- 374