Difference between revisions of "CSWiki Howto"
(New page: __TOC__ =Example Wiki page for Computer Science courses at Smith College= This is an example of a page with most of the features you will want to use to create your wiki. You must be lo...) |
(→Example Wiki page for Computer Science courses at Smith College) |
||
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
− | =Example Wiki page for Computer Science courses at Smith College= | + | =Example Wiki page for Computer Science courses<br /><br />at Smith College= |
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. | 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. |
Revision as of 14:15, 16 September 2008
Contents
Example Wiki page for Computer Science courses
at Smith College
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
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
Steps:
- put the avocado, tomato, garlic, onion and cilantro in a blender
- blend quickly
- add the juice of the lime
- add salt and pepper to taste
Images
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:
[[Image:103ag_computer.jpg]]
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.
You can also scale the image and move it to the right of the page, like this:
[[Image:103ag_computer.jpg | thumb | 100px | right]]
Links
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...
or
Go back to the Main_Page
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.plor
.shor
.pyfiles and other scripts is disallowed. However, you can add the suffix
.txtto 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.