docutils Questions
2
Solved
I want to parse .rst files to .html files on the fly to display as a webpage. I'm using pyramid, and I haven't found any quick help on how to use docutils inside python code and make it write to a ...
5
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, ...
Heliometer asked 21/2, 2013 at 12:7
2
My question is a follow up to How to parse restructuredtext in python? where @mbdevpl provided code for parsing the file into a tree and doing some processing on the tree.
I want to autoformat Pyth...
Acrobatics asked 24/2, 2021 at 14:44
3
Solved
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 identif...
Astigmatic asked 30/11, 2012 at 8:39
5
Solved
I know how to create an external hyperlink with customized text.
`My cool link <http://www.asdf.com>`_
But I want to link to an internal reference.
.. _foo:
Lorem ipsum dolor sit amet, cons...
Kulp asked 11/4, 2016 at 4:12
4
Solved
I try to insert a link into bold text in reStructuredText but failed.
This is my rst source:
**Lorem ipsum dolor sit amet, `consectetur <http://www.example.com>`_
adipisicing elit, sed do...
Reichert asked 10/3, 2012 at 9:23
8
Solved
Is it possible to strike text through in Restructured Text?
Something that for example renders as a <strike> tag when converted to HTML, like:
ReSTructuredText
Incrassate asked 29/6, 2011 at 9:56
3
Solved
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 wi...
Pashm asked 7/7, 2012 at 17:54
2
Solved
Using the Sphinx "TODO" Directive example I would like to reference the todo instances embedded within a .rst file. For example, if the .rst file content contains:
.. todo:: foo
.. todo:...
Upheave asked 30/9, 2020 at 22:57
2
Solved
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 docum...
Chaumont asked 31/10, 2010 at 3:48
1
I'm having trouble cross-referencing a section generated by a custom directive.
Here is the directive:
from docutils import nodes
from docutils.parsers import rst
class TestDirective(rst.Direct...
Caulescent asked 22/4, 2020 at 15:59
3
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...
Superorganic asked 23/10, 2012 at 11:13
1
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 numb...
Tremayne asked 27/6, 2016 at 22:40
3
Solved
Say I have the following reST input:
Some text ...
:foo: bar
Some text ...
What I would like to end up with is a dict like this:
{"foo": "bar"}
I tried to use this:
tree = docutils.core.pu...
Resnatron asked 26/5, 2012 at 13:18
2
Solved
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("...
Debbee asked 18/12, 2015 at 7:55
1
Solved
How can I traverse each of the section names of a document in Sphinx?
(and where is the documentation for docutils? It is maddeningly difficult to find anything useful beyond the Sphinx Applicatio...
Sagacious asked 26/8, 2016 at 17:45
0
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
S...
Graner asked 6/6, 2016 at 4:19
2
Solved
As far as I can tell, it is not possible to create a literal text block (e.g. with the code-block directive) that starts or ends with a blank line, because this would be ambiguous with regard to th...
Indies asked 2/12, 2015 at 18:14
3
Solved
Here's a simple reST snippet:
deleting this line causes all subheadings to be rendered as h1 tags
I should be an h1
=================
I should be an h2
-----------------
foo
I should also be a...
Septuagint asked 8/3, 2012 at 14:8
1
Solved
I'm trying to use the docutils package to convert ReST to HTML. This answer succinctly uses the docutils publish_* convenience functions to achieve this in one step. The ReST documents that I want ...
Budde asked 23/8, 2015 at 13:53
2
Solved
I've gotten lost in an edge case of sorts. I'm working on a conversion of some old plaintext documentation to reST/Sphinx format, with the intent of outputting to a few formats (including HTML and ...
Model asked 8/7, 2015 at 21:53
2
Consider a reStructuredText document with this skeleton:
Main Title
==========
text text text text text
Subsection
----------
text text text text text
.. my-import-from:: file1
.. my-import-fr...
Parity asked 3/1, 2014 at 20:50
1
Solved
Is there a way to achieve the following?
Source is a single .rst file where the translation in multiple languages coexist
Generate web page renditions per language (in .html files preferably).
T...
Matthew asked 2/4, 2014 at 22:14
1
Solved
I'm trying to figure out if there's a way to nest Sphinx extension directives. I have a few custom node types that are working great, but I'd like a little more flexibility in the HTML I'm generati...
Sattler asked 23/5, 2013 at 17:2
3
Solved
I want to take the following restructured text snippet that contains a substitution definition:
text = """
|python|
.. |python| image:: python.jpg
"""
And resolve the definitions so the substi...
Vo asked 9/3, 2013 at 15:29
1 Next >
© 2022 - 2024 — McMap. All rights reserved.