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 also allow some HTML "tags", like <b>, <i>, and <pre> within a page. (Some wikis allow full HTML markup in place of special rules - this Wiki does not.)
Tips | Hints
The following
text is an overview of the
UseMod:UseModWiki 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:
Entering text on a wiki can be done simply. Follow these guidelines:
- Carriage returns (ie pressing the Enter key) are significant in formatting a wiki page
- Multiple spaces and tabs are ignored
- use '' (two single-quotes) for italics, ''' (three single-quotes) for bold, and ''''' (five single-quotes) for bold-italics. Alternatively, use tags <b>bold</b> and <i>italic</i>
- Use tag <tt>for monospace text</tt> (tt stands for typewriter text)
- The first character entered on a line often controls the formatting of the text on that line, in brief (see below and sub pages for details):
- " " space causes text to appear in a monospaced font where spaces are significant
- ":" colon causes text to be indented
- "=" equals - followed by a space - creates a heading, a trailing "=" - preceded by a space - is required
- "*" asterisk creates a bulleted list
- "#" hash creates a numbered list
- ";" semicolon creates a definition list, a ":" colon is required subsequently on the same line
- "----" four hyphens creates a horizontal line
- "||" vertical bar creates a table.
- Repetition of the first character on the line generally increases the indentation or emphasis
- Leave a single blank line between paragraphs.
- Suppress wiki formatting and linking through escaped WikiWiki text -- <nowiki>WikiWiki</nowiki>
- Insert an image using a full URL, eg http://usemod.com/wiki.gif
Page, URL, and InterWiki Links:
Wiki Pages
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,
WikiHome and
TextFormatting are samples of page links.
People abhorring PascalCase can use 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.
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://perl-win32-gui.sourceforge.net/cgi-bin/wiki.cgi?SandBox -- http://perl-win32-gui.sourceforge.net/cgi-bin/wiki.cgi?SandBox
Named URL link: [Sandbox] -- [http://perl-win32-gui.sourceforge.net/cgi-bin/wiki.cgi?SandBox Sandbox]
Image link: -- [http://perl-win32-gui.sourceforge.net/ http://perl-win32-gui.sourceforge.net/img/win32-gui-small.png]
URLS Using Anchors?
[Buried Treasure] -- [http://perl-win32-gui.sourceforge.net/cgi-bin/wiki.cgi?SandBox#anchor Buried Treasure]
To set an anchor:
On-Site URLS
To make on-site links you must re-specify the protocol e.g.:
InterWiki
Links to other wikis and sites can be achieved using the following synax. Currently only 2 prefixes are supported:
- UseMod for links to wiki pages at http://www.usemod.com/
- Win32GuiDoc for links to Win32::GUI package documentation
InterWiki link: UseMod:InterWiki -- UseMod:InterWiki
InterWiki link: Win32GuiDoc:richedit -- Win32GuiDoc:richedit
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:
- Text for a bulleted list item.
- Text for second-level list.
- Text for third level, etc.
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:
- Text for a numbered list item.
- Text for second-level list.
- Text for third level, etc.
- 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.
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.
Futhermore (and specific to this wiki) you may surround perl code blocks with <perlcode> ... </perlcode> tags to get nicly coloured perl listings:
use strict;
use warnings;
use Win32::GUI;
my $mw = Win32::GUI->new(
-title => "Main Window",
);
$mw->Show();
Win32::GUI::Dialog();
exit(0);
__END__
Miscellaneous rules:
- See also
- UseMod:TextFormattingRules
- UseMod:TextFormattingRules/WikiTextFormatting
- UseMod:TextFormattingRules/WikiLists
- UseMod:TextFormattingRules/WikiHeadings
- UseMod:TextFormattingRules/TableOfContents
- UseMod:TextFormattingRules/WikiImages
- UseMod:TextFormattingRules/WikiLines
- UseMod:TextFormattingRules/WikiTables
- UseMod:WikiBugs/TextFormatting
- UseMod:WikiMarkupLanguage