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
57
votes
1 answer

Parsing reStructuredText into HTML

I'm making a framework in which I let developers describe their package using reStructuredText. I want to parse that reStructuredText into HTML so I can show it in a GUI. I'm familiar with the excellent Sphinx, but I've never otherwise parsed…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
54
votes
8 answers

ReST strikethrough

Is it possible to strike text through in Restructured Text? Something that for example renders as a tag when converted to HTML, like: ReSTructuredText
gozzilli
  • 8,089
  • 11
  • 56
  • 87
24
votes
4 answers

Insert a link into bold text in reStructuredText

I try to insert a link into bold text in reStructuredText but failed. This is my rst source: **Lorem ipsum dolor sit amet, `consectetur `_ adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna…
Zeyi Fan
  • 2,213
  • 3
  • 17
  • 19
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
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
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
12
votes
3 answers

How do you install Docutils from the Terminal so that Django admindocs will work?

Docutils is a great package. If you are using Django the admindocs package needs docutils. Instructions are available for installing with a web browser, but what if you are remote and logging in with a terminal over SSH? How to install in that case?…
kd4ttc
  • 1,075
  • 1
  • 10
  • 28
11
votes
0 answers

Creating a node cross-referencing another domain in Sphinx

Within a custom Sphinx domain, I'd like to create a reference to another node in a different domain. For example: .. py:class:: foo.bar Lorem ipsum. .. example:directive:: baz -> foo.bar Sit amet, sit. My example:directive:: says that my…
deceze
  • 510,633
  • 85
  • 743
  • 889
11
votes
4 answers

Conditional toctree in Sphinx

I want to do multiple versions of a documentation, which differ in the sections that are included. To achieve this I would usually use either the only directive or the ifconfig extension. However, I cannot use any of those in combination with the…
11
votes
3 answers

Overriding the default field name limit in sphinx/docutils

I am using sphinx for generating html documentation for a project. I make extensive use of field lists. When generating html, each label/value pair is rendered as a single table row with two cells if the lenght of the label is at most 14…
m000
  • 5,932
  • 3
  • 31
  • 28
10
votes
1 answer

How to automatically generate Python API documentation in PyCharm

I have a Python project in PyCharm and I'd like to automatically generate API documentation (in the form of HTML) from my Python code and docstrings. According to this page, there are a number of tools that generate Python API…
dln385
  • 11,630
  • 12
  • 48
  • 58
8
votes
1 answer

Parsing .rst files with Sphinx-specific directives programmatically

I would like to be able to parse sphinx based rst in Python for further processing and checking. Something like: import sphinx p = sphinx.parse("/path/to/file.rst") do_something_with(p) It seems that something is possible in docutils using the…
8
votes
2 answers

How Do I Suppress or Disable Warnings in reSTructuredText?

I'm working on a CMS in Python that uses reStructuredText (via docutils) to format content. Alot of my content is imported from other sources and usually comes in the form of unformatted text documents. reST works great for this because it makes…
Charles Hooper
  • 2,739
  • 1
  • 19
  • 16
8
votes
2 answers

How to add rst format in nodes for directive?

How I can use rst in nodes? For example I want to output icluded file about.rst class Foo(Directive): def run(self): return [ nodes.Text("**adad**"), # <-- Must be a bold text nodes.Text(".. include::…
uralbash
  • 3,219
  • 5
  • 25
  • 45
7
votes
1 answer

How to generate tabular output in reStructuredText without using RST table format?

I'm trying to migrate our API docs and their proprietary documentation generator schema to reStructuredText. The piece that gives the hardest time is, we have a tabular representation of API details, coded directly in HTML, a…
mrisher
  • 1,062
  • 2
  • 9
  • 15
1
2 3
11 12