Help:Editing

From Missouri Academy Wiki
Jump to navigation Jump to search

While we can teach you some, one of the best ways to learn how to edit the wiki is to open the edit dialog on a page (such as this one), and look at the code. Clicking the "Show preview" button will let you see what code translates to what type of text. Also, for practice with wiki syntax, try stuff out in the sandbox.

Formatting

Headers

To create a header, surround the text with equals signs. There are five levels of headers, denoted by the number of equals signs. For example, the largest headers have two equals signs on each side, while the smallest have six.
This is how you type the headers:
==Header Level 1==
===Header Level 2===
====Header Level 3====
=====Header Level 4=====
======Header Level 5======
=======Header Level 6=======

Lists

There are two methods of making lists. You can use HTML if you wish, but MediaWiki makes it more convenient by allowing us to use asterisks to denote list items and their level. Note that in order for MediaWiki to catch asterisks, they have to be the first things on a new line, *no spaces*. This is because it would be a terrible design flaw for every asterisk to be turned into a bullet, and very few text parsers would be able to figure out exactly what you want in every circumstance.

*List item
**Sub-list item
    translates to    
  • List item
    • Sub-list item

Tabbing

MediaWiki (to a degree) ignores whitespace, and treats it all like it's one space. One helpful formatting tool is the tabbing ability, which is very much like the lists, but it doesn't use bullets. So the same rules apply, but you use colons (:), rather than asterisks.
Example:

One colon.
Two colons.

Whitespace

Earlier it was mentioned that MediaWiki ignores whitespace. This is not entirely true, but is also not immediately obvious how it handles things. Here are some rules that it follows:

  • Multiple spaces are translated into one space.
  • One newline is considered no different from a space (presumably for the sake of making the code behind the pages easier to deal with without undue worrying about whitespace).
  • Two newlines signify a new paragraph, and MediaWiki will start the new paragraph on a new line, with a 1.5 line spacing between paragraphs.
  • Colons (and asterisks) may be on adjacent lines, and not be condensed into one. For an example, see the lists section of this page.

The <nowiki> Tag

Sometimes, say when writing an editing help page, MediaWiki's formatting can get in the way of what you're trying to convey. For this, there is the <nowiki> tag. Anything between <nowiki> and </nowiki> is considered plain text, and even HTML within it is ignored (though whitespace rules still apply). So if you find yourself writing, and the wiki misinterprets what you mean, you can tell it to shut up and sit down with the <nowiki>.

Links

Links are at the heart of a wiki. By linking between related subjects, readers find themselves reading things they wouldn't have found, or even thought to look for, otherwise.

Internal links

Internal links let you move around within the wiki with ease. MediaWiki makes it easy to link to something else within the wiki by surrounding the link with double-square brackets ([[text]]). For example [[ALF]] will link us to the ALF article.

Now sometimes you will find that you're using a different form of a word than there is an article for, or perhaps you're making more subtle comments with your links. In either case, you're not going to be linking to an article named with the words you're using. For this, we use the bar (or pipe) (|) after the article title, but before the link text. Thus, I can type [[MASMC|Academy]] if I want Academy to link to the MASMC page.

A neat side effect of having headers in our pages is that we're now able to link directly to those headers. If you're familiar with HTML, we'll be using the same symbol: the pound sign (#). In order to link to a header, you type the name of the page you want, the pound sign, and then the text of the header. For example [[Help:Editing#Internal Links|Internal Links]] will return you to the Internal Links header above. That's the long way. If you're linking to a header on the same page, you can drop the article name, and use [[#Internal Links|Internal Links]].

External links

You may run across situations in which you'd like to link to something outside the wiki. Unfortunately for those of you who expected an easy transition from HTML, this one's a bit of a killer: you can't use the <a> tag. Fortunately, the MediaWiki way is comfortingly easy.

If you type a URL, it will link automagically, which is rather handy as there aren't many times you'll be typing URL's and thinking "No, I really don't think this should be a link." In those situations, see the <nowiki> tag section. Thus, I simply type the URL, and you're sent off to http://www.google.com/.

External links use single brackets, rather than double. If you type the URL with brackets around it, it shows up as a number, which makes it very useful for unintrusive referrence citations. Thus, [http://en.wikipedia.org/wiki/Sneeze] tells you where I found out that orgasms can cause sneezes[1].

You can also have a link with words. So if I wanted to link to The Best Page in the Universe, I would just type [http://maddox.xmission.com/ The Best Page in the Universe].

Discussions

use four tildes (~~~~) to post a timestamp. Example: Andy 20:12, 24 Dec 2004 (EST)

three tildes will just post your linked name without a time stamp --Chrax

five tildes will put just the time 21:16, 24 Dec 2004 (EST)