[Home]Wiki System Docs/TextFormatting

Scalene Wiki | Wiki System Docs | Recent Changes |

Wiki Text Formatting Rules

Simple editing is one of the major benefits of using a wiki. Users can edit pages without knowing HTML, and still use many formatting features of HTML. Most wikis define a set of formatting rules to convert plain text into HTML. Some wikis (like this one) also allow some HTML "tags", like <b>, <i>, and <pre> within a page. (Some wikis use raw HTML instead of special formatting rules.)

Tips | Hints

The following text is an overview of the UseModWiki text formatting rules. For examples without all the explanatory text, see the TextFormattingExamples. 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:

Entering text on a wiki can be done simply. Follow these guidelines:

Repetition of the first character on the line generally increases the indentation or emphasis

Additional Text Formatting Rules:


Page, URL, and InterWiki Links:

Wiki Pages

You can link to a page by using a free link: surround text with two pairs of square brackets like [Sample Free Link]?. This allows all-downcase or atomic capitalized names as well as strange names including punctuation.

Problem With Underscores in Links to Pages?

Say I create a page called "My_New_Page" -- when viewing it, the underscores are changed to spaces etc.

But I can't seem to link to it using a page link. If I link to MyNewPage it's shown with a questionmark as a nonexistant page. Fair enough, it doesn't exist. But if I link to it as "My_New_Page" that doesn't get picked up as a page link. Any thoughts?

Try [My New Page]? ("My_New_Page" in double square brackets). Look at the explanation of FreeLinks.

Nonexistent pages, like SampleUndefinedPage, will be displayed with a question mark 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.]

URLs

Plain URL link: http://www.usemod.com/cgi-bin/mb.pl?SandBox -- http://www.usemod.com/cgi-bin/mb.pl?SandBox

Named URL link: [Sandbox] -- [http://www.usemod.com/cgi-bin/mb.pl?SandBox Sandbox]

I don't know whether this is intentional, but you can create an image which links to a url using [url image_url] e.g.

This feature is intentional, and it was added for the 1.0 release of UseModWiki. I simply hadn't updated the documentation yet.

URLs Using Anchors?

 [Buried Treasure]  -- [http:/cgi-bin/mb.pl?SandBox#anchor Buried Treasure]

To set an anchor:

On-Site URLS

To make on-site links you must respecify the protocol e.g.:

Problem is local; this #anchor syntax works for me without any issues. --CParker?
It doesn't work because the syntax is incorrect. You need to use [http:/cgi-bin/wiki.pl?page#anchor link-text] instead of [http:#anchor link-text]. --AndrewTurner

Full relative urls do not seem to work.

There is a problem with this. This generates links which looks like this in the source: <a href="http:/wiki.gif">. This is, however, not a correct relative URL, according to [RFC1808] (see Section 5.2, last example). It seems that netscape 7 does not interpret such links as intended, for example.

InterWiki

InterWiki link: UseMod:InterWiki -- UseMod:InterWiki

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 UseModWiki""s). 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. You can also use FreeLinks.

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.
## Another Text for the second level.

...which looks like:

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

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

Definition Text:

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)

Images

Just provide the URL, and the image will be inserted inline.

These extensions are recognized: gif, jpg, png, bmp, jpeg

Note case sensitivity: capitalized extensions such as .GIF, .PNG, .JPG, etc. do NOT work. Some digital cams capitalize image names automatically, so you have to edit them before linking them into your wiki. -- Celine

If you have a choice, results are usually best with png for computer generated images, and JPEG for photographic images.

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 =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:

HTML


See also
WikiBugs/TextFormatting
MeatBall:TextFormattingRules
WikiMarkupLanguage


Scalene Wiki | Wiki System Docs | Recent Changes |
This page is read-only | View other revisions
Last edited August 10, 2006 7:48 by Jason (diff)
Search: