This page discusses the rst3 and ipython plugins.

The rst3 plugin

The rst3 plugin creates formatted output files from Leo outlines containing reStructuredText (rST) a text markup language. For full information about this plugin, see Chapter 14.

With the rst3 plugin, you can organize book-length restructured text input using outlines. Indeed, all of Leo's users guide was created using the rst3 plugin. Besides the natural organization qualities of Leo's outlines, the rst3 plugin provides two other important features:

  1. The rst3 plugin will generate the chapter, section, subsection, etc. headings automatically based on headlines. There is no need to create reStructuredText headings by hand. This is a major convenience: the rst3 plugin will recompute markup for headings as you reorganize nodes.
  2. You can specify rst3 options on a node-by-node basis. These options control how text is formatted. For example, you can choose to ignore or honor Leo directives, or to treat rST text as code or normal documentation.

The ipython plugin

Leo's ipython plugin provides two-way communication (a bridge) between Leo and IPython: you can run Leo scripts from IPython, and IPython scripts from Leo. For full details of this plugin, see Chapter 21.

To use this plugin, you must run Leo from a console window. When this plugin is enabled, Leo's start-ipython command starts IPython in this console.

You can run any IPython_ script from Leo. Within Leo, the statement:

ip = IPython.ipapi.get()

assigns ip to the _ip variable within IPython. The ip variable allows scripts running in Leo to do anything that an IPython script can do.

You can run any Leo script from IPython_. When the ipython plugin is running, IPython scripts access Leo's c and g objects as follows:

c,g = _leo.c, _leo.g

As usual, the c and g variables allow IPython scripts to do anything that a Leo script can do.