Questions tagged [restructuredtext]

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

1265 questions
14
votes
3 answers

Some online tool or automation plugin for SublimeText for generating Sphinx RST tables

I am using Sphinx for documentation. I would like to easily genearate based e.g on CSV file or copy-paste text the table like shown here: reStructuredText Tables. +------------------------+------------+----------+----------+ | Header row, column 1 …
andilabs
  • 22,159
  • 14
  • 114
  • 151
14
votes
2 answers

sphinx add a page break in my pdf with latexpdf?

I generate a documentation from rst to pdf with latexpdf and sphinx. How can I add some page break (=new page) in my PDF? For now I use PageBreak but it only work with rst2pdf. .. raw:: pdf PageBreak
Guillaume Vincent
  • 13,355
  • 13
  • 76
  • 103
14
votes
0 answers

Are there any reStructuredText to HTML parser(or library, perhaps?) written in JavaScript

I have an Android app which should be able to display reStructuredText as HTML inside WebView. It already has support for few other markups using javascript libraries. As far as I know, there is no javascript implementation of reStructuredText yet.…
Kuitsi
  • 1,675
  • 2
  • 28
  • 48
14
votes
5 answers

How to handle two dashes in ReST

I'm using Sphinx to document a command line utility written in Python. I want to be able to document a command line option, such as --region like this: **--region** in ReST and then use Sphinx to to generate my HTML and man pages…
garnaat
  • 44,310
  • 7
  • 123
  • 103
14
votes
3 answers

Specifying anchor names in reST

I'm creating HTML from reST using the rst2html tool which comes with docutils. It seems that the code already assigns id attributes to the individual sections, which can be used as fragment identifiers in a URL, i.e. as anchors to jump to a specific…
MvG
  • 57,380
  • 22
  • 148
  • 276
14
votes
1 answer

Applying CSS and roles for text blocks instead of inline spans in Sphinx

There is a previous question that explains how to add a color span to some reStructuredText. To recap the procedure: First, you have the role. .. role:: red An example of using :red:`interpreted text` It translates into as follows.

An example…

jmq
  • 10,110
  • 16
  • 58
  • 71
14
votes
1 answer

Github: Wiki page title from markup not filename/web client

Is there a way in github to have a wiki's title be based on the markup? I have found another project using markdown that has the title for Home.md wiki page come from the file. The author could have also used the web interface and made the title…
djhoese
  • 3,567
  • 1
  • 27
  • 45
13
votes
1 answer

View reStructuredText (Sphinx) docstrings in iPython?

Is there a way to have IPython fully render reStructuredText (for Sphinx) docstrings when you type the following: help foo or: foo? I find it super distracting to try to read help docs in IPython when it shows the raw markup. reST is great for…
jkmacc
  • 6,125
  • 3
  • 30
  • 27
13
votes
3 answers

Embedding HTML in restructured text on PyPi package pages

In Sphinx I know that you can do it: .. raw:: html
In pypi, is there some…
Goin
  • 3,856
  • 26
  • 44
13
votes
4 answers

Using reStructuredText to add some HTML with custom "id" and "class" attributes

Using rsStructuredText to generate HTML, I am trying to wrap a paragraph with an extra div element. The must contain an "id" attribute with a value I assign. Also, the must have a "class" attribute with "editable" value. This is what I have so…
nabucosound
  • 1,283
  • 1
  • 12
  • 23
13
votes
1 answer

sphinx severe: unexpected section title -- arbitrary headings in function docstring

Using autodoc and similar tools allows one to compile documentation from source docstrings. It doesn't however, seem to allow arbitrary ReST section titles in function or class docstrings, and produces the error: SEVERE: Unexpected section title. I…
user2561747
  • 1,333
  • 2
  • 16
  • 39
13
votes
1 answer

How to format Django views' docstring

I use simple views in my project, and now my project begin to be bigger, I'm writing a sphinx doc and use objects docstrings with sphinx.ext.autodoc for inclusion. My trouble is: How to greatly format view's docstring ? Document GET/POST and more…
Zulu
  • 8,765
  • 9
  • 49
  • 56
13
votes
3 answers

python rtype docstring/restructured text for class factories/selectors

:rtype: specifies that this is the type of the returned object. Therefore, when I create the object obj in the following snippet I receive a warning from the IDE that cls is not callable, since the IDE expects that cls is object of type…
Tigra
  • 2,611
  • 20
  • 22
13
votes
1 answer

Custom Syntax Highlighting with Sphinx

I am interested in creating a custom syntax highlighter that can be used in a Sphinx environment. Is this possible? If so how would I go about doing it?
sean9898
  • 343
  • 3
  • 13
13
votes
3 answers

Have Emacs edit Python docstrings using rst-mode

How to I get Emacs to use rst-mode inside of docstrings in Python files? I vaguely remember that different modes within certain regions of a file is possible, but I don't remember how it's done.
asmeurer
  • 86,894
  • 26
  • 169
  • 240