[Doc-SIG] Re: Docutils: Line block by default

David Goodger goodger at python.org
Sat Oct 11 22:28:22 EDT 2003

Dethe Elza wrote:
 > One more docutils question.  I want to set up an editing environment
 > for my wife to organize her poetry.  How would I go about processing
 > restructured text so that it always behaves as if the line-block::
 > directive is in effect?

Interesting question.  There is no direct support for such
functionality at present.

You could write a script, wrapper (Docutils Reader), and/or makefile
that indents the input text and prefaces it with ".. line-block::".
That's the simplest and most direct solution.

The "include" directive could be extended to support the "line-block"
context with an option like the existing "literal" option.  (In
addition to a new "line-block" context, "parsed-literal" should
probably also be supported.  Perhaps this functionality should be
generalized into a "context" option instead of multiple individual

A new command-line option could be added to give context.  But that
feels too complex.

David Goodger    http://starship.python.net/~goodger
For hire: http://starship.python.net/~goodger/cv
Docutils: http://docutils.sourceforge.net/
(includes reStructuredText: http://docutils.sf.net/rst.html)

More information about the Doc-SIG mailing list