CSWiki Howto

From CSclasswiki
Jump to: navigation, search

Example Wiki page for Computer Science courses

at Smith College

--Thiebaut 16:33, 25 September 2008 (UTC)

This is an example of a page with most of the features you will want to use to create your wiki. You must be logged in to be allowed to edit pages on this system.

The best way to use this page is to browse this page normally and see the feature you want to use, then click the edit link associated with the section containing this feature, look at the syntax you need to use to create the feature, and then click Back on your browser menu to quit the editing mode.


Lists are easy to create. Just use a *-character as the first character of a new line. It will become a bullet. If you want to use a numbered list, just use a #-character as the leftmost

For a good guacomole, you will need

  • an avocado
  • half a lime
  • a quarter of a red onion
  • half a small tomato
  • a few twigs of cilantro
  • a clove or two of garlic
  • salt and pepper

More Recipes from DT


  1. put the avocado, tomato, garlic, onion and cilantro in a blender
  2. blend quickly
  3. add the juice of the lime
  4. add salt and pepper to taste



To include an image in your page, you need to have the image available on your computer. Assume the image you want to insert is called computer.jpg.

Create an anchor for the image in the text using the following syntax:


Then save your page. The anchor for the image will appear red, indicating that Mediawiki does have this image yet. Click on the red text. An Upload page shows up. Click on Browse and find your image. The name you use for the image in your wiki page does not have to be the same as the name of the original image. Mediawiki will rename the image as it is uploaded.

103ag computer.jpg

103ag computer.jpg

You can also scale the image and move it to the right of the page, like this:

   [[Image:103ag_computer.jpg | thumb | 100px | right]]


External Links

External links refer to links to pages outside this mediawiki system.

For example, we can create a link to Google in this fashion: http://www.google.com

Or we could create a link caption for it as follows: To browse Google, please click here

Internal Links

To create a link to an other page in this mediawiki system, you need to first find the name of the page. It is always the orange text at the top of the browser window.

Then create a link to the page by using double-brackets. For example, to go back to the main page of this mediawiki, which is called Main_Page, we would write:

Click here to go back to the main page...


Go back to the Main_Page

Footnotes and List of References

We are on Smith College [1] campus.

The 5 colleges include Amherst, Hampshire, and Smith [1] among other campuses.

This is an example of multiple references to the same footnote.[2]

Such references are particularly useful when citing sources, if different statements come from the same source.[2]

A concise way to make multiple references is to use empty ref tags, which have a slash at the end. Although this may reduce redundant work, please be aware that if a future editor removes the first reference, this will result in the loss of all references using the empty ref tags.[2]

See the Notes Section at the end of this page for the references/footnotes created above.

Code and Program listings

You may want to save your program in a Wiki page. The advantage of doing this is two-fold. First you document your work with the program, allowing others to use it, and second, you use the versioning property of the Mediawiki software for keeping track of various versions of your program. You can check different versions of a wiki page by using the history link at the top of that page.

For small pieces of code, you can simply make sure each line starts with a space, and automatically Mediawiki will format your indented text in a nice box:

#!/usr/bin/perl -w
# D. Thiebaut
# Simple hello world program

print "Hello, World!\n\n\n";

(Look at this page in edit mode to see that each line above starts with a space, including the blank lines).

The other option, if you have a long piece of code, is to sandwich it between <code><pre> and </pre></code> tags, as done below:

#!/usr/bin/perl -w
# D. Thiebaut
# Simple hello world program

print "Hello, World!\n\n\n";

Uploading Code

Uploading complete scripts or program is done by clicking the "Upload File" link at the bottom of the page. For security reasons, uploading
files and other scripts is disallowed. However, you can add the suffix
to the filename and upload the file as simple text, instead.

Including PDF documents

If you want to include PDF documents in your wiki page, simply follow the same steps we use to include an image, but instead of using the prefix Image:, use Media:.

Note: You can only include links to PDFs. It is not possible at this time to have the PDF document show inside the wiki page, with other wiki elements showing next to it.

Click here to open a sample PDF document.


  1. 1.0 1.1 www.smith.edu located in Northampton, MA.
  2. 2.0 2.1 2.2 Remember that when you refer to the same footnote multiple times, the text from the first reference is used. Cite error: Invalid <ref> tag; name "multiple" defined multiple times with different content