Chapter 2 Wiki - Editing

(Wiki editing, namespaces; user page setup; copyright, a Course Journal stub page, and an insights! stub page)

2.1 Overview

2.1.1 Abstract:

This will likely be the first learning unit you work with, since your Course Journal will be kept on a Wiki, as well as all other deliverables. This unit includes an introduction to authoring Wikitext and the structure of Wikis, in particular how different pages live in separate “Namespaces”. The unit also covers the standard markup conventions - “Wikitext markup” - the same conventions that are used on Wikipedia - as well as some extensions that are specific to our Course- and Student Wiki. We also discuss page categories that help keep a Wiki organized, licensing under a Creative Commons Attribution license, and how to add licenses and other page components through template codes.

2.1.2 Objectives:

  • Provide an introduction to Wiki principles and Wikitext markup.
  • Create first pages on your own on the Student Wiki.
  • Learn about copyright, why we use Creative Commons licenses for the Student Wiki and how to place a license tag.

2.1.3 Outcomes:

  • You are competent with basic Wiki markup and the extensions on this Wiki.
  • You can create pages and add them to categories while taking care to create them into your own user space.
  • You have created your own user page on the Student Wiki and added contents.
  • You have created page stubs for a Course Journal and an insights! page.

2.1.4 Deliverables:

  • Specified as “Tasks”: There are no general deliverables for this unit; specific deliverables are described in the “Task” sections.

2.2 Wiki

Collaboration is a common theme for modern lab work and a Wiki is a great way to share and seamlessly update information in groups - or just for yourself. Probably the most sophisticated Wiki software is MediaWiki, a set of PHP scripts that is under continuous development by the Wikimedia foundation; it is the same software that runs Wikipedia. This is open source, free software that is easy to install, is well documented and requires very little resources other than a machine that runs a MySQL database server and an Apache Webserver. Numerous extensions exist (and extensions are not hard to write); they enhance the already rich functionality. But let’s start with small steps. You should by now have a user account on the Student Wiki, and I have configured that Wiki so that:

  • only logged in users can view the pages; but …
  • all logged in users can create and edit (most) pages at will.
  • This means you could edit pages that don’t “belong” to you. Respect the “House Rules” and don’t edit other’s things without permission, even if you can think of a particularly witty comment or hilarious prank. If you want to comment on a page: every page has an associated “Discussion” page that you can freely edit. Remember to “sign your name” to discussion entries.

2.3 Task 1

  1. Access the Student Wiki;
  2. log in and navigate to your user page. (Your user page is linked to your name that appears at the top of every Wikipage once you are logged in.)
  3. Create / edit the page, try out and experiment with the Wikitext syntax that this unit covers as you read about the different elements.
  4. Work through the contents below.

For more extensive formatting help see:

For Math markup see:

2.4 The Wiki concept

Wiki sites are collections of Web pages that allow you to view, edit and create pages from your browser, there is no need for special technology and basic editing is simple and intuitive with “Wikitext markup”.

The basic workflow of Wikis is straightforward:

  • Register an account and browse the site.
  • Whenever you find something that you can improve, edit it.
  • Whenever you find something that you would like to comment on, click on the “discussion” tab and share your views.
  • If you are interested in what becomes of your edits or the discussion, click on the “watch” tab, and the page will be added to a list of bookmarks to pages you are “watching”. (You can even generate an RSS feed for recent changes or new pages).
  • No e-mail, no obligations. Do what you like, when you like, what you can.
  • Editing on the Course Wiki is only enabled for instructors. However you can freely edit all pages on the Student Wiki, once you have an account.

2.5 Editing basics

2.5.1 Start editing

To start editing a Wiki page, click on the “Edit” link at one of its edges. This will bring you to the edit page: a page with a text box containing the wikitext: the editable source code from which the server produces the webpage.

2.5.2 Preview before saving

When you have finished, press Show preview to see how your changes will look. Repeat the edit/preview process until you are satisfied, then click Save and your changes will be immediately applied to the article and accessible on the Web. They will also be stored in the main database for as long as the Wiki exists. Thus it is always possible to get back earlier versions of pages - back to the very first edit.

2.5.3 Basic text formatting

Here are some examples of the markup of Wikitext. It is not the same as HTML markup, however some HTML markup will work. In particular, the Wiki applies styles through CSS technology (Cascading Style Sheets) and thus HTML tags can be used to apply consistent styles to individual page elements. Javascript won’t work.

What you type What it looks like
You can ‘’emphasize text’‘by putting two apostrophes on each side. Three apostrophes will emphasize it’‘’strongly’‘’. Five apostrophes is’‘’’‘even stronger’‘’’’. You can emphasize text by putting two apostrophes on each side. Three apostrophes will emphasize it strongly. Five apostrophes is even stronger.
A single newline has no effect on the layout.But an empty line starts a new paragraph. A single newline has no effect on the layout.
But an empty line starts a new paragraph.
You can break lines without starting a new paragraph using a <br> tag. You can break lines
without starting a new paragraph.

(This may not be very useful beyond the types of examples we show here, but it is a frequent source of confusion, when you find your text marked up this way by accident) You can format text in a monospace font with a dashed box around it either by marking it with the HTML <pre> tag, or by putting a blank space at the beginning of a line. Example:

You can format text in a monospace font with a dashed box around it either by marking it with the HTML \" tag, or by putting a blank space at the beginning of a line.

2.5.4 Other special characters at the beginning of a line include:

What you type What it looks like
* bulleted list * bulleted list
# numbered list 1. numbered list
; term term
: definition definition

2.5.5 Other special characters at the beginning of a line include:

You should “sign” your comments on discussion pages:

What you type What it looks like
: Three tildes gives your user name - ~~~ Three tildes gives your user name - Boris (talk)
: Four tildes: user name plus date/time - ~~~~ Four tildes: user name plus date/time - Boris (talk) 22:18, 27 December 2012 (EST)
: Five tildes: date/time alone - ~~~~~ Five tildes: date/time alone - 22:18, 27 December 2012 (EST)
Use normal HTML character codes for special characters, or use Unicode. For example: &gt; &lt; &amp; &deg; &Aring; &Auml; &uuml; &rarr; Use normal HTML character codes for special characters, or use Unicode. For example: > < & ° Å Ä ü →
Signatures NOT supported in github wikimedia implementation

2.5.6 You can use HTML tags, too, if you want. Some useful ways to use HTML:

What you type What it looks like
Put text in a typewriter font (with <tt>). The same font is generally used for computer code (with <code>). Put text in a typewriter font.The same font is generally used for computer code.
Strike out (with <string>) or underline text(<u>), or write it in small caps(with <span style=“font-variant:small-caps”>. Strike out or underline text, or write it in small caps.
Superscripts (with <sup>) and subscripts(with <sub>) : x2, x2 x2, x2
Invisible comments that only appear while editing the page.

For a list of HTML tags that are allowed, see HTML in wikitext. I tend to use Wiki-markup when I’m in a hurry, but use the HTML tag whenever I can’t remember a Wiki-tag. It really doesn’t make a difference.

However: I never use Wiki-table markup. I find it less intuitive than HTML markup, more difficult to debug, and there’s really no point in remembering both types of markup given that one really needs to be comfortable with HTML tables anyway.

2.5.8 Special syntax

Two special syntax items need to be mentioned: “templates” and “magic words”: Templates

Templates are pieces of Wikitext that are substituted where a code that links to them has been placed into a page. For example, if you enter {{Lorem}} on a page, the “Lorem ipsum dolor sit amet …” placeholder text is inserted in place of that code. Wikis make extensive use of templates.

Templates NOT supported in github wikimedia implementation Magic words

some reserved “magic”-words are replaced with dynamically created contents when the page is rendered. For example _TOC_ forces placing a Table Of Contents at the position of this token rather than its default position, while _NOTOC_ suppresses creation of a Table Of Contents on a page.

2.5.9 Creating a new page

To create a new page simply insert a link to a Wiki page, which has a page name that does not exist yet. The link will appear in red (except if you inadvertently used the name of a page that already exists), and the new page will be created when you click on the link. Page names can be long and contain blank spaces. Internally, all blank spaces are converted to underscore characters, but you can use the page name without underscores in links; the Wiki software translates this for you.

2.5.10 Namespaces

The Wiki maintains some pages in special collections, in so called “namespaces”. This is useful, because the behaviour of the software can be customized for different namespaces: for example you may be allowed to edit in the main- and the user- namespace, but not in the MediaWiki: namespace, where pages are held that affect the gears and wires of the Wiki. Page names without a prefix live in the main space. Some commonly used prefixes are:

  • User: - personal pages for user with an account on the Wiki;
  • Talk: - discussion pages for comments on pages, accessible via the “Discussion” tab;
  • Help: - this page for example;
  • Template: - pages with reusable text.
  • Special: - pages that implement special functionality (like login, user lists, or lists of recently changed pages);
  • Category: - an index of pages that have been given a common tag. This is a convenient way to access pages that are in some way related;

2.5.11 Categories

Once your page has been edited, you can associate it with one or more categories. Add the appropriate category tag by typing [[Category:BCH441_2013]] or [[Category:BCB410_2013]]. The page is then automatically linked from a page that collects all pages with that category tag. I would prefer that you do not create new categories; ask me if you feel a need for it.

Categories NOT supported in github wikimedia implementation

2.5.12 Creating a new section or subsection on a page

To create a section or subsection, simply insert a section header into an existing section. Header levels are defined by the number of “=” characters before and after the header text. Click on an edit link of this page to see example code. Once a page has more than two headings, the Wiki automatically creates a table of contents. You can adjust the position of the table of contents by typing the “magic word” _TOC_ somewhere on your page (Note: double underscore), you can also suppress having a table of contents created with _NOTOC_.

2.5.13 Edit conflicts

If someone else makes an edit while you are making yours, the result is an edit conflict. Many conflicts can be automatically resolved by the Wiki. If it can’t be resolved, however, you will need to resolve it yourself. The Wiki gives you two text boxes, where the top one is the other person’s edit and the bottom one is your edit. Merge your edits into the top edit box, which is the only one that will be saved.

2.5.14 Reverting pages to a previous state

Sometimes a page needs to be reverted to a previous state. Access the page through a link to the Recent Changes special page: Special:Recentchanges. Find the page you need to revert, click on the hist link, click on the version you need and verify that it is the correct one. Then click on the edit tab at the top and Save page. A new version of the page is then created with the old text. Note that this does not actually overwrite anything - all edits are archived in the database.

2.6 The “User space” and subpages

The User: namespace on the Student Wiki is especially important.

Namespaces allow us to distinguish pages that share the same logical name. Every student will create a journal page, but of course there can be only one [[Journal]] page on the Wiki. Therefore each of these pages needs a distinct name. The obvious solution is to keep them in the User: namespace, and create them as subpages of everyone’s User page. The page name of your user page is [[User:]]; subpages are created with a backslash, and therefore your Course Journal page should be [[User:/Journal]]. if you take more than one course, you can separate the journals like [[User:/BCH441-Journal]], [[User:/BCB410-Journal]], etc.

Please do not create pages in the “Main space” of the Student Wiki! Do not omit the User:/ part of the page name.

2.8 Task 2

  • Practice basic editing syntax by putting contents on your User Page:
    • enter your name,
    • your major(s), specialist program, year of study - or a link to your lab and your thesis theme if you are a graduate student;
    • enter your email address. I use this information a lot when I need to contact students, so make sure it is correct and current.
    • Add a category tag to your User page for the course you are taking. All pages with this tag are accessible via the link in the sidebar. What should the category tag say? Good question … go and find out.
    • Add a copyright template to the bottom of your user page by putting a {{CC-BY}} tag on its bottom.
    • Feel free to look at my User Page for code examples: clicking on the edit link will show you the source text. How do you find my User Page? Good question …
    • Create a subpage to your User Page; call it “Journal”. Note: the link MUST be in your “User space”. If you don’t add the prefix User:yourname/… before your page name, the new page will end up in the main “namespace”. I’ll then have to delete it. That’s not good. Make sure you know what you are doing, for example by looking at the code on my User Page, asking someone who knows, or asking on the mailing list.
    • Put some placeholder text on your journal page, you will fill it in when you work through the Journal unit.
    • Similarly, create an “insights!” page on a subpage to your User Page and add some placeholder text. That will be expanded when you work through the insights! unit.
    • Play around some more. Feel free to ask how to go about achieving a particular effect that you may have seen elsewhere.

2.9 Self-evaluation

You should be familiar with the following:

  • How to Login to the Student Wiki and access your user page;
  • viewing a page’s history;
  • basic text formatting and Wiki markup;
  • “signing” your name;
  • creating internal and external links;
  • creating section headers on a page on multiple levels;
  • reverting a changed page to an earlier version;
  • creating a new page (as a subpage of an existing page);
  • the concept of namespaces - especially the default (“main”) and User: namespace;
  • the concept of categories and how to add a page to a category;
  • copyright on the Student Wiki, and how to insert a license note.


  2. Note:that additional rules for collaboration in the context of coursework derive from the rules for academic integrity and plagiarism. If some text is not copyrighted, this does not mean you can use it without reference and thus imply it is your own idea. That would be plagiarism.