MeatballWiki |
RecentChanges |
Random Page |
Indices |
Categories
Visualization
As described in SimpleTextFormatting, Ward in the original Wiki needed a subset of HTML to allow simple text to be converted to have
ParagraphFormattingRules are associated with the formatting for the entire paragraph, as well as additional types of paragraph-like structures such as quotation, indentation, ordered and unordered lists.
Problem
HTML elements.
A simple set of text markup is needed to represent various types of paragraph formatting markup that can converted to html.
Solution 1: Ward's Wiki
As described in [WikiBase Text Formatting Rules] there are basically 6 ParagraphFormattingRules:
- Normal paragraphs: A normal paragraph begins after a blank line, with the text of the paragraph beginning at the start new line, and should not be indented with spaces or tabs. Any newlines in the text will be ignored unless the there is a blank newline which starts a new paragraph.
- Monospace paragraphs: Any text indented by one or more spaces will be considered a monospace paragraph. Any newlines will be preserved until a different type of paragraph.
- Unordered list paragraphs: An asterisk after a new line begins an indented bullet item. Up to four asterisks can be used for deeper indenting.
- Definition paragraphs: A tab after a new line, a term followed by a colon, and another tab. This results in a definition paragraph.
In addition, there are two others:
- Indented paragraph: Technically this is a hack using definition paragraphs, it is tab after a new line, a space, a colon, and another tab.
- Ordered list paragraphs: This apparently was supported but now discouraged. It isn't documented anymore.
Issues 1: Ward's Wiki
The choice of blank lines to separate paragraphs, and to ignore most newlines was excellent, and so far has been preserved by all Wiki variants that I've surveyed below.
The choice of using indentation for monospaced paragraphs has not been as successful, as quite a few variants have chosen other methods. I believe that the most significant problem is that there are issues of line endings (in Ward's wiki you have to force your line breaks), and there is some confusion as to whether you should allow wiki markup (in particular links) inside monospaced paragraphs.
The choice of asterisks after new lines for unordered lists (bulleted lists) works fairly well, and is used by a number of wikis. Some of the issues are that "**** List Item" seems more prominent then "* List Item*, and that mixing types of lists doesn't work very well (i.e. *#* which is supported by SocialText).
Ward's choice of newline tab TERM colon tab for both definition lists and for blockquote indentation has been the least successful, and I've found no other wiki variant that supports it. However, this is a difficult problem as evidenced that almost every wiki variant has found a different solution to the problem. I think the biggest issues with Ward's first choice here is that tabs don't work well in text_areas -- most browsers will not allow you to enter tabs into text areas, forcing you to do space to tab tricks with Ward's Wiki. In addition, Ward's techniques handled only one level of depth -- suitable for definition lists (I've only seen one Wiki so far that supports level 2 def lists) but for indentation multiple depths are important.
I'm not sure why Ward deprecated ordered lists. My guess is that he originally used newline # as that is what other early wiki variants used. The issues with newline # with ordered lists are similar to that of unordered lists.
Almost every wiki variant has added some additional ParagraphFormattingRules, in particular, tables and a way to stop the interpretation of wiki formatting.
References
WikiSyntax WikiMarkupStandard
Unintegrated Comments
Peter Thoeny of TwikiClone wrote me to say "On the syntax (of unordered lists), " *" is inherited from JosWiki, the granddaddy of TWiki."
Survey of Paragraph Formatting Rules
- Paragraphs & Line Breaks
- Newlines have no effect, but empty lines starts new paragraph
- Indented Paragraphs, proportional/non-monospaced (blockquotes)
- tab space colon tab
- colon at beginning of line, quantity of colons increases indent
- greater-than symbol > at beginning of line, quantity of colons increases indent
- two or more whitespace at beginning of line, quantity of spaces increases indent
- whitespace indentation, any increase of whitespace indentation increases indent level
- curly brace quote before and after {quote}Citation{quote}
- colon space colon, with multiple first colons for deepness : :text
- ->, with multiple hyphens for deepness
- HTML <blockquote>
- Monospace Paragraphs
- Indent with one or more spaces
- Indent with one or more spaces or tabs
- ENDIF (?)
- {{{monospaced paragraphs}}}
- Deeper indented paragraphs, of paragraphs ending in the word "example" or "examples", or two colons :: are treated as example code
- newline space bracket equal [=monospaced paragraphs=]
- <verbatim></verbatim> tag (also stops all wiki tags and escapes all html entities and formatting)
- HTML <pre> tag
- Forced Line Break
- Not Available
- double backslash \\
- double square bracket double less then [[<<]]
- %BR%
- [[BR]]
- HTML <br>
- Joining Lines
- Not Available
- Line ending in \ has next line appended to it before other formatting occurs, and \ not displayed
- No Wiki Formatting
- <nowiki>ignore any wiki markup</nowiki>
- bracket equals [=ignore any wiki markup=]
- <noautolink>text</noautolink>
- <verbatim>ignore all markup, including html markup, special chars, etc. until </verbatim>
- HTML <pre>
- <nop> to skip processing on next word
- Unordered Lists
- Asterisks at beginning of new line, quantity asterisks signifies deepness
- Asterisks at beginning of new line, quantity asterisks signifies deepness, mixed nesting allowed (*#*)
- Asterisks at beginning of new line, quantity asterisks signifies deepness, mixed nesting allowed (*#*), multiple lines allowed but must /* to escape back a level
- Three spaces and an asterisk, prefix additional 3 spaces for deepness
- Whitespace after new line then asterisk. Subsequent lines with more whitespace and an asterisk will be deeper.
- New Lines begining with -, * or o at beginning of paragraph
- New Lines beginning with - or *
- Ordered Lists
- Not Available
- WikiBase (apparently was once available, but now deprecated)
- Pound symbols (#) at beginning of new line, quantity of pound symbols signfies deepness
- Pound symbols (#) at beginning of new line, quantity of pound symbols signfies deepness, mixed nesting allowed (*#*)
- Pound symbols (#) at beginning of new line, quantity of pound symbols signfies deepness, mixed nesting allowed (*#*), multiple lines allowed but must /# to escape back
- Three spaces and a number (0-9), prefix additional 3 spaces for deepness
- New Line or New Line with whitespace, begining with number " 1" or sequence of letter or numbers followed by a periods " A." "1.1.3" Subsequent lines with more whitespace and a number will be deeper.
- Whitespace after new line then number or single letter followed by a period " 1." " A." Subsequent lines with more whitespace and a number will be deeper.
- First text after newline is a number or letter 1. or a. = first indent, 1.1 or a.a = second indent, etc.
- Definition Lists
- newline tab TERM colon tab DEFINITION
- newline semicolon TERM colon DEFINITION
- newline three spaces TERM colon DEFINITION (use for multi-word terms)
- newline TERM colon newline DEFINITION
- newline whitespace TERM colon colon DEFINITION
- newline TERM whitespace hyphen hyphen whitespace DEFINITION
- newline colon TERM colon DEFINITION (multiple initial colons do deeper defs)
- Tables
- Not Available
- Pipes + options
- Double pipes + options
- Curly Braces + pipes {item1|item2}
- ASCII tables with pipes and lines of underlines
- Like Def lists, but with pipes at end
- HTML Tables
CategoryWikiFeatureSurvey CategoryTextMarkup CategoryWikiDesignPatterns