Difference between revisions of "Help:Editing"

From "A B C"
Jump to navigation Jump to search
m
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is a condensed version of a much more comprehensive page in the [http://meta.wikimedia.org/w/index.php?title=MediaWiki_User%27s_Guide:_Editing_overview Media Wiki User's guide].
 
  
<div style=
+
__TOC__
  "padding: 5px; background: #EEEEF8;  border:solid 1px #AAAAAA; line-height: 100%;
+
 
  ">
+
{{Vspace}}
For more extensive '''formatting''' help see: http://www.mediawiki.org/wiki/Help:Formatting<br />
+
 
 +
<section begin=Wiki-editing />
 +
 
 +
<div class="note">
 +
For more extensive '''formatting''' help see: http://meta.wikimedia.org/wiki/Help:Editing<br />
 
For '''Math''' markup see: http://meta.wikimedia.org/wiki/Help:Formula<br />
 
For '''Math''' markup see: http://meta.wikimedia.org/wiki/Help:Formula<br />
 
</div>
 
</div>
&nbsp;
 
  
 +
 +
{{Vspace}}
 +
 +
== 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 [[Special:watchlist|pages you are "watching"]]. (You can even generate an RSS feed for [http://biochemistry.utoronto.ca/undergraduates/courses/BCH441H/wiki/index.php?title=Special:Recentchanges&feed=rss recent changes] or [http://biochemistry.utoronto.ca/undergraduates/courses/BCH441H/wiki/index.php?title=Special:Newpages&feed=rss new pages]).
 +
 +
No e-mail, no obligations. Do what you like, when you like, what you can.
 +
 +
;Editing on the [http://steipe.biochemistry.utoronto.ca/abc/ Course Wiki] is only enabled for instructors. However you can freely edit all pages on the [http://steipe.biochemistry.utoronto.ca/abc/students/ Student Wiki], once you have an account.
 +
 +
{{Vspace}}
 +
 +
<!--
 +
== Types of pages ==
 +
 +
Obviously, some pages simply present information. These pages are generically called "Articles". This page is an article. Other pages have special roles that help organize this Wiki. Their purpose is explained below.
 +
 +
=== Discussion (or "Talk pages") ===
 +
(A brief discussion of the relationship of articles and discussion (or "talk" pages) - when to contribute to contents and when to contribute to the discussion ''about'' contents.)
 +
{{stub}}
 +
 +
=== Stubs ===
 +
'''Stubs''' are pages or sections on pages that have not yet been fully written and as such do not yet contain truly useful information, besides the fact that the page or section exists. Far from being useless, a stub is the first step an article takes on its course to becoming complete.
 +
 +
A good stub article should minimally define the title and purpose of the page or section, so it is clear what it should be about and someone can usefully add to the page.
 +
 +
After creating (or encountering) the page, you should insert a ''stub template''. See [[Help:Editing#Inserting a stub template| the ''Editing'' page]] for details.
 +
 +
Once the stub has been usefully expanded, you or anyone else can remove the stub tag. No formal permission is needed.
 +
 +
=== Special Pages ===
 +
(A brief survey and explanation of what special pages are for.)
 +
{{stub}}
 +
 +
-->
 +
 +
{{Vspace}}
  
 
== Editing basics ==
 
== Editing basics ==
  
 
;Start editing
 
;Start editing
:To start editing a Wiki page, click on the "'''Edit this page'''" (or just "'''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.
+
: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.
  
''If you just want to experiment, please do so in the [[Sandbox|sandbox page]], not here''.
+
<!-- ''If you just want to experiment, please do so in the [[Sandbox|sandbox page]], not here''. -->
  
 
;Preview before saving
 
;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..
+
: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.
 +
 
  
 
=== Basic text formatting ===
 
=== 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. Javascript won't.
+
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.
  
 
{| border="1" cellpadding="2" cellspacing="0"
 
{| border="1" cellpadding="2" cellspacing="0"
Line 120: Line 167:
 
|
 
|
 
You should "sign" your comments on discussion pages:
 
You should "sign" your comments on discussion pages:
: Three tildes gives your user name - [[User:Steipe|Boris Steipe]]
+
: Three tildes gives your user name - [[User:Boris|Boris]] ([[User talk:Boris|talk]])
: Four tildes: user name plus date/time - [[User:Steipe|Boris Steipe]] 21:06, 11 December 2005 (EST)
+
: Four tildes: user name plus date/time - [[User:Boris|Boris]] ([[User talk:Boris|talk]]) 22:18, 27 December 2012 (EST)
: Five tildes: date/time alone - 21:06, 11 December 2005 (EST)
+
: Five tildes: date/time alone - 22:18, 27 December 2012 (EST)
 
|<pre><nowiki>
 
|<pre><nowiki>
 
You should "sign" your comments on discusion pages:
 
You should "sign" your comments on discusion pages:
Line 131: Line 178:
 
|-
 
|-
 
|
 
|
Use normal HTML character codes for special characters,
+
You can use normal HTML character codes for special characters such as &gt; &lt; &amp; &deg; &Aring; &Auml; &uuml; &rarr;<br/>
or use Unicode. For example:
+
... but modern browsers will handle Unicode well enough: > < & ° Å → 烦死了! (¬A)⊕A
&gt; &lt; &amp; &deg; &Aring; &Auml; &uuml; &rarr;
 
 
|<pre><nowiki>
 
|<pre><nowiki>
Use normal HTML character codes for special characters,
+
You can use normal HTML character codes for special characters such as &amp;gt; &amp;lt; &amp;amp; &amp;deg; &amp;Aring; &amp;Auml; &amp;uuml; &amp;rarr;
or use Unicode. For example:
+
... but modern browsers will handle Unicode well enough: > < & ° Å → 烦死了! (¬A)⊕A
&amp;gt; &amp;lt; &amp;amp; &amp;deg; &amp;Aring; &amp;Auml; &amp;uuml; &amp;rarr;
 
 
</nowiki></pre>
 
</nowiki></pre>
 
|-
 
|-
 
|
 
|
You can use <b>HTML tags</b>, too, if you
+
You can use <b>HTML tags</b>, too, if you want. Some useful ways to use HTML:
want. Some useful ways to use HTML:
+
 
 +
Put text in a <tt>typewriter font</tt>. The same font is generally used for <code>computer code</code>.
  
Put text in a <tt>typewriter font</tt>.
+
<strike>Strike out</strike> or <u>underline</u> text, write <span style="font-variant:small-caps"> in small caps</span>,  <span style="background-color: #FFFFAA;">highlight</span>, or <span style="color: #DD0000;">color</span> for emphasis.
The same font is generally used for
 
<code>computer code</code>.
 
  
<strike>Strike out</strike> or
+
Superscripts and subscripts: x<sup>2</sup>, x<sub>2</sub>
<u>underline</u> text, or write it
 
<span style="font-variant:small-caps">
 
in small caps</span>.
 
  
Superscripts and subscripts:
+
Invisible comments that only appear while editing the page.
x<sup>2</sup>, x<sub>2</sub>
+
<!-- Note to editors: Be kind! -->
  
Invisible comments that only appear
 
while editing the page.
 
<!-- Note to editors: blah blah blah. -->
 
 
|<pre><nowiki>
 
|<pre><nowiki>
 
You can use <b>HTML tags</b>, too, if you
 
You can use <b>HTML tags</b>, too, if you
Line 167: Line 205:
 
<code>computer code</code>.
 
<code>computer code</code>.
  
<strike>Strike out</strike> or
+
<strike>Strike out</strike> or <u>underline</u> text, write  
<u>underline</u> text, or write it
+
<span style="font-variant:small-caps"> in small caps</span>,
<span style="font-variant:small-caps">
+
<span style="background-color: #FFFFAA;">highlight</span>, or
in small caps</span>.
+
<span style="color: #DD0000;"> color</span> for emphasis.
  
 
Superscripts and subscripts:
 
Superscripts and subscripts:
Line 177: Line 215:
 
Invisible comments that only appear
 
Invisible comments that only appear
 
while editing the page.
 
while editing the page.
<!-- Note to editors: blah blah blah. -->
+
<!-- Note to editors: Be kind! -->
 
</nowiki></pre>
 
</nowiki></pre>
 
|}
 
|}
  
For a list of HTML tags that are allowed, see [http://meta.wikimedia.org/wiki/Help:HTML_in_wikitext HTML in wikitext]. However, you should generally avoid HTML in favor of Wiki markup to keep the pages consistently editable for all.
+
For a list of HTML tags that are allowed, see [http://meta.wikimedia.org/wiki/Help:HTML_in_wikitext 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.
 +
 
 +
 
 +
{{Vspace}}
  
 
== Links ==
 
== Links ==
Line 210: Line 253:
 
|-
 
|-
 
|
 
|
You can link an arbitrary piece of text
+
You can link to an arbitrary piece of text
 
with a ''piped link''. Put the link
 
with a ''piped link''. Put the link
 
target first, then the pipe character "|", then
 
target first, then the pipe character "|", then
Line 223: Line 266:
 
|
 
|
 
You can make an external link to a Web page
 
You can make an external link to a Web page
just by typing an URL, e.g. http://www.cbio.ca
+
just by typing an URL, e.g. http://igem.org
  
 
Or you can link arbitrary text:
 
Or you can link arbitrary text:
[http://www.cbio.ca CBIO].  
+
[http://igem.org iGEM].  
(Note: No "|",
+
(Note: No "|" for '''external''' links,
 
URL and text are separated by a blank,
 
URL and text are separated by a blank,
 
and only single square brackets!)
 
and only single square brackets!)
  
 
Or you can generate a footnote-like link:
 
Or you can generate a footnote-like link:
[http://www.cbio.ca].  
+
[http://igem.org].  
 
|<pre><nowiki>
 
|<pre><nowiki>
 
You can make an external link to a Web page
 
You can make an external link to a Web page
just by typing an URL, e.g. http://www.cbio.ca
+
just by typing an URL, e.g. http://igem.org
  
 
Or you can link arbitrary text:
 
Or you can link arbitrary text:
[http://www.cbio.ca CBIO].  
+
[http://igem.org iGEM].  
(Note: No "|",
+
(Note: No "|" for '''external''' links,
 
URL and text are separated by a blank,
 
URL and text are separated by a blank,
 
and only single square brackets!)
 
and only single square brackets!)
  
 
Or you can generate a footnote-like link:
 
Or you can generate a footnote-like link:
[http://www.cbio.ca].  
+
[http://igem.org].  
 
</nowiki></pre>
 
</nowiki></pre>
 
|}
 
|}
 +
 +
 +
'''Note:''' remember:
 +
* ''internal links'' (using <nowiki>[[...]]</nowiki> tags to link to pages '''on this Wiki''') are separated from linked text with a pipe character: <code>&#91;&#91;URL<span style="color:#DD0000;">|</span>text]]</code>.
 +
* ''External links'' (using <nowiki>[...]</nowiki> tags to link to pages '''elsewhere on the Internet''') are separated from linked text with a space character: <code>&#91;URL text]</code>.
 +
 +
{{Vspace}}
 +
 +
===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 <code><nowiki>{{Lorem}}</nowiki></code> on a page, the "Lorem ipsum dolor sit amet ..." placeholder text is inserted in place of that code. Wikis make '''extensive''' use of templates.
 +
 +
;Magic words
 +
:some reserved "magic"-words are replaced with dynamically created contents when the page is rendered. For example <code><nowiki>__TOC__</nowiki></code> forces placing a Table Of Contents at the position of this token rather than its default position, while <code><nowiki>__NOTOC__</nowiki></code> suppresses creation of a Table Of Contents on a page.
 +
 +
{{Vspace}}
  
 
== Creating a new page ==
 
== Creating a new page ==
  
To create a new page simply insert a link to a Wiki page that does not exist yet. The link will appear in red, the new page will be created when you click on it.  
+
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.
 +
 
 +
{{Vspace}}
 +
 
 +
===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 <code>MediaWiki:</code> 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:
 +
 
 +
*<code>User:</code> - personal pages for user with an account on the Wiki;
 +
*<code>Talk:</code> - discussion pages for comments on pages, accessible via the "Discussion" tab;
 +
*<code>Help:</code> - this page for example;
 +
*<code>Template:</code> - pages with reusable text.
 +
*<code>Special:</code> - pages that implement special functionality (like login, user lists, or lists of recently changed pages);
 +
*<code>Category:</code> - 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;
 +
 
 +
 
 +
{{Vspace}}
 +
 
 +
===Categories===
 +
 
 +
Once your page  has been edited, you can associate it with one  or more '''categories'''. For example, add the appropriate category tag by typing <code><nowiki>[[Category:BCH441_2020]]</nowiki></code>. 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.
  
 +
{{Vspace}}
  
 
== Creating a new section or subsection on a page ==
 
== 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.
+
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" <code><nowiki>__TOC__</nowiki></code>somewhere on your page (<small>Note: double underscore</small>), you can also suppress having a table of contents created with<code>_<nowiki>_NOTOC__</nowiki></code>.
  
 +
{{Vspace}}
  
 
== Edit conflicts ==
 
== Edit conflicts ==
 
If someone else makes an edit while you are making yours, the result is an [http://meta.wikimedia.org/wiki/Help:Edit_conflict 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.
 
If someone else makes an edit while you are making yours, the result is an [http://meta.wikimedia.org/wiki/Help:Edit_conflict 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.
  
 +
{{Vspace}}
  
 
== Reverting pages to a previous state ==
 
== Reverting pages to a previous state ==
  
Sometimes a page needs to be reverted to a previous state. Access the page throug the [[Special:Specialpages|Special pages]] menu to the left, where you can click on [[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 stored in the database.
+
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.
 +
 
 +
{{Vspace}}
 +
 
 +
== Special markup on this Wiki ==
 +
 
 +
Here are some special templates and extensions installed on this Wiki:
 +
 
 +
 
 +
====Vertical space====
 +
The template code <code><nowiki>{{Vspace}}</nowiki></code> will insert a two-line high space to help structuring text.
 +
 
 +
 
 +
====References and footnotes====
 +
Enclosing text in <code><nowiki>&lt;ref&gt; ... &lt;\ref&gt;</nowiki></code> tags will create a footnote reference and display the text wherever you place a <code><nowiki>&lt;references /&gt;</nowiki></code> tag on the page.<ref>This is what the link looks like - and as you can see if you hover over it, the reference gets displayed as hover-text.</ref> The reference will display as hover-text, so you can keep your references organized in one section of the page, but your in-text citations will show you the contents.
 +
 
 +
====Syntax highlight====
 +
The [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi '''GeSHI'''] syntax highlighter extension is installed on this Wiki but it was recently broken by the MediaWiki developers.
 +
 
 +
Type:<code>
 +
<nowiki>
 +
<source lang="R">
 +
for (i in 1:5) {
 +
    print(i^2)
 +
} # 1  4  9  16  25
 +
</source>
 +
</nowiki>
 +
</code>
 +
 
 +
... to get:
 +
<source lang="R">
 +
for (i in 1:5) {
 +
    print(i^2)
 +
} # 1  4  9  16  25
 +
</source>
 +
Note: no highlighting, and the page is flagged as having syntax highlighting errors.
 +
 
 +
====Pubmed Articles and abstracts====
 +
 
 +
<code><nowiki>{{#pmid:15289071}}</nowiki></code>
 +
:This inserts the article information in a <code>&lt;div&gt;</code>, formatted by [[Template:Pubmed]].
 +
{{#pmid:15289071}}
 +
 
 +
 
 +
<code><nowiki>{{#pmid: 15289071 |Steipe2004}}</nowiki></code>
 +
:This formats the pubmed parser output for the Cite extension; A footnote mark will be inserted ''here''{{#pmid: 15289071 |Steipe2004}} and the actual reference will appear beneath the <code>&lt;references /></code> section of the page. This too will be shown as hover-text.
 +
 
 +
====Math markup====
 +
<code><nowiki>&lt;math&gt;H = - \sum_{i=0}^n p_i \log_{2} p_i&lt;/math&gt;</nowiki></code>
 +
 
 +
 
 +
<math>H = - \sum_{i=0}^n p_i \log_{2} p_i</math><br />
 +
:see: http://meta.wikimedia.org/wiki/Help:Formula
 +
 
 +
 
 +
====ToDo items====
 +
Type:
 +
<code><pre><nowiki>
 +
&lt;div class="ToDo"&gt;
 +
ToDo:
 +
* This ...
 +
* and that.
 +
&lt;/div&gt;
 +
</nowiki></pre></code>
 +
 
 +
... to get:
 +
<div class="ToDo">
 +
ToDo:
 +
* This ...
 +
* and that.
 +
</div>
 +
 
 +
 
 +
====Notes====
 +
Type:
 +
<code><pre><nowiki>
 +
&lt;div class="note"&gt;
 +
Note: take special care to ...
 +
 
 +
&lt;/div&gt;
 +
</nowiki></pre></code>
 +
 
 +
... to get:
 +
<div class="note">
 +
Note: take special care to ...
 +
 
 +
</div>
 +
 
 +
 
 +
====Linking text to Wikipedia====
 +
 
 +
 
 +
... using the <code><nowiki>{{WP|...}}</nowiki></code> template.
 +
 
 +
If the linked text is the same as the Wikipedia page titke, simply type it:<br />
 +
<code><nowiki>{{WP|Mutual information}}</nowiki></code><br/>
 +
{{WP|Mutual information}}
 +
 
 +
{{Vspace}}
 +
 
 +
If the linked text is different, use the "|" pipe character to separate page-name and text:
 +
 
 +
<code><nowiki>{{WP|Mutual information|'''WP article on Mutual Information'''}}</nowiki></code><br />
 +
{{WP|Mutual information|'''WP article on Mutual Information'''}}
 +
 
 +
{{Vspace}}
 +
 
 +
====Collapsible elements====
 +
See: [http://www.mediawiki.org/wiki/Manual:Collapsible_elements Manual: Collapsible elements]
 +
 
 +
<pre><nowiki>
 +
<div class="mw-collapsible mw-collapsed" data-expandtext="Expand" data-collapsetext="Collapse" style="width:50%; ">
 +
Visible text  ...
 +
<div class="mw-collapsible-content" style="padding:10px;">
 +
* Collapsed text 1
 +
* Collapsed text 2
 +
* Collapsed text 3
 +
</div>
 +
</div>
 +
</nowiki></pre>
 +
 
 +
 
 +
Example:
 +
<div class="mw-collapsible mw-collapsed" data-expandtext="Expand for poem" data-collapsetext="Collapse" style="width:40%; border:solid 1px; background-color:#F6FFE6; padding:10px;">'''The Road Not Taken'''&nbsp;&nbsp;&nbsp;&nbsp;<small>''Robert Frost''</small> 
 +
<div class="mw-collapsible-content">
 +
Two roads diverged in a yellow wood,<br />And sorry I could not travel both<br />And be one traveler, long I stood<br />And looked down one as far as I could<br />To where it bent in the undergrowth;<br />&nbsp;<br />Then took the other, as just as fair,<br />And having perhaps the better claim<br />Because it was grassy and wanted wear,<br />Though as for that the passing there<br />Had worn them really about the same,<br />&nbsp;<br />And both that morning equally lay<br />In leaves no step had trodden black.<br />Oh, I marked the first for another day!<br />Yet knowing how way leads on to way<br />I doubted if I should ever come back.<br />&nbsp;<br />I shall be telling this with a sigh<br />Somewhere ages and ages hence:<br />Two roads diverged in a wood, and I,<br />I took the one less traveled by,<br />And that has made all the difference.
 +
</div>
 +
</div>
 +
 
 +
 
 +
 
 +
==Sample reference section==
 +
<references/>
 +
 
 +
<section end=Wiki-editing />

Latest revision as of 08:57, 26 October 2020


 


For more extensive formatting help see: http://meta.wikimedia.org/wiki/Help:Editing
For Math markup see: http://meta.wikimedia.org/wiki/Help:Formula


 

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.


 


 

Editing basics

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.


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.


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 it looks like What you type

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.

You can break lines<br>
without starting a new paragraph.<br>

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.

(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.

(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)

Other special characters at the beginning of a line include:

  • bulleted list
  1. numbered list
term
and definition
Other special characters at the beginning
of a line include:

* bulleted list

# numbered list

; term
: and definition

You should "sign" your comments on discussion pages:

Three tildes gives your user name - Boris (talk)
Four tildes: user name plus date/time - Boris (talk) 22:18, 27 December 2012 (EST)
Five tildes: date/time alone - 22:18, 27 December 2012 (EST)
You should "sign" your comments on discusion pages:
: Three tildes gives your user name - ~~~
: Four tildes: user name plus date/time - ~~~~
: Five tildes: date/time alone - ~~~~~

You can use normal HTML character codes for special characters such as > < & ° Å Ä ü →
... but modern browsers will handle Unicode well enough: > < & ° Å → 烦死了! (¬A)⊕A

You can use normal HTML character codes for special characters such as &gt; &lt; &amp; &deg; &Aring; &Auml; &uuml; &rarr;
... but modern browsers will handle Unicode well enough: > < & ° Å → 烦死了! (¬A)⊕A

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

Put text in a typewriter font. The same font is generally used for computer code.

Strike out or underline text, write in small caps, highlight, or color for emphasis.

Superscripts and subscripts: x2, x2

Invisible comments that only appear while editing the page.

You can use <b>HTML tags</b>, too, if you
want. Some useful ways to use HTML:

Put text in a <tt>typewriter font</tt>.
The same font is generally used for
<code>computer code</code>.

<strike>Strike out</strike> or <u>underline</u> text, write 
<span style="font-variant:small-caps"> in small caps</span>, 
<span style="background-color: #FFFFAA;">highlight</span>, or
<span style="color: #DD0000;"> color</span> for emphasis.

Superscripts and subscripts:
x<sup>2</sup>, x<sub>2</sub>

Invisible comments that only appear
while editing the page.
<!-- Note to editors: Be kind! -->

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.


 

Links

You will often want to make clickable links to other pages.

What it looks like What you type

Here's a link to a page named Sandbox. You can even say Sandboxes and the link will show up right.

You can put formatting around a link. Example: Sandbox.

Here's a link to a page named [[Sandbox]].
You can even say [[Sandbox]]es
and the link will show up right.

You can put formatting around a link.
Example: ''[[Sandbox]]''.

You can link to an arbitrary piece of text with a piped link. Put the link target first, then the pipe character "|", then the link text - as in this example.

You can link an arbitrary piece of text
with a ''piped link''. Put the link
target first, then the pipe character "|", then
the link text - as in [[Sandbox| this example]].

You can make an external link to a Web page just by typing an URL, e.g. http://igem.org

Or you can link arbitrary text: iGEM. (Note: No "|" for external links, URL and text are separated by a blank, and only single square brackets!)

Or you can generate a footnote-like link: [1].

You can make an external link to a Web page
just by typing an URL, e.g. http://igem.org

Or you can link arbitrary text:
[http://igem.org iGEM]. 
(Note: No "|" for '''external''' links,
URL and text are separated by a blank,
and only single square brackets!)

Or you can generate a footnote-like link:
[http://igem.org]. 


Note: remember:

  • internal links (using [[...]] tags to link to pages on this Wiki) are separated from linked text with a pipe character: [[URL|text]].
  • External links (using [...] tags to link to pages elsewhere on the Internet) are separated from linked text with a space character: [URL text].


 

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.
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.


 

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.


 

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;


 

Categories

Once your page has been edited, you can associate it with one or more categories. For example, add the appropriate category tag by typing [[Category:BCH441_2020]]. 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.


 

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__.


 

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.


 

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.


 

Special markup on this Wiki

Here are some special templates and extensions installed on this Wiki:


Vertical space

The template code {{Vspace}} will insert a two-line high space to help structuring text.


References and footnotes

Enclosing text in <ref> ... <\ref> tags will create a footnote reference and display the text wherever you place a <references /> tag on the page.[1] The reference will display as hover-text, so you can keep your references organized in one section of the page, but your in-text citations will show you the contents.

Syntax highlight

The GeSHI syntax highlighter extension is installed on this Wiki but it was recently broken by the MediaWiki developers.

Type: <source lang="R"> for (i in 1:5) { print(i^2) } # 1 4 9 16 25 </source>

... to get:

for (i in 1:5) {
    print(i^2)
} # 1  4  9  16  25

Note: no highlighting, and the page is flagged as having syntax highlighting errors.

Pubmed Articles and abstracts

{{#pmid:15289071}}

This inserts the article information in a <div>, formatted by Template:Pubmed.
Steipe (2004) Consensus-based engineering of protein stability: from intrabodies to thermostable enzymes. Meth Enzymol 388:176-86. (pmid: 15289071)

PubMed ] [ DOI ]


{{#pmid: 15289071 |Steipe2004}}

This formats the pubmed parser output for the Cite extension; A footnote mark will be inserted here[2] and the actual reference will appear beneath the <references /> section of the page. This too will be shown as hover-text.

Math markup

<math>H = - \sum_{i=0}^n p_i \log_{2} p_i</math>


Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle H = - \sum_{i=0}^n p_i \log_{2} p_i}

see: http://meta.wikimedia.org/wiki/Help:Formula


ToDo items

Type:

<div class="ToDo">
ToDo:
* This ...
* and that.
</div>

... to get:

ToDo:

  • This ...
  • and that.


Notes

Type:

<div class="note">
Note: take special care to ...

</div>

... to get:

Note: take special care to ...


Linking text to Wikipedia

... using the {{WP|...}} template.

If the linked text is the same as the Wikipedia page titke, simply type it:
{{WP|Mutual information}}
Mutual information


 

If the linked text is different, use the "|" pipe character to separate page-name and text:

{{WP|Mutual information|'''WP article on Mutual Information'''}}
WP article on Mutual Information


 

Collapsible elements

See: Manual: Collapsible elements

<div class="mw-collapsible mw-collapsed" data-expandtext="Expand" data-collapsetext="Collapse" style="width:50%; ">
Visible text  ...
<div class="mw-collapsible-content" style="padding:10px;">
* Collapsed text 1
* Collapsed text 2
* Collapsed text 3
</div>
</div>


Example:

The Road Not Taken    Robert Frost

Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
 
Then took the other, as just as fair,
And having perhaps the better claim
Because it was grassy and wanted wear,
Though as for that the passing there
Had worn them really about the same,
 
And both that morning equally lay
In leaves no step had trodden black.
Oh, I marked the first for another day!
Yet knowing how way leads on to way
I doubted if I should ever come back.
 
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference.


Sample reference section

  1. This is what the link looks like - and as you can see if you hover over it, the reference gets displayed as hover-text.
  2. Steipe (2004) Consensus-based engineering of protein stability: from intrabodies to thermostable enzymes. Meth Enzymol 388:176-86. (pmid: 15289071)

    PubMed ] [ DOI ]