Avocet Revisited - Developing the Syntax ======================================== h1. Avocet Revisited I've already worked on Avocet quite a bit: * http://inamidst.com/topic/avocet * http://inamidst.com/proj/avocet/ * http://www.google.com/search?q=site%3Ainamidst.com+avocet But now that I'm more experienced with it, I realise that I only need a subset of its features. Also some of the features sucked, so this is a design document for its development. h2. Headings At the moment, headings are done in either of the following ways: 1)

Example

2) r'^(?!.*\b[a-z]{5,}\b)([A-Z][A-Za-z0-9 ,:;!?-]{,50}[A-Za-z0-9!?])$' 3) Example ======= Alternatives considered now: Avocet Revisited {1} Headings {2} Avocet Revisited ================ Headings -------- h1: Avocet Revisited h2: Headings Avocet Revisited {h1} Headings {h2} I kinda like the {h1} and {h2} end-tagging. I should do a headings survey... $ egrep -Ihor '' * | sort | uniq -c | sort -rn 3188

1897

908

1

1

This might be a good way to do wider HTMLing: Avocet Revisited {title} Or on the other hand, spaces after the heading... Avocet Revisited Headings Quite nice. Or... Avocet Revisited % Headings %% Nah. Oh, I forgot the main method! { Avocet Revisited } {{ Headings }} I rather like that. {h1} Avocet Revisited {h2} Headings § Avocet Revisited §§ Headings {link} {@rel stylesheet} {@href style.css} {Style} style.css h1. Avocet Revisited h2. Headings .h1 Avocet .h2 Headings .1 Avocet .h2 Headings * * * Oh yeah, lists must have more than one entry. Use 0) for auto-numbering? XHTML blocks start with < and end with >. So, block types and detection rules... *Title*: * Must be the first block * Uses === underlining *Unordered list*: * Uses "* " to start at least two lines. *Ordered list*: * Starts with "^0) " and has another "^0) " in it. * Starts with "^1) " and has a "^2) " in it. *Header*: * Starts with r"^h[1-5]\. ". * Contains only one line. *Preformatted*: NO: * First line is "{{{", last line is "}}}"? * First and last lines are "--". This could span blocks. -- This is an example of preformatting. -- Otherwise, it's a paragraph. Which, possibly: *Line break preservation*: * Last line ends with " ". @@ emphasis So the homepage example would be something like this: -- This is a paragraph, with {a link http://example.org/}. * Lists are done like this. * You have to have at least two items! h2. Second Level Heading def code(): print "This will automatically be recognised" print "as a preformatted section." [[[ This is how we do blockquoting. You can do nice citations this way. ]]] — {Example http://example.org/} It's easy to achieve indented verse By ending the last line with a space like so: (Select the block above to see the space. This won't be visible in the output, however! Do two spaces for that.) -- You can also do preformatted sections like this. It makes it a lot clearer than the automatic method. -- If you want to nest preformatting sections, put a space at the end of the -- lines. They'll be trimmed out.
You can even use normal {XHTML http://example.org/xhtml}.
-- Hmm. Not sure about blockquoting... everything else seems so refined. -- This is how we do blockquoting. You can do nice citations this way. —- {Example http://example.org/} _ This is how we do blockquoting. You can do nice citations this way. - {example.org http://example.org/} h2. This is a Test {test}