reStructuredText tool support

120,233

Salvaging (and extending) the list from an old version of the Wikipedia page:

Documentation

Implementations

Although the reference implementation of reStructuredText is written in Python, there are reStructuredText parsers in other languages too.

Python - Docutils

The main distribution of reStructuredText is the Python Docutils package. It contains several conversion tools:

  • rst2html - from reStructuredText to HTML
  • rst2xml - from reStructuredText to XML
  • rst2latex - from reStructuredText to LaTeX
  • rst2odt - from reStructuredText to ODF Text (word processor) document.
  • rst2s5 - from reStructuredText to S5, a Simple Standards-based Slide Show System
  • rst2man - from reStructuredText to Man page

Haskell - Pandoc

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read Markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it can write Markdown, reStructuredText, HTML, LaTeX, ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki markup, groff man pages, and S5 HTML slide shows.

There is an Pandoc online tool (POT) to try this library. Unfortunately, compared to the reStructuredText online renderer (ROR),

  • POT truncates input rather more shortly. The POT user must render input in chunks that could be rendered whole by the ROR.
  • POT output lacks the helpful error messages displayed by the ROR (and generated by docutils)

Java - JRst

JRst is a Java reStructuredText parser. It can currently output HTML, XHTML, DocBook xdoc and PDF, BUT seems to have serious problems: neither PDF or (X)HTML generation works using the current full download, result pages in (X)HTML are empty and PDF generation fails on IO problems with XSL files (not bundled??). Note that the original JRst has been removed from the website; a fork is found on GitHub.

Scala - Laika

Laika is a new library for transforming markup languages to other output formats. Currently it supports input from Markdown and reStructuredText and produce HTML output. The library is written in Scala but should be also usable from Java.

Perl

PHP

C#/.NET

Nim/C

The Nim compiler features the commands rst2htmland rst2tex which transform reStructuredText files to HTML and TeX files. The standard library provides the following modules (used by the compiler) to handle reStructuredText files programmatically:

  • rst - implements a reStructuredText parser
  • rstast - implements an AST for the reStructuredText parser
  • rstgen - implements a generator of HTML/Latex from reStructuredText

Other 3rd party converters

Most (but not all) of these tools are based on Docutils (see above) and provide conversion to or from formats that might not be supported by the main distribution.

From reStructuredText

  • restview - This pip-installable python package requires docutils, which does the actual rendering. restview's major ease-of-use feature is that, when you save changes to your document(s), it automagically re-renders and re-displays them. restview
    1. starts a small web server
    2. calls docutils to render your document(s) to HTML
    3. calls your device's browser to display the output HTML.
  • rst2pdf or rinohtype - from reStructuredText to PDF
  • rst2odp - from reStructuredText to ODF Presentation
  • rst2beamer - from reStructuredText to LaTeX beamer Presentation class
  • Wikir - from reStructuredText to a Google (and possibly other) Wiki formats
  • rst2qhc - Convert a collection of reStructuredText files into a Qt (toolkit) Help file and (optional) a Qt Help Project file

To reStructuredText

  • xml2rst is an XSLT script to convert Docutils internal XML representation (back) to reStructuredText
  • Pandoc (see above) can also convert from Markdown, HTML and LaTeX to reStructuredText
  • db2rst is a simple and limited DocBook to reStructuredText translator
  • pod2rst - convert .pod files to reStructuredText files

Extensions

Some projects use reStructuredText as a baseline to build on, or provide extra functionality extending the utility of the reStructuredText tools.

Sphinx

The Sphinx documentation generator translates a set of reStructuredText source files into various output formats, automatically producing cross-references, indices etc.

rest2web

rest2web is a simple tool that lets you build your website from a single template (or as many as you want), and keep the contents in reStructuredText.

Pygments

Pygments is a generic syntax highlighter for general use in all kinds of software such as forum systems, Wikis or other applications that need to prettify source code. See Using Pygments in reStructuredText documents.

Free Editors

While any plain text editor is suitable to write reStructuredText documents, some editors have better support than others.

Emacs

The Emacs support via rst-mode comes as part of the Docutils package under /docutils/tools/editors/emacs/rst.el

Vim

The vim-common package for that comes with most GNU/Linux distributions has reStructuredText syntax highlight and indentation support of reStructuredText out of the box:

Jed

There is a rst mode for the Jed programmers editor.

gedit

gedit, the official text editor of the GNOME desktop environment. There is a gedit reStructuredText plugin.

Geany

Geany, a small and lightweight Integrated Development Environment include support for reStructuredText from version 0.12 (October 10, 2007).

Leo

Leo, an outlining editor for programmers, supports reStructuredText via rst-plugin or via "@auto-rst" nodes (it's not well-documented, but @auto-rst nodes allow editing rst files directly, parsing the structure into the Leo outline).

It also provides a way to preview the resulting HTML, in a "viewrendered" pane.

FTE

The FTE Folding Text Editor - a free (licensed under the GNU GPL) text editor for developers. FTE has a mode for reStructuredText support. It provides color highlighting of basic RSTX elements and special menu that provide easy way to insert most popular RSTX elements to a document.

PyK

PyK is a successor of PyEdit and reStInPeace, written in Python with the help of the Qt4 toolkit.

Eclipse

The Eclipse IDE with the ReST Editor plug-in provides support for editing reStructuredText files.

NoTex

NoTex is a browser based (general purpose) text editor, with integrated project management and syntax highlighting. Plus it enables to write books, reports, articles etc. using rST and convert them to LaTex, PDF or HTML. The PDF files are of high publication quality and are produced via Sphinx with the Texlive LaTex suite.

Notepad++

Notepad++ is a general purpose text editor for Windows. It has syntax highlighting for many languages built-in and support for reStructuredText via a user defined language for reStructuredText.

Visual Studio Code

Visual Studio Code is a general purpose text editor for Windows/macOS/Linux. It has syntax highlighting for many languages built-in and supports reStructuredText via an extension from LeXtudio.

Dedicated reStructuredText Editors

Proprietary editors

Sublime Text

Sublime Text is a completely customizable and extensible source code editor available for Windows, OS X, and Linux. Registration is required for long-term use, but all functions are available in the unregistered version, with occasional reminders to purchase a license. Versions 2 and 3 (currently in beta) support reStructuredText syntax highlighting by default, and several plugins are available through the package manager Package Control to provide snippets and code completion, additional syntax highlighting, conversion to/from RST and other formats, and HTML preview in the browser.

BBEdit / TextWrangler

BBEdit (and its free variant TextWrangler) for Mac can syntax-highlight reStructuredText using this codeless language module.

TextMate

TextMate, a proprietary general-purpose GUI text editor for Mac OS X, has a bundle for reStructuredText.

Intype

Intype is a proprietary text editor for Windows, that support reStructuredText out of the box.

E Text Editor

E is a proprietary Text Editor licensed under the "Open Company License". It supports TextMate's bundles, so it should support reStructuredText the same way TextMate does.

PyCharm

PyCharm (and other IntelliJ platform IDEs?) has ReST/Sphinx support (syntax highlighting, autocomplete and preview).instant preview)

Wiki

here are some Wiki programs that support the reStructuredText markup as the native markup syntax, or as an add-on:

MediaWiki

MediaWiki reStructuredText extension allows for reStructuredText markup in MediaWiki surrounded by <rst> and </rst>.

MoinMoin

MoinMoin is an advanced, easy to use and extensible WikiEngine with a large community of users. Said in a few words, it is about collaboration on easily editable web pages.

There is a reStructuredText Parser for MoinMoin.

Trac

Trac is an enhanced wiki and issue tracking system for software development projects. There is a reStructuredText Support in Trac.

This Wiki

This Wiki is a Webware for Python Wiki written by Ian Bicking. This wiki uses ReStructuredText for its markup.

rstiki

rstiki is a minimalist single-file personal wiki using reStructuredText syntax (via docutils) inspired by pwyky. It does not support authorship indication, versioning, hierarchy, chrome/framing/templating or styling. It leverages docutils/reStructuredText as the wiki syntax. As such, it's under 200 lines of code, and in a single file. You put it in a directory and it runs.

ikiwiki

Ikiwiki is a wiki compiler. It converts wiki pages into HTML pages suitable for publishing on a website. Ikiwiki stores pages and history in a revision control system such as Subversion or Git. There are many other features, including support for blogging, as well as a large array of plugins. It's reStructuredText plugin, however is somewhat limited and is not recommended as its' main markup language at this time.

Web Services

Sandbox

An Online reStructuredText editor can be used to play with the markup and see the results immediately.

Blogging frameworks

WordPress

WordPreSt reStructuredText plugin for WordPress. (PHP)

Zine

reStructuredText parser plugin for Zine (will become obsolete in version 0.2 when Zine is scheduled to get a native reStructuredText support). Zine is discontinued. (Python)

pelican

Pelican is a static blog generator that supports writing articles in ReST. (Python)

hyde

Hyde is a static website generator that supports ReST. (Python)

Acrylamid

Acrylamid is a static blog generator that supports writing articles in ReST. (Python)

Nikola

Nikola is a Static Site and Blog Generator that supports ReST. (Python)

ipsum genera

Ipsum genera is a static blog generator written in Nim.

Yozuch

Yozuch is a static blog generator written in Python.

More

Share:
120,233
Chen Levy
Author by

Chen Levy

Self motivated, autodidact, diligent documenter and a mentor. For as long as I can remember, I always was fascinated by technology. I am a long time #Python and #Linux developer, with experience in #Rust. Working with #Open Source technologies and contributing back. Over the years I filled roles in #systems, #backend and #devops in #storage and #security companies. Worked with #AWS, #Bash, #Docker, #ELK, #Flask, #Git, #PKI, #SQL and much more. I am an #autodidact. Constantly learning new techniques and technologies (such as #async/await, #FastAPI, #Haskell, etc). I also tend to disseminate knowledge: Diligent documentation writer, an experienced and well received instructor, both #mentoring one-on-one and as a public speaker. This is one of the reasons I consider myself one of the lucky few for whom their job is also their hobby and passion. Happiest when coding using Emacs. Successfully completed projects I wrote from scratch as well as took ownership and maintained legacy code. Consumed and designed #APIs (#RESTful and otherwise). I also worked with Networking (#TCP/IP) I am not a stranger to reading RFCs. Done development support work with dynamic languages (#Python, #Perl) and shell scripting (#Bash), created build and deployment systems (#CMake, GNU build tools), designed #CI/CD pipelines (#GitLab-CI, #Jenkins). A long time ago in a galaxy far away I also done some low level development with C/C++ and code migration, writing in both the Linux kernel and user space. Now a days prefer Rust for low level tasks.

Updated on July 08, 2022

Comments

  • Chen Levy
    Chen Levy almost 2 years

    I am a great fan of reStructuredText, however the tools that support it are scattered all over the Internet. The official tool list is incomplete and/or outdated, and can be updated only via commit privileges. For some time there was a comprehensive list at the Wikipedia reStructuredText page, but this apparently "did not meet the notability guideline for web content" and was removed.

    So to put it in a question form: What tool support can one expect to find when working with reStructuredText, e.g. text editors, Wiki software, converters to and from reStructuredText etc.?

  • Rob Allen
    Rob Allen over 13 years
    For PHP, Zeta Components' Document package has good reStructuredText support.
  • Wilfred Springer
    Wilfred Springer almost 13 years
    You might also be interested in having live preview, which is a little like what Markedapp is offering for Markdown documents. It's not a reStructredText tool persé, but I find it really helpful.
  • Shon
    Shon over 12 years
    Via Amy Brown's Comment, I learned you can set Marked.app to render rst by going to preferences>behavior, enabling "custom Markdown Processor", and pointing it to a rst2html.py file.
  • theta
    theta over 11 years
    Time will make this answer also outdated. I checked just couple of suggestions, like PYK and RIP, which can't run on today systems as they depend on outdated modules, so...
  • sharat87
    sharat87 about 11 years
    All three links under Web Services appear broken.
  • Jan Vlcinsky
    Jan Vlcinsky about 11 years
    I added link to vim addon riv.vim, which to me provides what I was looking for for long time. github.com/Rykka/riv.vim
  • Chen Levy
    Chen Levy about 11 years
    @Shrikant Shara, I removed the section. Thanks.
  • blobmaster
    blobmaster almost 11 years
    Kate (the KDE text editor) has somme support for higlighting of RestructuredText. I was looking for something specific but it was already installed on y pc :)
  • Peterino
    Peterino almost 10 years
    Please note for Gedit: I've updated the plugin to make it work on the latest Ubuntu. It's now using WebKit for rendering as gtkhtml2 is not supported / available any longer. Unfortunately, the link in the list above points to the outdated project and repo. Use github.com/bittner/gedit-reST-plugin instead.
  • Midas
    Midas over 9 years
    Leo link is dead, plus the user defined language for Npp links to FreeMarker?
  • buhtz
    buhtz almost 9 years
    What is about Live-support? I want to see live how my rst-code would be rendered.
  • ChrisChinchilla
    ChrisChinchilla over 8 years
    After some initial tweaking and set-up, Atom also works well with RST preview and editing :)
  • Shira
    Shira over 7 years
    Added RSTPad, my own creation :)
  • Javier
    Javier over 6 years
    Your answer is amazing! The sourceforge links are not working. These reference was helpful to me: hyperpolyglot.org/lightweight-markup
  • tanzeem
    tanzeem over 5 years
    Great Information. But I need to create headers as in LibreOffice using restructure text. How can I do it. I use restructuredtext then I do rst2odt.