Basic PmWiki editing rules

PmWiki.BasicEditing History

Hide minor edits - Show changes to markup

September 22, 2014, at 11:30 AM by lpr -
Changed lines 1-265 from:

lKFcZS <a href=“http://yqxwossgetyx.com/”>yqxwossgetyx</a>

to:

(:Summary: PmWiki's basic edit syntax:)(:Audience: authors (basic) :) The pages on this site are Wiki Wiki Web pages, which means that pages can be created and edited by multiple authors. To edit a page, click the Edit link that exists somewhere on the page, usually in the header or footer. Some pages may be password-protected, depending on the system’s security policies, but many systems allow open editing of pages.

PmWiki is not WYSIWYG - When editing a page, you see the markup text that describes the content of the page. The basic rules for page markup are simple:

  1. Use a blank line to start a new paragraph more.
  2. To make a list, start each line with # for numbered (ordered) lists or * for bulleted (unordered) lists more.
  3. To make a heading, start a line with two or more ! marks; !! is a subheading, and !!! is a sub-subheading more.
  4. To emphasize text, enclose it in 2 or 3 single quotes; ''text'' for italics or '''text''' for bold more.
  5. To make a link to another page, enclose the page’s name in double brackets; for example [[basic editing]] links to this page more.
  6. To make a link to another site, type its address, such as http://example.com/ more.

If you want to experiment with editing a page, try it on the Wiki Sandbox. You can edit the Wiki Sandbox without affecting anything important on this site. 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.

Examples of common markups

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

(:table class='markup horiz' align='center':) (:cellnr class='markup1':) What to type (:cell class='markup2':) What it looks like (:tableend:)

(:markup class=horiz:) Consecutive lines will be merged together as part of the same paragraph.

One or more empty lines will start a new paragraph. (:markupend:)

(:markup class=horiz:) Two backslashes at the end of a line
force a line break.

Or use this markup:
to force a break. (:markupend:) Further reading:

  • text formatting rules for more information on linebreaks, indented or hanging paragraphs.
  • wiki styles for centered or right justified paragraphs and “floating” text (boxes), borders and much more.

Lists

Start each line with # for numbered (ordered) lists or * for bulleted (unordered) lists: (:markup class=horiz:)

  • Bullet list
  • Another item
    • More asterisks produce sub-items
    • etc.

(:markupend:)

(:markup class=horiz:)

  1. Numbered lists
  2. Another item
    1. more hashes produce sub-items

(:markupend:)

(:markup class=horiz:)

  1. List types
  2. can be mixed
    • numbered list with unordered sub-list

(:markupend:)

(:if false:) if someone thinks definition lists are “basic”: (:markup class=horiz:)

Definition list
list of definitions
item
the item’s definition
another item
that item’s definition
indentation
more leading colons produce deeper lists

(:markupend:) (:ifend:)

Learn more about lists (including definition lists) and list styles.

Headings

Headings are useful for creating a “well-structured” page. They’re not just for making big text.

(:include {$FullName}#markupheaders#markupheadersend:)

(:markup class=horiz:)

Major Subheading

Minor Subheading

And More

Subheadings

(:markupend:)

Text Emphasis

To emphasize, enclose text in apostrophes (single-quote marks), not double-quotes.

(:include {$FullName}#markupheaders#markupheadersend:)

(:markup class=horiz:) Emphasize (italics), strong (bold), very strong (bold italics). (:markupend:)

Links

To make a link to another page, enclose the page’s name in double square brackets.

(:include {$FullName}#markupheaders#markupheadersend:)

(:markup class=horiz:) Practice editing in the wiki sandbox (:markupend:) Note that words are automatically capitalized in page titles. The link above links to the page WikiSandbox.

Text after a pipe (|) is used as the link text: (:markup class=horiz:) Practice editing in the practice area. (:markupend:)

(:comment is this still "basic" or should it be removed? :) Endings become part of the link text, parentheses hide parts of the link name: (:markup class=horiz:) wiki sandboxes.

sandbox. (:markupend:)

When linking to a page in a different WikiGroup, provide the group name, followed by a separator, and then the page name: (:markup class=horiz:) Main.Wiki Sandbox shows group + name

Wiki Sandbox shows only name (:markupend:)

Links to external sites (:markup class=horiz:) bare url: http://www.pmwiki.org

link text: PmWiki home (:markupend:)

(:comment is this still "basic" or should it be removed? :) Colons make InterMap (also called InterWiki) links to other wikis: (:markup class=horiz:) What’s an Wikipedia:aardvark, anyway? (:markupend:)

Links to nonexistent pages ? are displayed specially, to invite others to create the page.

PmWiki supports more link types and a lot of display options, see Links to learn more.

Preformatted text

Preformatted text is displayed using a monospace font and not generating linebreaks except where explicitly indicated in the markup.

Note that very long lines of preformatted text can cause the whole page to be wide.

For preformatted text with markup (e.g. emphasis) being processed, start each line with a space: (:markup class=horiz:) Lines that begin with a spece are formatted exactly as typed in a fixed-width font. (:markupend:)

If you don’t want Wiki markup to be processed, use [@ @]. Can also be used inline. (:markup class=horiz:)

Text escaped this way has
the HTML ''code'' style

(:markupend:)

Escape sequence

If you don’t want Wiki markup to be processed, but lines reformatted use [= =]. Can also be used inline. (:markup class=horiz:) markup is ''not'' processed but lines are reformatted (:markupend:)

Horizontal line

(:markup class=horiz:) Four or more dashes at the beginning of a line


produce a “horizontal rule” (:markupend:)

Tables

Simple tables use double pipe characters to separate cells: (:markup class=horiz:)

head 1head 2head 3
cell 1cell 2cell 3

(:markupend:) See simple tables and advanced tables to learn more about the rich feature set of PmWiki tables.

Images

See Images

(:if false:) IMO this is not “basic” and should be removed from this page —OliverBetz

Indented and “hanging” paragraphs

(:markup class=horiz:)

An arrow (→) indents content.
Line up text to continue the indent.
Longer arrows (→) indent further.
A reverse arrow (-<) creates a hanging indent, the first line is outdented and remaining lines are indented.

(:markupend:) (:ifend:)

Character formatting

(:include {$FullName}#markupheaders#markupheadersend:)

(:markup class=horiz:)

  • Monospaced text
  • Text with superscripts
  • Text with subscripts
  • deleted strikethrough text
  • inserted underline text
  • big, bigger text
  • small, smaller text

(:markupend:)

Use WikiStyles to change the text color .

Page titles

The (:title:) directive sets the page’s title to something other than its page name. (:markup class=horiz:) (:Title Basic PmWiki editing rules:) The name of this page is “BasicEditing”, and its title is “Basic PmWiki editing rules”. (:markupend:)

Page Description

  • The (:Description Page summary here:) directive sets the page description. The description is used by search engines, and can displayed in search results and in page lists.

(:markup class=horiz:) (:Description PmWiki's basic edit syntax:) The summary description of this page is PmWiki’s basic edit syntax. (:markupend:)

Q I’m new to PmWiki, where can I find some basic help for getting started?

The Basic Editing page is a good start. From there, you can just follow the navigational links at the bottom of the page (they are called Wiki Trails) to the next pages, or to the Documentation Index page, which provides an outline style index of essential documentation pages, organized from basic to advanced.

Q How do I include special characters such as Copyright (©) and Trademark (® or ™) on my wiki pages?

See special characters on how to insert special characters that don’t appear on your keyboard.

Q Why are separate lines of text in the markup combined into a single line on output?

PmWiki normally treats consecutive lines of text as being a paragraph, and merges and wraps lines together on output. This is consistent with most other wiki packages. An author can use the (:linebreaks:) directive to cause separate lines of markup text to be kept as separate lines in the output. A wiki administrator can set in config.php $HTMLPNewline = ‘<br/>’; to force literal new lines.

Q Can I just enter HTML directly?

By default (and by design), PmWiki does not support the use of HTML elements in the editable markup for wiki pages. There are a number of reasons for this described in the PmWiki Philosophy and PmWiki:Audiences. Enabling HTML markup within wiki pages in a collaborative environment may exclude some potential authors from being able to edit pages, and pose a number of display and security issues. However, a site administrator can use the Cookbook:Enable HTML recipe to enable the use of HTML markup directly in pages.

Q Where can I find more documentation?

See the documentation index and the markup master index pages.