Questions tagged [docutils]

a general purpose document processing system written in Python.

Docutils is an open-source text processing system for processing plain text documentation into useful formats such as HTML, LaTeX, man-pages, open-document or XML. It includes the markup language.

The Docutils homepage may be found here.

180 questions
0
votes
1 answer

How to get inline code ending with spaces with docutils/sphinx?

The following rST directive doesn't support trailing spaces: :code:`foo ` Example: >>> from docutils import core >>> whole = core.publish_parts(""":code:`x `""")['whole'] :1: (WARNING/2) Inline interpreted text or phrase reference…
nowox
  • 25,978
  • 39
  • 143
  • 293
0
votes
1 answer

Include arbitrary files in RST

The DocUtils include directive allows the inclusion of arbitrary text into an RST document. The problem is that the implementation restricts the specified files to be in the same document as is the location of the included file. This makes the use…
Jonathan
  • 2,635
  • 3
  • 30
  • 49
0
votes
2 answers

Sphinx / reST: Multiple anonymous explicit external links in the same paragraph

How can I create two separated external links in the same paragraph, i.e. something like: for pytorch click `here `_ and for tensorflow click `here `_ that show as the following for pytorch click…
0
votes
1 answer

Reference a custom figure type in Sphinx

If I try to reference a custom figure class class MyFigure( sphinx.util.docutils.SphinxDirective, docutils.parsers.rst.directives.images.Figure ): pass def setup(app): app.add_role('fig', MyFigure) Then use it like .. fig::…
askaroni
  • 913
  • 5
  • 10
0
votes
2 answers

Is it possible to reconcile github and docutils buildhtml?

Github will parse a reStructuredText file if its extension is .rst. The docutils buildhtml.py will only parse files with the extension .txt, and I can't see an option to change that. This is massively annoying. Is there any way to get Github to…
Joe
  • 46,419
  • 33
  • 155
  • 245
0
votes
1 answer

Sphinx hyperlink: non-whitespace before opening backtick

My hyperlinks aren't detected if there is a '/' char or a letter (eg 'V') immediately before the opening backtick. Is there a workaround for this which doesn't introduce whitespace?
JasonPlutext
  • 15,352
  • 4
  • 44
  • 84
0
votes
1 answer

An exception occured when trying append "pending_xref" node to signode

I'm trying append pending_xref node to signode of handle_signature function, but getting exception in docutils script: Exception occurred: File "\python\python37-32\lib\site-packages\docutils\nodes.py", line 569, in __getitem__ return…
madTeddy
  • 31
  • 1
  • 6
0
votes
0 answers

Import sphinx module into python

I would like to serve on a flask server an html page with reStructuredText using the sphinx readthedocs theme, rendered on-the-fly from an rst file. How can I import sphinx as a python module, and then use it together with the readthedocs theme and…
Christian
  • 527
  • 6
  • 19
0
votes
1 answer

Unable to start rst2html5slides after installation

We are using Powerpoint and Restructured Text together with Python-Sphinx. I was asking myself, if it is possible to create slides using ReST. I found the interesting Tool rst2html5slides on…
Aleph0
  • 5,816
  • 4
  • 29
  • 80
0
votes
1 answer

Use sphinx within a serverless model

I am currently using sphinx to automatically generate my documentation site from ReStructuredText files within a bitbucket repo. This is of course all managed/hosted internally but I have been thinking more and more about whether I could switch this…
0
votes
1 answer

How to use docutils to create HTML from reStructuredText?

I have written simple program to convert reStructuredText to html from docutils.core import publish_string input_string = ("Heading\n" "=======\n" "\n" "1. With 24 widgets pull a **long** one;\n" …
Psionman
  • 3,084
  • 1
  • 32
  • 65
0
votes
0 answers

python : NameError: name 'StandardError' is not defined running kivy app

I have created an app in android using kivy and buildozer. Without rst module the app runs ok, but when I use rst in the app I got the following error: 01-30 13:42:04.676 5746 5823 I python : File…
apolinux
  • 312
  • 3
  • 9
0
votes
1 answer

rst2html on full python project

How can I configure rst2html to run on a full Python project instead of a single file? I'm used to epydoc generating my docs, but thinking to use reStructuredText because it's PyCharm default (I know we as well could change PyCharm to epytext)
El Dude
  • 5,328
  • 11
  • 54
  • 101
0
votes
1 answer

Using rst2html5.py to get html body only

With rst2html5.py foo.rst --math-output=MathJax > foo.html where foo.rst is e.g. The area of a circle is :math:`A_\text{c} = (\pi/4) d^2`. .. math:: \frac{ \sum_{t=0}^{N}f(t,k) }{N} I get back a standalone html page foo.html. What if…
mjandrews
  • 2,392
  • 4
  • 22
  • 39
0
votes
0 answers

how to convert .rst files to .ipynb(.ipnb) and .py?

There is a known way of converting .ipnb files to .rst with docutils, but could we convert .rst files in .ipnb, .py? Please, provide an example, if possible.
WebComer
  • 1,131
  • 2
  • 19
  • 31
1 2 3
11
12