Help:Markup

Editing text on a wiki is meant to be as simple and intuitive as possible, so that most of your thought goes into content, rather than format. On this page, you'll find out just how the markup works. Please feel free to add your own examples.

Remember that looking at the source of articles that look the way you want is a very good way to learn how it is done. Also, for more detailed information, see the MediaWiki Editor Handbook.

Bold and italics
Enclose your text with apostrophes. Two apostrophes cause italicized text to appear, and three cause bold text to appear. You can also enclose text with five apostrophes to get bold and italicized text. (2+3=5, after all!)


 * {| cellpadding="5" cellspacing="0" border="1"

! You type: ! You see:
 *  this text is italicized 
 * this text is italicized
 *  this is bold 
 * this is bold
 *  this is bold and italicized 
 * this is bold and italicized
 * }
 *  this is bold and italicized 
 * this is bold and italicized
 * }

Preformatted text
Start each line with a space or use the  tag. Remember, you will have to manually wrap your lines, or they may cause the page to be wider than some peoples display. Intented text is simply accomplished with a colon at the beginning of an indented paragraph.

Sections and Lists
In order to create and support a logical structure, articles can be divided into sections. Don't skip levels! A sub-subsection should never lie directly below a section.

Unordered lists are created by simply marking each line with an asterisck.

You can also create ordered lists with the number sign (#).

The two types can also be combined, like so:

Links and URLs
These are some examples of internal links.

These are some examples of external links.

Math
HvWiki uses a subset of TeX markup, including some extensions from LaTeX and AMSLaTeX, for mathematical formulae.

Parenthesizing big expressions
You can use various delimiters with \left and \right:

Spacing
Note that TeX handles most spacing automatically, but you may sometimes want manual control.

Align with normal text flow
Due to the default css

img.tex { vertical-align: middle; }

an inline expression like $$\int_{-N}^{N} e^x\, dx$$ should look good.

If you need to align it otherwise, use  $$...$$  and play with the vertical-align argument until you get it right; however, how it looks may depend on the browser and the browser settings.

Forced PNG rendering
To force the formula to render as PNG, add \, (small space) at the end of the formula (where it is not rendered). This will force PNG if the user is in "HTML if simple" mode, but not for "HTML if possible" mode.

You can also use \,\!</tt> (small space and negative space, which cancel out) anywhere inside the math tags. This does force PNG even in "HTML if possible" mode, unlike \,</tt>.

This could be useful to keep the rendering of formulae in a proof consistent, for example, or to fix formulae that render incorrectly in HTML (at one time, a^{2+2} rendered with an extra underscore), or to demonstrate how something is rendered when it would normally show up as HTML (as in the examples above).

For instance:

This has been tested with most of the formulae on this page, and seems to work perfectly.

You might want to include a comment in the HTML so people don't "correct" the formula by removing it:



Images
The basic format for displaying an image inline is  </tt>.

Available Styles

 * thumbnail</tt>, thumb</tt> : generates an automatically resized thumbnail image, normally on the right, with the caption text displayed directly underneath. An "enlarge"-icon is added. Example: [[Image:Wiki.png|thumbnail|Caption text]]
 * frame</tt> : The image will have a frame, regardless of whether it is a thumb, and the caption text will be included as a visible caption.
 * right</tt> : make the image right-aligned, can be used with and without specifying thumb
 * left</tt> : same as above, but left aligned.
 * none</tt> : The image will be rendered inline on the left, even if the thumbnail-option is set
 * sizepx</tt> : render a thumbnail version of the image that's [size] pixels wide (e.g. "150px"). Height is computed to keep aspect ratio (i.e. the shape of the image).

Vertical bars (the pipe "|" character) are used to separate options from each other and from the caption text. Unknown options are ignored and the final parameter is used as the caption text.

Variables
NUMBEROFARTICLES is the number of pages in the main namespace which contain a link and are not a redirect, i.e. number of articles, stubs containing a link, and disambiguation pages.

CURRENTMONTHNAMEGEN is the genitive (possessive) grammatical form of the month name, as used in some languages; CURRENTMONTHNAME is the nominative (subject) form, as usually seen in English.

In languages where it makes a difference, you can use constructs like to convert a word from the nominative case to some other case. For example, means the same as.