Questions tagged [restructuredtext]

reStructuredText is a lightweight markup language intended to be highly readable in source format.

1265 questions
24
votes
5 answers

How can I place images side-by-side in restructured text?

Is there a way to put 2 different images on the same "line", so, side-by side? I know there is the :align: option, but if I put two images, the first with :align: left and the second with :align: right it doesn't work, because the latter is put in…
matteo
  • 4,683
  • 9
  • 41
  • 77
24
votes
2 answers

Italicize text containing a link

I have an RST where I want an italicized link. However, the markup *Warning: `Watch this `_!* renders in HTML as Warning: `Watch this…
Trevor Burnham
  • 76,828
  • 33
  • 160
  • 196
23
votes
2 answers

Use Sphinx autosummary recursively to generate API documentation

I want to use Sphinx's autosummary extension and templates to generate API docs recursively from docstrings. I want separate pages for each module, class, method, property and function. But it doesn't detect my templates at all. In fact, if I just…
Hameer Abbasi
  • 1,292
  • 1
  • 12
  • 34
23
votes
4 answers

symbols in restructuredText

I want to use some symbols in restructuredText; how can I do this? (e.g. → in Markdown yields the "→" symbol as defined in the list of standard HTML character entities -- see also w3c reference) Note: I don't want to require math formula…
Jason S
  • 184,598
  • 164
  • 608
  • 970
23
votes
4 answers

Substitutions inside links in reST / Sphinx

I am using Sphinx to document a webservice that will be deployed in different servers. The documentation is full of URL examples for the user to click and they should just work. My problem is that the host, port and deployment root will vary and the…
Martin Blech
  • 13,135
  • 6
  • 31
  • 35
22
votes
1 answer

How to convert .rst files to .md?

I have a doc as an .rst file, how is it possible to easily and fully convert it to .md? I found a tool named pandoc, but it does not correctly convert the file. It works like pandoc about.rst -s -o about.md Are there any available tools?
Armen Arzumanyan
  • 1,939
  • 3
  • 30
  • 56
22
votes
6 answers

single py file for convert rst to html

I have a blog written in reStructuredText which I currently have to manually convert to HTML when I make a new post. I'm writing a new blog system using Google App Engine and need a simple way of converting rst to HTML. I don't want to use docutils…
linjunhalida
  • 4,538
  • 6
  • 44
  • 64
22
votes
5 answers

Image grid in reStructuredText / Sphinx

I'm using Sphinx to create documentation for a Python project I'm working on. I have three images I would like to display in a 1x3 grid (i.e. all on the same line), and I'm trying to figure out how to do this in reStructuredText. Right now I have ..…
jeremiahbuddha
  • 9,701
  • 5
  • 28
  • 34
21
votes
3 answers

define mark up for generic sphinx admonitions with a specific title

I am using Sphinx to generate HTML documentation for a Python program. I would like to use the generic admonition directive with a specific title and have it marked up in a way I can define, for example like content generated with the note…
equaeghe
  • 1,644
  • 18
  • 37
21
votes
1 answer

Pycharm docstring: code references and docstring inheritance

I'm currently going through my project in Jetbrains Pycharm 2017.1.5, documenting all my python 3.6 classes and methods, and several things stand out to me about the docstring format. I want to link to other methods / functions / classes from some…
Cynadyde
  • 373
  • 3
  • 9
21
votes
5 answers

Working example of floating image in reStructured Text

I'm looking for the best way to have an image with text appearing beside it in reStructured Text. I have found several sites purporting to show how it's done but none show an actual functioning example. Several show what appear to be failing…
Ubuntourist
  • 775
  • 11
  • 26
21
votes
1 answer

How to correctly include other ReST-files in a sphinx-project?

My hand-written documentation/user-guide (written in ReStructuredText with sphinx) has become quite big so I started organize my .rst-files in sub-directories. In the index.rst I'm including a subindex.rst of each sub-directory which itselfs…
Patrick B.
  • 11,773
  • 8
  • 58
  • 101
21
votes
5 answers

Internal hyperlink in reStructuredText with customized text

I know how to create an external hyperlink with customized text. `My cool link `_ But I want to link to an internal reference. .. _foo: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt…
John
  • 935
  • 6
  • 17
21
votes
2 answers

Can't use :ref: with a Label using Sphinx doc

I have a problem with using Sphinx-doc's :ref: role, I put a label above a paragraph and then I try to link to that label from another doc but inside the same project. The label I use in one document: .. _hal_1k_1p: And the ref I try to use to link…
Raiu
  • 315
  • 1
  • 2
  • 6
21
votes
6 answers

Sphinx inline code highlight

I use Sphinx to make a website that contains code samples. I'm successful using the .. code-block directive to get syntax highlighting. But I can't get inline syntax highlighting using this code: .. role:: bash(code) :language: bash Test inline:…
user378147