TextFormattingRules

ProperTreatment | RecentChanges | Preferences
This page is read-only | View other revisions | Last edited 2004-08-29 (changes)

Editing wiki pages is easy. You don't have to know HTML, yet you can use many formatting features of HTML. This is because each wiki defines a set of formatting rules to convert plain text into formatted test. Some wikis (like this one) also allow some HTML-like "tags", like <b>, <i>, and <pre>, within a page.

The following text is an overview of the ProperTreatment text formatting rules. To try these rules for yourself, please feel free to edit the SandBox page. To see how any page is formatted, just follow the link "Edit text of this page" at the bottom of the page.


Basic Text Formatting

Most text does not require any special changes for wiki form. A few basic rules are:

Page, URL, Image, and InterWiki Links

You can link to a page by removing the spaces between two or more words, and starting each word with a capital letter. For instance, WikiName and TextFormattingRules are examples of page links.

Non-existing pages, like SampleUndefinedPage?, will be displayed with a question-mark for a link. The question mark link indicates the page doesn't exist yet--follow the link to create and edit the page. (The sample page used here is a special example page--you can't define it.)

To insert a link to an external URL, simply enter the URL in the text. For example: http://www.haskell.org/

Inline images work the same way:

You can label an external URL link by placing inside a pair of square brackets the URL you want to link to followed by the label you want the link to have. For example, you can link to [The Haskell programming language home page].

You can make InterWiki links by putting a colon prefix in front of a WikiName. For example, MeatBall:InterWiki is a wiki page at MeatBall:MeatballWiki discussing the idea of inter-wiki linking.

You can separate links from adjacent text with spaces or the special "" (two double-quotes) delimiter. The "" delimiter is not displayed--it is useful for cases like plural forms of page links (such as UseModWikis). In nearly all cases trailing punctuation is ignored, so you can safely make links like http://www.usemod.com/, without the trailing comma being part of the link.

Bold and Italic Text

To mark text as bold or italic, you can use the HTML-like <b> and <i> tags. For example:

Sample <b>bold</b>, <i>italic</i>, and <b><i>bold+italic</i></b>.

looks like:

Sample bold, italic, and bold+italic.

Note that UseModWiki (like most Wikis) processes pages line-by-line, so if you want three bold lines of text, you will need to use three separate <b>...</b> tags. Also note that unclosed or unmatched tags are not removed from the page.

UseModWiki also implements the old "quote style" of text formatting, which is used on several wikis. Briefly:

''Two single quotes are italics'',
'''three single quotes are bold''',
'''''five single quotes are bold and italic.'''''

looks like:

Two single quotes are italics, three single quotes are bold, five single quotes are bold and italic.

The "quote style" formatting is often confusing, especially when multiple bold and italic sections are mixed on a line. It may eventually be removed from UseModWiki.

Headings

Headings are delimited by 1-6 equal signs (=). One equal sign produces a top-level (most major) heading; 6 equal signs produce a bottom-level (most minor) heading. These heading levels basically correspond to HTML's <h1> through <h6> tags.

= Headline size 1 =

== Headline size 2 ==

=== Headline size 3 ===

==== Headline size 4 ====

===== Headline size 5 =====
====== Headline size 6 ======

Lists

Simple lists:

* Text for a bulleted list item.
** Text for second-level list.
*** Text for third level, etc.

...which looks like:

Numbered lists:

# Text for a numbered list item.
## Text for second-level list.
### Text for third level, etc.

...which looks like:

  1. Text for a numbered list item.
    1. Text for second-level list.
      1. Text for third level, etc.

Indented Text

Simple indented text:

: Text to be indented (quote-block)
:: Text indented more
::: Text indented to third level

...which looks like:

Text to be indented (quote-block)
Text indented more
Text indented to third level

Term with indented definition: (without a blank line between term and definition)

;Term:Definition (indented)
;;Term (indented):Definition (indented two levels)
;;;Term (indented twice):Definition (indented to third level)

...which looks like:

Term
Definition (indented)
Term (indented)
Definition (indented two levels)
Term (indented twice)
Definition (indented to third level)

Preformatted Text

Individual lines can be displayed as preformatted (fixed-width or "typewriter"-font) text by placing one or more spaces at the start of the line. Other wiki formatting (like links) will be applied to this kind of preformatted text.

Additionally, multi-line sections can be marked as pre-formatted text using lines starting with <pre> (to start pre-formatted text), and </pre> (to end preformatted text). The <pre> and </pre> tags are not displayed. Wiki links and other formatting is not done within a preformatted section. (If you want wiki formatting, use spaces at the start of the line instead of the <pre> and </pre> tags.)

For instance:

Pre-formatted section here.  No other link
  or format processing
is done on pre-formatted sections.
For instance, UseModWiki is not a link here.

and:

   This is the starting-spaces version of
   preformatted text.  Note that links like
   UseModWiki still work.

Miscellaneous rules

To quote text without applying the wiki formatting rules, enclose it within a <nowiki> ... </nowiki> section. Within a nowiki section, no formatting rules will be applied.

A line which ends in a backslash character (\) will be joined with the next line before most formatting rules are applied. This can be useful for breaking up long sections of text in line-sensitive sections (like lists or indented text).


ProperTreatment | RecentChanges | Preferences
This page is read-only | View other revisions | Last edited 2004-08-29 (changes)