index ] [ cedega ] [ code ] [ emacs-wiki ] [ ewiki-bits ] [ key ] [ shots ] [ thinkpad-x40 ] [ wireless ]

Wiki Markup

Here is a description of the default markup rules:

Headings

* First level
** Second level
*** Third level

Note that the first level is actually indicated using H2, so that it doesn't appear at the same level as the page heading (which conceptually titles the section of that Wiki page).

Horizontal rules

----

Emphasis

 *emphasis*
 **strong emphasis**
 ***very strong emphasis***
 _underlined text_
 =verbatim=
 <verbatim>This tag should be used for larger blocks of text</verbatim>

emphasis
strong emphasis
very strong emphasis
underlined text
verbatim
This tag should be used for larger blocks of text

Footnotes

A reference1, which is just a number in square brackets, constitutes a footnote reference.

  A reference[1], which is just a number in square brackets,
  constitutes a footnote reference.

Footnotes:

1 Footnotes are defined by the same number in brackets occurring at the beginning of a line. Use footnote-mode's C-c ! a command, to very easily insert footnotes while typing. Use C-x C-x to return to the point of insertion.

Paragraphs

One or more blank lines separates paragraphs.

Centered paragraphs and quotations

A line that begins with six or more columns of whitespace (made up of tabs or spaces) indicates a centered paragraph. I assume this because it's expected you will use M-s to center the line, which usually adds a lot of whitespace before it.

If a line begins with some whitespace, but less than six columns, it indicates a quoted paragraph.

Poetic verse

Poetry requires that whitespace be preserved, without resorting to the monospace typical of HTML "PRE" tag. For this, the following special markup exists, which is reminiscent of e-mail quotations:

> A line of Emacs verse;
> forgive its being so terse.

You can also use the verse tag, if you prefer:

<verse>
A line of Emacs verse;
forgive its being so terse.
</verse>

Literal paragraphs

Use the HTML tags <pre></pre> to insert a paragraph and preserve whitespace. If you're inserting a block of code, you will almost always want to use verbatim within the pre tags. The shorcut for doing this is to use the <example> tag:

Some literal text or code here.

<example> Some literal text or code here. </example>

Lists

- bullet list
1. Enumerated list
Term :: A definition list
  1. Enumerated list
Term
A definition list

Tables

There are two forms of table markup supported. If Takaaki Ota's table.el package is available, then simply create your tables using his package, and they will be rendered into the appropriate HTML.

If table.el is not available, then only very simple table markup is supported. The attributes of the table are kept in `emacs-wiki-table-attributes'. The syntax is:

Double bars || Separate header fields
Single bars | Separate body fields
Here are more | body fields
Triple bars ||| Separate footer fields
Double barsSeparate header fields
Single barsSeparate body fields
Here are morebody fields
Triple barsSeparate footer fields

Other paragraph markup applies to both styles, meaning that if six or more columns of whitespace precedes the first line of the table, it will be centered, and if any whitespace at all precedes first line, it will occur in a blockquote.

Anchors and tagged links

#anchor If you begin a line with "#anchor"

where anchor can be any word that doesn't contain whitespace -- it defines an anchor at that point into the document. This anchor text is not displayed.

You can reference an anchored point in another page (or even in the current page) using

WikiName#anchor
The #anchor will never be displayed in HTML, whether at the point of definition or reference, but it will cause browsers to jump to that point in the document.

Redirecting to another page or URL

Sometimes you may wish to redirect someone to another page. To do this, put:

<redirect url="http://somewhereelse.com"/>

at the top of the page. If the tag specifies content, this will be used as the redirection message, rather than the default.

The numbers of seconds to delay is defined by `emacs-wiki-redirect-delay', which defaults to 2 seconds. The page shown will also contain a link to click on, for browsing which do not support automatic refreshing.

URLs

A regular URL is given as a link. If it's an image URL, it will be inlined using an IMG tag.

Embedded lisp

<lisp>(concat "This form gets" "inserted")</lisp>

Special handling of WikiNames

If you need to add a plural at the end of a WikiName, separate it with four single quotes:

WikiName''''s

To prevent a link name (of any type) from being treated as such, surround it with equals signs (to display it in monotype), or prefix it with the tag nop - ie:

<nop>WikiTag
.

Special Wiki links

Besides the normal WikiName type links, emacs-wiki also supports extended links:

This is WikiMarkup

[[WikiMarkup][This is WikiMarkup]]

An extended link is always a link, no matter how it looks. This means you can use any file in your `emacs-wiki-directories' as a Wiki file. If you provide an optional description, that's what will be shown instead of the link text. This is very useful for providing textual description of URLs.

InterWiki names

There are times when you will want to constantly reference pages on another website. Rather than repeating the URL ad nauseum, you can define an InterWiki name. This is a set of WikiNames to URL correlations, that support textual substitution using #anchor names (which are appended to the URL). For example, MeatballWiki is defined in the variable `emacs-wiki-interwiki-names'. It means you can reference the page "MeatBall" on MeatballWiki using this syntax:

MeatballWiki:MeatBall

MeatballWiki#MeatBall