Place to discuss enhancement of StructuredText.
The StructuredTextNG class has been incorporated into Zope 2.6, and many parts of ZWiki are working around older bugs in the original StructuredText (as well as bugs/feature additions to StructuredTextNG). These issues are discussed on StructuredText, StructuredTextDiscussion, TextFormattingSurprises, WellUnderstoodProblems, and StructuredTextProblems, IssueNo0692?, and my TODO page.
I propose the following enhancements
- Acually create a subclass of DocumentClass?, HTMLClass?, and StructuredTextMarkup? (all in /usr/lib/zope/lib/python/StructuredText) of StructuredTextNG.
- This makes adding the img extension trivial
- This means escaping can be universal (fixing i.e. http://zwiki.org/StructuredTextProblems#msg20030919080057-0700@zwiki.org)
- Further extensions (such as LaTeX?) become easy to implement and don't conflict with existing escaping (such as the colon-colon example mode).
- Implement an escaping mechanism:
- exclamation point to escape blocks that would be "colored" (in the lingo of STNG)
- backslash to escape individual markup characters "*", "'", "!", etc. (this is compatible with LaTeX?)
- Identify, and ignore HTML tags. ZWiki currently marks up things inside tags, which can destroy the document.
- Make the output valid XHTML. Currently mixing HTML with STX can easily create an non-valid XHTML document.
- Create a LatexClass? that creates LaTeX? from a STX document (i.e. print this page -- useful mostly for LatexWiki)
- Absorbs Regexps.py into these new classes.
- Removes many regexes from ZWiki (i.e. , <zwiki>...</zwiki>, etc) which should speed document processing.
I've been wrestling with individual rendering errors from STX for a while, and decided biting the bullet and really fixing STX is the way to go.
(new) --Simon Michael, Tue, 06 Apr 2004 14:09:08 -0700 reply
many parts of ZWiki are working around older bugs in the original StructuredText
Not all that many surely.. should be localised in one or two places
This makes adding the img extension trivial
We support this
Identify, and ignore HTML tags. ZWiki currently marks up things inside tags, which can destroy the document.
It generally doesn't. Have you found some tags that defeat the (monstrous but effective) dtmlorsgmlexpr ?
I've been wrestling with individual rendering errors from STX for a while, and decided biting the bullet and really fixing STX is the way to go.
I agree with you here. Re-using an existing standard formatting system brought benefits early on. But it seems a unified, purpose-built system handling all our markup and formatting could be much more featureful, reliable, simpler and I'd love to see it. Ideally it would be done in a way that can still support separate formatters, such as standard STX, RST, etc. when they are preferred.
So far I've been put off by the amount of work involved. I have wondered if Zwiki's likely useful lifespan justifies it. At the moment I think it does. Also I don't know how to do it. :) I have looked at more advanced wiki engines (SmallWiki?) for ideas; I'm not sure if that approach (store formatted text as structures of live objects) is the right one for us. Some kind of flexible rendering pipeline seems like a good idea as well, I suspect some other engine does that well and we should look for ideas.
property change -- Sun, 30 Jan 2005 08:47:52 -0800 reply
Category: user-pagetypes => user-editing-stx
... --betabug, Wed, 21 Feb 2007 08:28:31 +0000 reply
Name: #776 darcy
=> #776 StructuredText Enhancement
Category: user-editing-plaintext => user-editing-stx
Severity: funded => wishlist