Markup language (pmwiki)¶
Our wiki site is based on PmWiki, and it is not WYSIWYG. Instead it is based on a markup language. A popular example is HTML, which looks one way in the editor, but then gets interpreted by web browsers in a specific way. As a quick example, to include bold text in a web page using HTML, you would enclose the test between <b> and </b>. Thus, your HTML file maybe look like
<b>This text is bold</b> but this is not
Would appear to users via a browser as
This text is bold but this is not
To edit a page, click the Edit link usually found in the header or footer (see Figure). You can now enter text and markup. The basic rules for page markup are simple:
Use a blank line to start a new paragraph.
To make a list, start each line with # for numbered (ordered) lists or * for bulleted (unordered) lists.
To make a heading, start a line with two or more ! marks; !! is a subheading, and !!! is a sub-subheading.
To emphasize text, enclose it in 2 or 3 single quotes; ‘’text’’ for italics or ‘’’text’’’ for bold.
To make a link to another page, enclose the page’s name in double brackets; for example [[basic editing]] links to this page.
To make a link to another site, type its address, such as [[http://example.com/]]. To include alternate text (that shows on the page and is a hyperlink, add the text after a pipe (|), e.g., [[http://cnn.com | Click for news]]. Email links must have “mailto:” before such as mailto:xyz@example.com
On talk pages and discussions, it’s courteous to sign your contribution; using ~~~ effectively ‘signs’ the name that you provide in the Author field on the Page Edit form.
One way to edit your page is with the built-in gui. If you select the “edit” option, the page will change from a formatted one to one showing markup. At the top are various buttons for things like adding hyper links, tables, text formatting, etc. In addition, there are some helpful notes at the bottom.
The tables below demonstrate many of the common markups used to format pages. The left column shows what to write to achieve the effect, the right column shows the effect of the markup. More details are available from the text formatting rules and other documentation pages. An exhaustive list of default markup is available as the markup master index.
Paragraphs and line breaks
What to type |
What it looks like |
---|---|
Consecutive lines will be merged together as part of the same paragraph. |
Consecutive lines will be merged together as part of the same paragraph. |
One or more empty lines will start a new paragraph. |
One or more empty lines will start a new paragraph. |
Two backslashes at the end of a line \\ force a line break. |
Two backslashes at the end of a line force a line break |
Or use this markup: [[<<]] to force a break. |
Or use this markup: to force a break. |
Lists
What to type |
What it looks like |
---|---|
Start each line with # for numbered (ordered) lists or * for bulleted (unordered) lists: * Bullet list
* Another item
** More asterisks produce sub-items
** Etc.
|
|
# Numbered lists # Another item ## more hashes produce sub-items |
|
# List types # can be mixed ** numbered list with unordered sub-items |
|
Or use this markup: [[<<]] to force a break. |
Or use this markup: to force a break. |
Headings
What to type |
What it looks like |
---|---|
! Major heading |
Major heading |
!! Minor heading |
Minor heading |
!!! and so on |
and so on |
Text Emphasis
What to type |
What it looks like |
---|---|
‘’Emphasize” |
Emphasize |
‘’’strong’’’ |
strong |
‘’’’’very strong’’’’’ |
*very strong* |
Links
What to type |
What it looks like |
---|---|
[[homework | My Homework]] |
*My Homework * |
[[http://cnn.com | Click here for news]] |
Click here for news |
[[http://www.pmwiki.org | #]] |
[1] |
Preformatted text
Preformatted text is displayed using a monospace font and not generating line breaks except where explicitly indicated in the markup. Note that very long lines of preformatted text can cause the whole page to be wide. There are a few different options:
enclose text between [@ and @]: HTML “code” style
enclose text between >>pre<<: exactly as typed
enclose text between [= and =]: no markup, but lines are formatted
Tables
Simple tables use double pipe characters to separate cells:
|| border=1 ||! head 1 ||! head 2 ||! head 3 || || cell 1 || cell 2 || cell 3 || |
|
||||||
---|---|---|---|---|---|---|---|
Images
We will be attaching images, e.g. plots, to our wiki pages. This is done via “attach”:
Attach:figure1
Once saved, the text becomes a link to the image. The first time you will need to click on this, then browse/select image to upload to the wiki site.
Character formatting
What to type |
What it looks like |
---|---|
* @@Monospaced text@@ * Text with ‘^superscripts^’ * Text with ‘_subscripts_’ * deleted {-strikethrough-} text * inserted {+underline+} text * [+big+], [++bigger++] text * [-small-], [–smaller–] text |
|
Page formatting
The (:title:) directive sets the page’s title to something other than its page name.
(:Title Basic PmWiki editing rules:)
While the (:Description:) directive sets the page description. The description is used by search engines, and can be displayed in search results and in page lists.