Wiki Markup Language
Wikis have developed their own
simple markup language, to provide accessibility to everyone by not requiring them to learn
HyperTextMarkupLanguage.
With the impending advent of
UseMod 1.0 and the large number of
WikiPatches that are candidates for inclusion it is time for some discussion on this.
See Wiki:MarkupLanguage for some interesting comments on this. The reality is that whatever you call it there are conventions and rules about the way we do things around here - see ours at TextFormattingRules. Further it seems that one of the differentiating features of wikis is the power they provide users to do more and more with wiki pages thru added constructs and syntax.
Suggestions and Discussion
I'd like to make a few suggestions and see where the discussion goes --
SimonDavis
Existing Guidelines
- carriage returns are significant in formatting
- white space and tabs are not significant
- lines can be concatenated by the use of "\" as the last character of a line
- in principle we should use simple HTML elements rather than invent something different (see HtmlTags)
- hence we deprecate '' and ''' in favour of <i> and <b>
- There are some of us who prefer using double and triple quotes over the Html tags. Please keep this feature.
- we also already use the following simple HTML elements <b> <i> <pre> <tt> <code>
- the first character of a line plays a significant part role in formatting
- formatting that affects paragraphs should be required to be in the first character position (eg bullets, heading, lines)
- CascadingStyleSheets? should be used to control overall look and feel, eg WikiWithCascadingStyleSheet
- there are some wiki only elements, eg <nowiki> that use HTML syntax, lets keep doing it this way, is using elements delimited by < and >
Special Syntax
Inconsistencies
There are however inconsistencies and duplications.
Carriage Return inconsistency
Sentence entered of first line.
Second sentence entered on a second line - ie separated by a carriage return.
- Yet a bullet point is terminated by a single carriage return,eg
- First sentence of a bullet point
Second sentence entered on a second line - ie separated from bullet by a carriage return.
First character inconsistency
Headings are required to have their first character at the start of a line, lines (horizontal rules) are not.
nowiki and ""
Two double quotes can be used to terminate (WikiName""s)
WikiNames,
so can <nowiki></nowiki>,
not to mention six single quotes (WikiName''''''s)
WikiNames
Headings require = before and after, additionally they require a space to separate then from the heading text, eg
=Test 1=
= Test 2
=Test 1=
= Test 2
Bold and italic makup are paired, but not indentation or bullets - contributing to the Carriage Return Inconsistency above.
New Proposals
There are a number of new proposals that involve various abstruse and possibly complex markup.
See for example
List of Some New Proposals
I think http://www.iawiki.net/ has a syntax for 'overstrike' mode. Does anyone know?
- yes, it is -/strike/- or -\strike\-
- or
- use the HTML markup <s>...</s>
On UnrealWiki we've:
- standardised carriage returns: \n is always a paragraph break. Our reasoning was that the original reason for single "\n" having no effect was that some older browsers could not word-wrap in edit fields. This is no longer an issue with newer software.
- seperated the behaviour for < nowiki >, < pre > and "initial whitespace".
- use the | table syntax, with < , > , ^ at the start of a cell giving alignment
- ">" at the start of a line makes a blockquote, email-style.
- introduced the <wiki> tag. This is extremely powerful. Anything within it is re-parsed as wiki text: basically, this allows:
- paragraph breaks in entities which close on "\n", such as *, # and ;:
- nesting of tags.
Thus:
; A definition term : <wiki>This term is:
* interesting
* useful
* amusing</wiki>
This will produce the HTML bullet list nested inside the Definition list, and thus indented. Also very useful for putting lists, headings etc in tables. For example, with the <wiki> tag, this entire section, complete with the sample above, would be indented as part of the bullet point.
I might add that the example above could also be produced by the following markup. <wiki> is more useful if you intend to put complex markup at places where the syntax would usually just allow for a single paragraph to the end of the line -- a bit like braces in C or similar programming languages. -- MichaelBuschbeck
; A definition term : This term is
; * interesting
; * useful
; * amusing
Other mixed-type lists work too:
* a bullet
* second bullet, but this has
* # sub point one
* # sub point two
DIV and SPAN
I've implemented a syntax for incorporating DIV and SPAN in a 'Tavi dual-mode wiki at
http://allmyfaqs.com/wbt (dual-mode 'Tavi wiki -- this is the visitor view), also explained at
http://hytext.com/iwiki/markup.htm which is part of the documentation for WikiWriter at
http://hytext.com/cgi-bin/ww.pl , a standalone Windows-based wiki tool used to generate textbase, help systems, and web sites. The documentation for WikiWriter shown at
http://hytext.com/iwiki was created in WikiWriter. A companion, work-alike wiki using the same syntax is at
http://hytext.com/cgi-bin/ibasic.pl --
JerryMuelver
Formatting within <pre> </pre> tags
I have added the ability to have
WikiNames and italics within <pre> </pre> tags. I have added a new tag to my implementation to provide this facility, but is there any basic reason why this can't or shouldn't be provided within the standard <pre> </pre> tag implementation? --
PaulMorrison
- See also
- WikiSuggestions/MarkupProcessing
- MeatBall:WikiMarkupStandard