|
From: David G. <go...@us...> - 2002-07-03 01:47:20
|
Adam Chodorowski wrote:
> Is there any plan for adding a "tree" construct to reST? It would be
> very useful for many things, for example displaying directory
> trees. You could use the following syntax (if it isn't ambigous, I
> don't know...):
>
> + Root
> +- Child 1
> | +- Grandchild 1.1
> | +- Grandchild 1.2
> +- Child 2
No plans; this is the first request I've seen. The syntax as given
*is* ambiguous: the "+" looks like a bullet. It could easily be made
unambiguous though (for example, use "+-" throughout).
What's the difference between a tree and a nested list? You could
simply represent it like this:
+ Root
+ Child 1
+ Grandchild 1.1
+ Grandchild 1.2
+ Child 2
The list has a little more vertical space, but contains the same
information.
Literal blocks (ASCII art) would be an easy way to get started.
Depending on what processing ought to be done to the tree, this
may be an adequate solution.
Some preliminary questions to answer: What's the internal/XML
representation to be? What should output look like (HTML, for
example)? Do you know of any precedent or useful references?
If it is important to you, I'd say start with a directive. I'd be
glad to help you get started.
--
David Goodger <go...@us...> Open-source projects:
- Python Docutils: http://docutils.sourceforge.net/
(includes reStructuredText: http://docutils.sf.net/rst.html)
- The Go Tools Project: http://gotools.sourceforge.net/
|