Download module:
[Usemod] is Oddmuse's predecessor. It inherited a lot of the formatting rules from the original [Portland Pattern Repository], and added some more. Usemod was used in the very early stages of Wikipedia, so it influenced the most famous wiki project significantly.
Using the Usemod markup extension will give you the following text formatting rules:
[::Numbered List]
Numbered list items start with one or more hashes (#) and a space. The number of hashes indicates the indentation level. An empty line ends the list.
Example:
# One item # Another item ## One More
Result:
[::Definition List]
Definition lists start with a semicolon (;) and a space. A colon (:) is used between term and definition. The number of semicolons indicates the indentation level. An empty line ends the list.
Example:
; foo: a generic placeholder ; bar: a generic placeholder ;; baz: a variation
Result:
[::Join Lists Together]
You can join lists together just like what you do in HTML. Here is an example:
# 1st item ** item ** item ### subitem1 ### subitem2 # items
Result:
(The HTML will be wrong, however...)
[::Tables]
'''Table rows start and end with two vertical bars (||), with two vertical bars between cells.''' Empty cells fuse with the next cell; in other words, ||||bar|| is a table row with a cell spanning two columns.
Example:
||foo||bar|| ||||bar||
Result:
foo | bar |
bar |
Whitespace around cell-content controls alignment. If you leave whitespace on both sides, the cell is centered. If you leave whitespace on the right, the cell is aligned to the left, and if you leave whitespace on the left, the cell is aligned to the right.
||fnordifnord|| || foo || ||bar || || baz||
Result:
fnordifnord |
foo |
bar |
baz |
[::Indented Paragraphs]
Indented paragraphs start with one or more colons (:). The number of colons indicates the indentation level. An empty line ends the indented paragraph.
Example:
: One item : Another item :: One More
Result:
[::Headings]
Headings are enclosed in equals signs (=) on a line of their own. You can use up to six equals signs to produce headings of level one to six. Level one is the most important one, and should not be used because the page title already uses a level one heading. This is why level one headings are automatically translated to level two headings.
Using two or three equal signs is recommended (== like this ==).
Example:
=== Heading 3 === ==== Heading 4 ====
Result:
[::Horizontal Lines]
'''Four or more consecutive hyphens on a line of their own (
Example:
----
Result:
[::Source Code]
'''Lines starting with spaces are shown using a fixed width font with whitespace preserved.''' I suggest the use of a uniform indentation of four spaces.
Example:
foo bar
Result:
foo bar
[::Traditional Wiki Markup]
Two and three apostrophes are used for emphasis and strong emphasis.
Example:
''two apostrophes'' and '''three apostrophes'''
Result:
two apostrophes and three apostrophes
[::HTML Tags]
Some HTML tags are also allowed. These tags are used exactly like HTML tags.
Example:
<b>this will be bold</b>
Result:
this will be bold
Supported tags without extra configuration:
See HTML?.
Traditional HTML links are enabled if HtmlLinks? is set
Example:
<a href="http://example.com/">text</a>
Result:
[::Disable Text Formatting Rules]
The following tags will disable text formatting rules:
Example:
<code>[[foo]]</code>
Result:
[[foo]]
[::Special Link Patterns]
In order to link to Request For Comments (RFC), just write them into the text (the keyword RFC and the number should be on the same line).
Example: RFC 822.
In order to link to a book, just write the International Standard Book Number (ISBN) into the text (the keyword ISBN and the number should be on the same line).
Example: ISBN 020171499X (amazon.com, search)
In order to change the websites an ISBN links to, use the translation mechanism to translate the URLs. See Translations?.
Here is a very simple example if you don't normally use translation. Put the following in your config file:
%Translate = split('\n',<<END_OF_TRANSLATION); http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=%s http://www.buchkatalog.de/kod-bin/isuche.cgi?lang=deutsch&caller=butotest&field1=SB&name1=%s alternate amazon.de http://www.amazon.com/exec/obidos/ISBN=%s http://www.amazon.de/exec/obidos/ISBN=%s search isbn.nu http://www.pricescan.com/books/BookDetail.asp?isbn=%s http://isbn.nu/%s END_OF_TRANSLATION
table.user { border-style:solid; border-width:thin; } table.user tr td { border-style:solid; border-width:thin; padding:5px; }
Option: $UseModSpaceRequired
Default: 1
You can set this to 0 if you want to make this extension a bit more compatible with the original Usemod rules. When set to 0, no space is required after *, #, :, and ;. Conversely you may be bothered by the small annoyances that prompted the original change: If your users use a smiley at the beginning of a line, or use *bold* at the beginning of a line, they will be surprised:
This turns into a list item:
*bold* at the beginning of a line
This turns into an indented closing parenthesis followed by some text:
:) some text
The default value of $UseModSpaceRequired avoids these issues.
Option: $UseModExtraSpaceRequired
Default: 0
You can set this to 1 if you want to change the default behavior for definition lists.
This is the default behavior:
{{{
It's problematic if you want a term containing a colon in the term:
{{{
This will not work as expected. If you set ##$UseModExtraSpaceRequired = 1## in your config file, you can write it as follows:
{{{
The *extra space* required is the space *before the colon*.
Option: $UseModMarkupInTitles
Default: 0
You can set this to 1 if you want to make this extension a bit more compatible with the original Usemod rules. When set to 1, you can use wiki markup inside the title.
By default, the title does not linked:
FooBar
If you set this option to 1, the above would link to the page FooBar.
Option: $HtmlLinks
Default: 0
This option controls whether HTML links are rendered correctly.
Example: <a href="http://www.emacswiki.org/>Emacs Wiki</a> is an HTML link.