(:comment please leave the multiple style definitions concatenated as a single line. Linebreaks do appear in the output when the wiki is configured with linebreaks enabled -- thanks!:) (:comment included in PmWiki localisation headers and footers :)

Text Formatting Rules

This page provides a more complete list of some of the markup sequences available in PmWiki. Note that it's easy to create and edit pages without using any of the markups below, but if you ever need them, they're here.

To experiment with the rules, please try editing the Main/WikiSandbox.

Paragraphs

  • Do not indent paragraphs
  • Words wrap and fill as needed
  • Use blank lines as separators
  • Lines indented with one or more spaces (or tabs) are monospace font.
  • Use \ (single backslash) at the end of a line to join the next line to the current one (line continuation?)
  • Use \\ (two backslashes) at the end of a line to force a line break, but keep the current environment (e.g. stay inside the current list item)


Indented Paragraphs (Quotes)

Arrows (->) at the beginning of a paragraph can be used to produce an indented paragraph. More hyphens at the beginning (--->) produce larger indents.

 ->Four score and seven years ago our fathers placed upon this
 continent a new nation, conceived in liberty and dedicated to the
 proposition that all men are created equal.
Four score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal.


Bulleted Lists

Bullet lists are made by placing asterisks at the left margin. More asterisks increases the level of bullet:

 * First-level list item
 ** Second-level list item
 ** Another second-level item
 * A first-level item
 ** Second-level list item
 *** Third-level list item
 **** Fourth-level list item
  • First-level list item
    • Second-level list item
    • Another second-level item
  • A first-level item
    • Second-level list item
      • Third-level list item
        • Fourth-level list item


Horizontal Line

Four or more dashes (----) at the beginning of a line produce a horizontal line.



Emphasis

  • Use doubled single-quotes (''), i.e., two apostrophes, for emphasis (usually italics)
  • Use tripled single-quotes ('''), i.e. three apostrophes, for strong emphasis (usually bold)
  • Use five single-quotes ('''''), or triples within doubles (five apostrophes), for some other kind of emphasis (usually bold italics)
  • Use doubled at-signs (@@) for monospace text
  • Use [+...+] for larger text and [-...-] for smaller text
  • Emphasis can be used multiple times within a line, but cannot span across markup line boundaries (i.e., you can't put a paragraph break in the middle of bold text).

See also WikiStyles for advanced text formatting options.

References

  • Join capitalized words (WikiWords) to make references to other pages on this Wiki.
  • Precede URLs with "http:", "ftp:", "gopher:", "mailto:", or "news:" to create links automatically, as in http://www.pmichaud.com/toast.
  • URLs ending with .gif, .jpg, or .png are displayed as images in the page
    • An image URL at the beginning of a line "floats left" with text wrapped around it.
    • An image URL at the end of a line "floats right" with text wrapped around it.
    • An image URL on a line by itself appears by itself in the output.
  • URLs can be placed in double brackets url? when the URL itself is not important to the text. For example, [[http://www.google.com/]] will appear as [1].
  • Links with arbitrary text can be created in double brackets as url text? or WikiWord text?. Text can be an image URL, in which case the image becomes the link to the remote url or WikiWord.
  • Anchor targets within pages (#-links) can be created using [[#target]] and linked to with [[#target text]].


FreeLinks

A free link? is a page name reference that doesn't follow the WikiWord convention.

Often, there is no natural WikiWord for naming a page. That's when {{free links}} (a page called free links?) are useful. The {{text}} markup creates a link to a page called Text. The markup {{basic editing}} markup creates a link to a page called BasicEditing and displays as basic editing. Suffixes and plurals are also possible, thus {{wiki word}}s produces wiki words.

For more information please see the FreeLinks documentation.

Headings

Headings are made by placing a exclamation mark (!) at the left margin. More exclamation marks increases the level of heading. For example,

 ! Level 1 Heading

Level 1 Heading

 !! Level 2 Heading

Level 2 Heading

 !!! Level 3 Heading

Level 3 Heading


Escape sequence

Anything placed between [= and =] is not interpreted by PmWiki/PmWiki. This makes it possible to easily do WikiWords that are not links and turn off other special formatting interpretation. The [= and =] can span multiple input lines, allowing effects to be applied to multiple input lines. For example, space[= at the beginning of a line will cause the text up to the next =] to be monospace and uninterpreted by PmWiki/PmWiki (useful for program listings).

Additionally, the special markup [@ and @] can be used as a shortcut for @@[= and @@=], or typewriter-font text that is not interpreted by the wiki.

Numbered Lists

Numbered lists are made by placing number-signs (#) at the left margin.

 # Prepare the experiment
 ## Unwrap the pop-tart
 ## Insert the pop-tart into the toaster
 # Begin cooking the pop tart
 # Stand back
  1. Prepare the experiment
    1. Unwrap the pop-tart
    2. Insert the pop-tart into the toaster
  2. Begin cooking the pop tart
  3. Stand back


Definition Lists

Definition lists are made by placing colons at the left margin:

 :term:definition of term
 ::second-level item: definition of 2nd-level item
term
definition of term
second-level item
definition of 2nd-level item


Tables

Table are defined by enclosing cells with '||'. A cell with leading and trailing spaces is centered; a cell with leading spaces is right-aligned; all other cells are left-aligned. An empty cell will cause the previous cell to span multiple columns. (There is currently no mechanism for spanning multiple rows.) A line beginning with '||' specifies the table attributes for subsequent tables.

 
        ||align=center border=1 width=50%
        ||Left   || Center ||  Right||
        ||A      ||    B   ||      C||
        ||       || single || ||
        ||       || multi span ||||

LeftCenterRight
ABC
 single 
 multi span

For more information see SimpleTables, SimpleTables2 and AdvancedTables.
When creating pages it's common to use commercial trademarks, copyright, umlaut, and other non-keyboard symbols. therefore it's important that you have the means to input these special characters.

ISO Standard codes

PmWiki supports the HTML special character listings by the w3c. W3C Page of Special Character codes ISO standard.

Here are some samples:

 © | ¼ | ½ | ® | µ | ¨ 
 © | ¼ | ½ | ® | µ | ¨ 
 Æ | 32° | Unïted Stätes | ¶ | ¥Yen | PmWiki™ 
 Æ | 32° | Unïted Stätes | ¶ | ¥Yen | PmWiki™ 

For a nice table with all available special characters, see List of Unicode characters at Wikipedia.

Other ways to do it:

Character Map

Find the "Character Map" utility in your computer's System Tools folder. Click the symbol you're interested in, and note the keystroke information at the bottom of the box. You execute these by holding "Alt" while keying the numbers on the numerical keypad of your keyboard (not the numbers across the top of the board).

© = Alt+0169 = © | ® = Alt+0174 = ® | ° = Alt+0176 = ° (degrees)

Paste

  • Use Word or another desktop application to create your text with the special characters that you want. Copy and paste the text to the wiki page you're editing or creating.
  • Find an instance of a special character in an online document; copy and paste the character to your wiki page: ©

There's a list of special characters at PmWiki:SpecialCharactersList. There's another illustration at PmWiki:Characters

Comments

Text following a %comment% tag is not displayed, up until the end of the line or a subsequent %%.

 %comment% This is a hidden comment line that doesn't show.

<< Images | PmWiki.DocumentationIndex | Markup master index >>
(:comment included in PmWiki localisation headers and footers :)


This page may have a more recent version on pmwiki.org: PmWiki:TextFormattingRules, and a talk page: PmWiki:TextFormattingRules-Talk.