reStructuredText is a lightweight markup language intended to be highly readable in source format.
Questions tagged [restructuredtext]
1265 questions
0
votes
1 answer
Convert scipy docstrings (reST) to HTML using docutils
I'm designing a filter design GUI and would like to display docstrings from Python's scipy.signal in a QTextBrowser, requiring HTML format. I think docutils should do the job for me and I tried
from docutils.core import publish_string
from…

Chipmuenk
- 607
- 1
- 7
- 22
0
votes
1 answer
enable markdown syntax highlighting in code comments/docs
There are great in-code documentation standards for python, for example:
Google
Numpy
Which use some nice, simple ReStructured / Markdown like syntax. Is there a way to have emacs render ReST / Md inside the comments of python code? I.e. the…

DilithiumMatrix
- 17,795
- 22
- 77
- 119
0
votes
2 answers
Resume list numbering after class
I have a restructured text enumerated list, which I export to HTML with rst2html:
#. My first point
#. My second, very important point
#. My third, very important point
#. My fourth point
I would like to highlight the second and third point, which…

gozzilli
- 8,089
- 11
- 56
- 87
0
votes
0 answers
How to remove anchor tag around rescaled images in readthedocs site?
I use an alias without any width or height modifiers to display an image:
.. |downloads_png| image:: assets/index/downloads_v2.png
This image is rendered correctly, without any decoration.
I add a height modifier to resize this image:
..…

Alex Reynolds
- 95,983
- 54
- 240
- 345
0
votes
0 answers
Shortcut for a chunk of rest code
In sphinx I want to have a command, which would expand differently depending on withter I'm making an html build or a latex build. Example:
.. |noindent| replace::
.. only:: latex
.. raw:: latex
\noindent
.. only:: html
…

Adobe
- 12,967
- 10
- 85
- 126
0
votes
1 answer
How to make reStructuredText renderer on server, which does it just-in-time by accessing via browser?
I have some docs in rst format and want to share it like simple html pages via apache. The best tool for rendering - rst2html from python-docutils. But, I still don't know how to put these all things together.
So, if I type in browser uri like this:…

Sergius
- 908
- 8
- 20
0
votes
1 answer
Prevent escaping of special characters in LaTeX output
By default the LaTeX output generated by Sphinx escapes the LaTeX markup. So if I write:
Normal text
.. only:: latex
\textbf{latex only text}
After a make latexpdf call it will be
Normal text
textbf\{latex only text\}
in LaTeX. So all chars…

Adobe
- 12,967
- 10
- 85
- 126
0
votes
1 answer
Insert figure directive in table in docutils
I am trying to make a table with some figure inside. I am asking if there is a possibility to do it in Docutils or in some other markup languages. I was trying this kind of table…

Enrico Pirani
- 1,387
- 3
- 13
- 22
0
votes
0 answers
How link to a title in another document?
I would like to link from within document A to Some Title in document B.
I know that I can do this within document B via 'Some Title'_
I know that I can reference document B from document A via :doc:'B'
Is there a way to combine both? (I tried…

WoJ
- 27,165
- 48
- 180
- 345
0
votes
1 answer
How to use docutils to convert .rsts to htmls?
I downloaded a util(cmake,actually) tar,and it's doc was written as .rst files with structure like blow.After googling,I know docutils(a python package) can convert these files to htmls,so installed it ,but I can't find a way to to do it?please tell…

Alex Luya
- 9,412
- 15
- 59
- 91
0
votes
1 answer
Using pandoc to convert html to rst strips the newlines from the pre block
For example, when I conver the following page: https://developers.google.com/edu/python/strings
s = 'hi'
print s[1] ## i
print len(s) ## 2
print s + ' there' ## hi there
becomes
.. code:: prettyprint
s = 'hi' print s[1] …

Forethinker
- 3,548
- 4
- 27
- 48
0
votes
1 answer
reStructuredText lists with custom enumerator
Consider the item "2-3)" in the "Complexity" list on http://en.cppreference.com/w/cpp/container/vector/vector. How could I achieve the same thing in reStructuredText/Sphinx?
The closest I got was writing
| 1) ...
| 2-3) ...
| 4) ...
but this…

gTcV
- 2,446
- 1
- 15
- 32
0
votes
1 answer
Special Characters in Hyperlinks - Sphinx
Suppose, I want to link "http://www.google.com" with the text Search & Learn. How do I use that in Sphinx ?
E.g. text : Now you can `Search & Learn`_.
.. _Search & Learn: http://www.google.com doesn't work as there's & in the text.

Kevad
- 2,781
- 2
- 18
- 28
0
votes
0 answers
restructuredText How to include attributes inside a div
Let's say I need something like this:
blah
How do I add rel and target in my rst file?

trevor
- 404
- 5
- 14
0
votes
1 answer
Prevent section heading to subtitle transformation in reStructuredText
In reStructuredText, a heading followed by a lower-level heading is read as a subtitle:
Section 1
=========
Subtitle
--------
However, what if I actually want a subsection heading to follow immediately after a section heading? According to the the…

smheidrich
- 4,063
- 1
- 17
- 30