WikiTutorial

From NexusCrossing

Jump to: navigation, search

Contents

[edit] Last Updated: 8 Apr 09

[edit] introduction

Here I will start to explain the basics of editing a wiki. For the most part though if you can use a word processor then you can learn to use a wiki. The vast majority of it is simply plain text with a few extra markings here and there.

The first piece of advice I can give you, is to hit the edit button at the top of this screen and see what has been done here. The first thing you will notice is that the vast majority of the text is just that, text. You do not need to know HTML to be able to use a Wiki. There are places where it helps, but it is completely possible to do hundreds of pages without entering a single line of HTML. The reason for this is that the wiki takes the text we give it and converts it all to HTML for us when it loads the page. There are a few HTML tags that it will accept, but most it will simply ignore.

Instead of using HTML tags, most of the formatting is done using various markup symbols. These symbols are more like using punctuations than using HTML.

I will explain different aspects of wiki editing in the sections bellow. I will also demonstrate the use of many of the tags and markups. Don’t worry if it is all a little confusing at first, you will get used to it quickly.

[edit] Notes

  • I will make a few References to MediaWiki[1]. MediaWiki is the software that is being used to run this wiki.  :-) It rocks.
  • If you think things could be better worded, better organized, or if you know how to do something that is not covered here, feel free to edit the page. Also, if you want to make comments but don't want to take the plunge and edit it yourself, use the discussion page. :-)

[edit] Headings

The title of this section is simply “Headings,” and that is what we are going to discuss.

Headings, like in any other web page, are used to break up information into sections. This helps to make things easier to read, and can help the flow. It also makes things easier if the page gets too long and has to be divided into more than one page. If you have it divided into sections already, then half the work is already done. Headings have another useful effect in a Wiki as well.

If you are logged in, then you should see a link out to the far right of the heading. Since this wiki page is divided up into sections divided with headings, it can be edited in sections. You do not have to edit the entire page at once. This is important if you have a slow or unstable internet connection. If you edit by section, and only half of your data gets sent, then you only have one section to fix.


Headings are set apart by putting them on a line by themselves, and marking either side with one or more equal (=) signs. There are four degrees of headings which correspond to the HTML tags <h1> to <h4>. Here I will show examples. First of all, the heading of this section is written as =Headings=. There is 1 = on either side.

I will demonstrate the rest of the heading levels by showing them to you here. Again, if you hit edit, you can see everything in context. Even though I will be presenting new heading sections, they will still show up because they are lower level than this section. If you hit the edit button next to Headings, then it will show form the first line that says =Headings=, all the way to the next top level heading.

[edit] H2

== H2 ==

[edit] H3

=== H3 ===

[edit] H4

==== H4 ====

[edit] Paragraphs and Indentation

[edit] Paragraphs

While headings are the most obvious ways to set things appart, a more basic and elemental way is simply using paragraphs. Separating two paragraphs is simple. Just type naturally, and hit return twice at the end of a sentence.

Most of what you type is converted to HTML by the wiki. As a result, if you just hit return once at the end of a line and keep typing, then the system will assume it is all in one block, and run the information together like it would in HTML. If you hit return twice, then it converts the information to the equivalent of </p> and <p>. This just means that it creates a new paragraph. Basically, you don’t have to think about it, it just happens.


[edit] Indentation

Another way to set things apart without separate categories is to indent a block of text. This is done simply. Just put one or more colons (:) at the start of the line.

Example: :This is indented once.
::This is indented twice.
:::This is indented three times.
::::This is indented four times.

This is indented once.
This is indented twice.
This is indented three times.
This is indented four times.

[edit] Bolding and Italics

To make a piece of text bold or italicized we use a series of single quotes.

Example:

  • 'Test 1'
  • 'Test 1'
  • ''Test 2''
  • Test 2
  • '''Test 3'''
  • Test 3

As you can see, just one set of single quotes has the normal punctuation effect. Two sets produces italic text, and three produces standard bolded text. These are equivelent to <b></b> and <i></i>.

[edit] Preformatted Text: Block Text and Code Snippets

MediaWiki has a very simple way to indicate that text is intended to be preformatted block text.

To create a block of preformatted text:

Simply include an extra space above and bellow the block of text and include one or more 
blank spaces at the start of each line.

If you have to have multiple paragraphs in the same block, make sure to include the same 
number of spaces at the start of “empty” lines as well.  Remember, to a computer there is 
no such thing as a blank line.  We don’t see it, but a blank line has a character at the
end of it indicating a carriage return.

Any text in a block like this is treated as preformatted text, and the wiki does not do anything to it. This makes it ideal for displaying code snippets and examples.

 #include <iostream>
 
 int main(void)
   {
     std::cout << “Hello World!” << std::endl;
     return(0);
   }


[edit] Linking and Creating New Pages

These two topics are covered in the same topic for a very simple reason. The easiest and most common way to create a new page is to simply link to a page that does not exist.

When you are editing a page, and you create a link to another page on the wiki, if that page does not exist then people who follow the link will be given the option to create and edit the page.

[edit] Linking Within the Wiki

There are two main formats for linking within the wiki:

[[PageName]]
[[PageName|Link Text]]

The main difference is that if you just use the page name for the link, that is what will show up on the page. If you use the second option, then the Link text you type after the | will be what shows up on the page. Both are very useful at times.

Also, if the name of the page has spaces in it, you can represent those spaces as underscores (_) or just type spaces. The wiki will treat underscores and blank spaces the same everywhere except the actual file name in the URL.

Here are a few examples:

Main_Page
Main Page
Go to the Main Page

Here is what that looks like in code.

 
  ::[[Main_Page]]
  ::[[Main Page]]
  ::[[Main Page|Go to the Main Page]]
  

Remember that the :: tells the wiki to indent the paragraph twice. I used it mainly to set the links apart from the rest of the text.

[edit] External Links

External links are just as easy. There are a few ways to do them as well.

1. if you type a URL directly into the text, such as http://wiki.nexuscrossing.org/, the wiki will see that as a URL and automatically create a link using the URL itself as the Link Text.

2. If you type a link like this [http://wiki.nexuscrossing.org/] it will do this: [1]. Not very intuitive is it? There are some cases though, where this is actually what you want. I will leave that up to you to decide when and where.

3. Finally, if you type a link like this: [http://wiki.nexuscrossing.org/ Nexus Wiki], it treats the text after the first blanks space as Link text, like this: Nexus Wiki.

The little graphic it puts off the right of the link is just to make sure the user knows they are clicking an external link (in theory at least. As you see, all the links in this section go to the front page of the wiki).

See, links are pretty easy.

[edit] New Pages

As I stated in the start of this section, creating a new page is a simple matter of creating a link on the wiki page you are already editing. When you follow that link, it will take you to the new page and you can start editing right away.

Alternatively, if you look at the URL for this page, you will see that it is http://wiki.nexuscrossing.org/index.php/WikiTutorial. If you change the word WikiTutorial to the name of another page, it will take you to that page. If the page does not exist, then it will act just as if you had followed a link from another wiki page and give you the opportunity to create the new page. Remember, if you came to this page through a link from another wiki (such as http://stalkers.nexuscrossing.org/) you will want to make sure that you create the page in the wiki you want to create it in.

Again, here is an example of what I have stated here:

http://wiki.nexuscrossing.org/index.php/RandomNewPage
RandomNewPage

[edit] Citations

By default, MediaWiki does not include a built in tag for citations. However, there is a module readily available from their website named Cite. Cite is enabled on this Wiki.

To use Cite, simply include the <ref></ref> pair where you want to include a reference. Then at the end of the page include the tag <references /> where you want to include the reference list.[2] In fact, that is exactly what I have done here.

[edit] Discussing a Page

At the top of every page there is a link that says "Discussion." That takes you to the pages Talk page. It is mostly like any other wiki page except that it includes a button at the top that lets you add a new section without having to hit edit for the whole page.

The purpose of that page is easy. It gives you a place to talk about changes to the page before it is edited, or to talk about issues related to the content of the page.

[edit] Tracking Changes

MediaWiki provides a handfull of built in ways to track changes to wiki pages. The first an most broadly purposed one is the Recent changes link on the left side of the page, in the navigation bar. This will bring up a list of all the changes that have been made recently.

Another option is the Watch link at the top of every page. You can use that link to add the page to your watch list. Once a page is in your watch list, you can click on the my watchlist link at the top of the page and see if any changes have been made recently to the pages on your list.

Third, and most specific, is the history link at the top of every page. It will take you to the revision history for that particular page.

[edit] References

  1. http://www.mediawiki.org/
  2. http://www.mediawiki.org/wiki/Extension:Cite
Personal tools