Difference between revisions of "Help:Contents"

(Usage)
(MediaWiki syntax)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== Sandbox ==
 +
 +
For playing around, use the [[Sandbox]] page.  Beware though - the contents get indexed.
 +
 
== MediaWiki syntax ==
 
== MediaWiki syntax ==
  
Line 318: Line 322:
 
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref> The Moon, however, is not so big.<ref>R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>
 
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref> The Moon, however, is not so big.<ref>R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>
  
==Notes==  
+
===Notes===
  
 
Then I put a placeholder like this where I want the references to go:
 
Then I put a placeholder like this where I want the references to go:
Line 329: Line 333:
  
 
<references />
 
<references />
 +
 +
=== Using named references ===
 +
 +
I can reuse a reference, by naming it, like this:
 +
 +
<pre>Jupiter is jolly big.<ref name="kean">Planetary sizes and distances, Kean University https://www.kean.edu/~fosborne/resources/ex11c2.htm</ref>  Saturn is not quite as big.<ref name="kean" /> Mercury is tiddly by comparison.<ref name="kean" /></pre>
 +
 +
Here it is:
 +
 +
Jupiter is jolly big.<ref name="kean">Planetary sizes and distances, Kean University https://www.kean.edu/~fosborne/resources/ex11c2.htm</ref>  Saturn is not quite as big.<ref name="kean" /> Mercury is tiddly by comparison.<ref name="kean" />
 +
 +
And here are my references/notes:
 +
 +
<pre><references /></pre>
 +
 +
<references />
 +
 +
=== Using named references, with the reference text in the references section ===
 +
 +
An alternative way of doing the above:
 +
 +
<pre>Jupiter is jolly big.<ref name="kean_uni" />  Saturn is not quite as big.<ref name="kean_uni" /> Mercury is tiddly by comparison.<ref name="kean_uni" /></pre>
 +
 +
Here it is:
 +
 +
Jupiter is jolly big.<ref name="kean_uni" />  Saturn is not quite as big.<ref name="kean_uni" /> Mercury is tiddly by comparison.<ref name="kean_uni" />
 +
 +
And I put the details in my references section, like this.  Note that the names have to match.  I could have multiple named refs if I want.
 +
 +
<pre><references>
 +
<ref name="kean_uni">Planetary sizes and distances, Kean University https://www.kean.edu/~fosborne/resources/ex11c2.htm</ref>
 +
</references></pre>
 +
 +
Here it is in action:
 +
 +
<references>
 +
<ref name="kean_uni">Planetary sizes and distances, Kean University https://www.kean.edu/~fosborne/resources/ex11c2.htm</ref>
 +
</references>

Latest revision as of 19:50, 21 November 2018

Sandbox

For playing around, use the Sandbox page. Beware though - the contents get indexed.

MediaWiki syntax

Description You type You get
Applies anywhere
Italicise text

''italic''

italic

Bold text

'''bold'''

bold

Bold and italic

'''''bold & italic'''''

bold & italic

Internal link

(within the wiki)

[[name of page]]
[[name of page|display text]]

name of page
display text

Link to section in another page

[[Another page#Some heading]]
[[Another page#Some heading | Display text]]

Another page#Some heading
Display text

Link to a section in this page

[[#Some heading]]
[[#Some heading | Display text]]

#Some heading
Display text

Redirect to another page

#redirect [[Target page]]

Going to that page automatically bounces you to the specified other page.

External link

(to other websites)

[http://www.example.org]
[http://www.example.org display text]
http://www.example.org

[1]
display text
http://www.example.org

Applies only at the beginning of the line
Headings

of different sizes

==level 1==
===level 2===
====level 3====
=====level 4=====

Level 1

Level 2

Level 3

Level 4
Bullet list

* one
* two
** two point one
* three

  • one
  • two
    • two point one
  • three
Numbered list

# one
# two
## two point one
# three

  1. one
  2. two
    1. two point one
  3. three
 
Thumbnail image

[[Image:Wiki.png|thumb|Caption text]]

File:Wiki.png
Caption text

Indented text

If you start a line with a colon (:), it is indented. Two colons mean double-indented.

e.g. a line like this:

: Hello world.

Gives you text like this:

Hello world.

Key-value lists

This:

 ; Chestnut: The most common colour of horse.
 ; Dapple grey: Another colour for horses.

Gives you this:

Chestnut
The most common colour of horse.
Dapple grey
Another colour for horses.

Tables

See also http://en.wikipedia.org/wiki/Help:Table

Basic table

Here is a table:

Fruit Colour
Banana Yellow
Apple Green
Tomato Red

And here is the code for it:

{| border="1" cellpadding="4"
| '''Fruit''' || '''Colour'''
|-
| '''Banana''' || Yellow
|-
| '''Apple''' || Green
|-
| '''Tomato''' || Red
|}

Alternative syntax for basic table

Or alternatively, you can do it like this (each cell on its own line):

{| border="1" cellpadding="4"
| '''Fruit''' 
| '''Colour'''
|-
| '''Banana''' 
| Yellow
|-
| '''Apple''' 
| Green
|-
| '''Tomato''' 
| Red
|}

Colspans

You can do things like colspan:

Fruits
Banana Yellow
Apple Green
Tomato Red

Here's the code for it:

{| border="1" cellpadding="4"
| colspan="3" align="center" | '''Fruits'''
|-
| '''Banana''' || Yellow
|-
| '''Apple''' || Green
|-
| '''Tomato''' || Red
|}

Cell colors

Fruit Colour
Banana Yellow
Apple Green
Tomato Red

And here is the code for it:

{| border="1" cellpadding="4"
| '''Fruit''' || '''Colour'''
|-
| '''Banana''' || style="background: #ffff00;" | Yellow
|-
| '''Apple''' || style="background: #00FF00;" | Green
|-
| '''Tomato''' || style="background: red;" | Red
|}

Sortable table

When a list of entries is included in a table on a page, you can use JavaScript to make the table 'sortable' (it is not possible to force a table to be sorted by a default order on page load). To do this, add the "sortable" class to the table declaration and make sure you defined headers using exclamations marks:

{| class="wikitable sortable"
|-
! Fruit   !! Price
|-
| Apples  || £0.95
|-
| Oranges || £0.85
|-
| Pears   || £1.15
|-
| Purple mangosteen || £1.05
|}

Which produces the following output:

Fruit Price
Apples £0.95
Oranges £0.85
Pears £1.15
Purple mangosteen £1.05

By clicking on the buttons in the cell headers, the entries can be sorted by the value in that column, in either ascending or descending order.

Citations and references

Usage

The basic concept of the <ref> tag is that it inserts the text enclosed by the ref tags as a footnote in a designated section, which you indicate with the placeholder tag <references />. This format cannot be used interchangeably with the older format — you must pick one or the other.

Additional placeholder tags <references /> can be inserted in the text, and all <ref> tags up to that point will be inserted there.

If you forget to include <references /> in the article, the footnotes will not disappear, but the references will be displayed at the end of the page.

Here is an example:

The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref> The Moon, however, is not so big.<ref>R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>

It comes out looking like this:

The Sun is pretty big.[1] The Moon, however, is not so big.[2]

Notes

Then I put a placeholder like this where I want the references to go:

<references />

Here it is:

  1. E. Miller, The Sun, (New York: Academic Press, 2005), 23-5.
  2. R. Smith, "Size of the Moon", Scientific American, 46 (April 1978): 44-6.

Using named references

I can reuse a reference, by naming it, like this:

Jupiter is jolly big.<ref name="kean">Planetary sizes and distances, Kean University https://www.kean.edu/~fosborne/resources/ex11c2.htm</ref>  Saturn is not quite as big.<ref name="kean" /> Mercury is tiddly by comparison.<ref name="kean" />

Here it is:

Jupiter is jolly big.[1] Saturn is not quite as big.[1] Mercury is tiddly by comparison.[1]

And here are my references/notes:

<references />
  1. 1.0 1.1 1.2 Planetary sizes and distances, Kean University https://www.kean.edu/~fosborne/resources/ex11c2.htm

Using named references, with the reference text in the references section

An alternative way of doing the above:

Jupiter is jolly big.<ref name="kean_uni" />  Saturn is not quite as big.<ref name="kean_uni" /> Mercury is tiddly by comparison.<ref name="kean_uni" />

Here it is:

Jupiter is jolly big.[1] Saturn is not quite as big.[1] Mercury is tiddly by comparison.[1]

And I put the details in my references section, like this. Note that the names have to match. I could have multiple named refs if I want.

<references>
<ref name="kean_uni">Planetary sizes and distances, Kean University https://www.kean.edu/~fosborne/resources/ex11c2.htm</ref>
</references>

Here it is in action:

  1. 1.0 1.1 1.2 Planetary sizes and distances, Kean University https://www.kean.edu/~fosborne/resources/ex11c2.htm