Source code: (Demo content is preloaded) == [[=top]]UNB2 ''Markup'' Examples == === Introduction === This page contains some exemplary text with several formatting to show how the syntax looks like and to serve as a reference for testing markup processing implementations. === Text formatting === First, there's basic text formatting like emphasising. Its first form makes text appear in ''italic'' font by enclosing it in two apostrophes. More emphasising is displayed with bold font can be achieved with '''three apostrophes''' and even more with ''''four apostrophes''''. More will be useless, underlining is not supported with basic markup. This may also span ''multiple words'' or even '''part'''s of words. Be sure to keep these control symbols well-balanced. This type of formatting will be cancelled at the end of a paragraph or table cell. These ''emphasising '''levels can'' be nested ''in'' a quite''' chaotic ''''''''''way''' without'' a problem. Fixed-width font can be used for source code or ASCII-art-like text by enclosing the parts with {{double braces}}. To also disable the interpretation of markup and paragraph detection, use three braces instead of two. The latter will also prevent URLs from being hyperlinked automatically or smileys from being replaced by graphics. <box>{{{#include <stdio> int main() { // This comment contains the }}}} string and ''emphasis'' is not regarded here. return 0; } }}}</box> ''Note: To avoid an occurrence of }}} to end a code block, four braces can be used. To show four braces, use five, and so on. Then, there's web links. In its simplest form, a URL like Http://google.com or www.google.com is just typed in plain text with no further markup, but not within a wordhttp://microsoft.com. More complex URLs like www.google.com/search?q=something+new may cause problems with auto-detection of the correct boundaries though, because URLs are not only delimited by whitespace but also by regular punctuation like in http://google.com. As an additional form that also allows giving a hyperlink a caption different from the URL, it can look like this: [[http://google.com Google web search]]. Spaces inside the link controls are allowed: [[ http://google.com ]]. Some kind of ''namespaces'' are supported to ease links to [[wikipedia:Wikipedia]] or [[google:a_better_place.gif somewhere else]]. Like in Wikis, links to other pages are possible, too, like [[FAQ]]. The link will be expanded to the entire word like here: [[FAQ]]s. Inline formatting is [[Google ''allowed'' in the link]] caption. ''This also works when a [[xxx style is ''already set]] outside the link.'' This is an [[unknown:protocol]] and this is an [[invalid link. ''Note: If something following a [[ sequence cannot be parsed as a known command or link type, it will be ignored and displayed as-is. The inclusion of images follows the hyperlink scheme above by writing them like [[http://mail.google.com/mail/help/images/small_logo.gif]], where the file extension must match a known image type. Alternative texts may be provided just like link captions: [[http://mail.google.com/mail/help/images/small_logo.gif Google Mail logo]]. This alternative texts is also used as a description that shows up when hovering the image with the mouse cursor. A link to an image can be enforced by using the "url:" namespace for the link: [[url:http://mail.google.com/mail/help/images/small_logo.gif]]. This is an automatically detected mailto:some.smart.person@gmx.de e-mail link. E-mail links also work in double brackets: [[mailto:me@my-home.org]] <ot> Uploaded files are referenced through the "file:" namespace: [[file:chart.jpg]] </ot> And as in most modern user-content systems, we can also use smileys like ^^, :'( or :@. <center> We also have <colour red>text colour</color>, <size 15>font sizing</size>, <sub>subscript</sub> and <sup>superscript</sup> as well as <br> line breaks, <u>underlining</u>, <s>strike-through</s>, <big>bigger</big> and <small>smaller</small> font. And <back yellow><color red>'''look at this'''</back></color>! </centre> === Paragraph formatting === <right>This paragraph is aligned at the right side. And here's a second paragraph on the right side.</right> Multiple spaces within a line are collapsed into one just like in HTML. Also, line breaks are not preserved. But in the HTML source, all of these can be seen. An empty right-aligned box follows: <right></right> Several types of lists are supported: * Unordered lists * which are prepended with an asterisk character followed by a space. # Ordered lists (1.) # which are prepended with a hash character followed by a space. (2.) List items can span multiple lines when the next line begins with at least one space character. #* Lists can also be nested (still 2.) #* by using more list item characters in a line. (again 2.) This is the second line of the unordered list item. # This is a new ordered list item. (3.) # How about this? ## item 4.1 This should be the second line for item 4.1. Item 4. will not be touched again once a nested list was started. ## item 4.2 If a following line does not begin with either a list item character or a space, it is considered outside of the list. Anyway, lists are always outside of a text paragraph, according to the HTML standard. So there's a little space between text and lists even if there's no empty line in the source code. <box> Indenting paragraphs is easy: The first line must be shifted by one horizontal tabulator character or four spaces for each indentation level. Other counts of spaces will be rounded to the nearest multiple of four. This paragraph is indented with two tab characters. </box> > Block quoting of other sources is possible the "e-mail way" with a closing angle (>) at the beginning of the line. > If a second line also begins with this character, it is handled like normal text in the same quotation: it's appended to the same line. > It's important for the ">" to be in the very first column of the line and there is one space between the last ">" and the quoted content. (A single ">" in a line with no further content is good, too.) Otherwise it will not be recognised. > > Only empty lines in the quotation can make a paragraph break. >> Multiple levels of quoting are supported. > > It doesn't matter whether there is a (single!) space between the > characters. > > Indented paragraphs in a block quotation are possible. (Remember that the first space is used for the quotation and doesn't count for indentation.) > > ==== Quoted caption ==== > * Of course, lists can be used > * in quotations as well. > There's a gap between blockquote paragraphs. |''Tables|Tables are specified one row per line.| ---- |''Description|Each line begins and ends with a pipe character (vertical bar), which is also used to separate each table cell. If the text content of a single cell is too large to fit in a single line in the browser display, the text is wrapped as usual. There is no way to enforce line breaks in table cells, no paragraphs and no lists or even nested tables can be used.| ||Empty cells are allowed and vertical bars can be enclosed in triple braces like this: {{{|}}}| > |Ah, and here's|a quoted table| > |that contains altogether|four cells.| <left><box>This box is left-aligned!</box></left> Captions are specified in a single line per paragraph, beginning and ending with an equal count of equality characters (=). Two of them denote a level-1 caption, three stand for a level-2 caption and so on. [[#top Go to the top of the page]] <right>This right-aligned box is never closed.
Go back to the project page