Difference between revisions of "Help:Formatting"

From Chemical Engineering @ UP wiki
Jump to: navigation, search
(Links)
 
(3 intermediate revisions by one other user not shown)
Line 287: Line 287:
  
 
[[Some Wiki Page|My page]]s rock</pre>
 
[[Some Wiki Page|My page]]s rock</pre>
 +
 +
When linking to long pages (such as this one) it might be desirable to link to a certain section. This will save the user the time of looking for the section you were refering to in the page you linked from. Linking is done as before but a # is added followed by the section name.
 +
<pre>
 +
[[Help:Formatting#Links|Using links]]</pre>
 +
This link will take you directly to this section of the page.
 
|
 
|
 
[[Some Wiki Page]]
 
[[Some Wiki Page]]
Line 293: Line 298:
  
 
[[Some Wiki Page|My page]]s rock
 
[[Some Wiki Page|My page]]s rock
 +
 +
 +
 +
 +
 +
 +
 +
 +
[[Help:Formatting#Links|Using links]]
 
|-
 
|-
 
|External links
 
|External links
Line 314: Line 328:
  
 
[http://www.google.com Google]Search Page
 
[http://www.google.com Google]Search Page
 +
|-
 +
|Redirecting
 +
|
 +
Redirects are used to direct all common names for a page, to the same page, e.g. on this wiki, the page [[PMC]] redirects to the page [[Process Modelling and Control]].
 +
 +
Redirects can be added (on the page you want to redirect '''FROM''') in this way:
 +
<pre>
 +
#REDIRECT [[Main Page]]
 +
</pre>
 +
|
 +
This creates a redirect to the Main Page from the page in which the redirect is added.<br/>
 +
'''REMEMBER:''' Redirects work instantly, the page from which you redirect will not be shown.
 +
|-
 +
|Mail addresses
 +
|Use this to create a link that opens up your default mail client and starts a new email to the address in the link.
 +
<pre>
 +
[mailto:example@up.ac.za Example]
 +
</pre>
 +
|[mailto:example@up.ac.za Example]
 
|}
 
|}
  
Line 323: Line 356:
 
== References ==
 
== References ==
 
* 1-2:  http://www.mediawiki.org/wiki/Help:Formatting
 
* 1-2:  http://www.mediawiki.org/wiki/Help:Formatting
 +
 +
 +
[[Category:Help|Formatting]]

Latest revision as of 12:19, 16 March 2010

You can format your text using wiki markup. This consists of normal characters like asterisks, single quotes or equation marks which have a special function in the wiki, sometimes depending on their position. For example, to format a word in italic, you include it in two single quotes like ''this''. Please note that this page is largely reproduced from the official MediaWiki page (see References). Play around in the sandbox to get a feel for wiki markup.

Text formatting markup [1]

Description You type You get
character formatting - applies anywhere
Italic text
''italic''
italic
Bold text
'''bold'''
bold
Bold and italic
'''''bold & italic'''''
bold & italic
Escape wiki markup
<nowiki>no ''markup''</nowiki>
no ''markup''
section formatting - only at the beginning of the line
Headings of different levels
=level 1=
==level 2==
===level 3===
====level 4====
=====level 5=====
======level 6======

An article with four or more headings will automatically create a table of contents.

Use of a level 1 heading is highly discouraged as it appears with the same formatting and size as the page title, which can be confusing.

Level 1
Level 2
Level 3
Level 4
Level 5
Level 6
Horizontal rule
----

Bullet list
* one
* two
* three
** three point one
** three point two

Inserting a blank line will end the first list and start another.

  • one
  • two
  • three
    • three point one
    • three point two
Numbered list
# one
# two<br />spanning several lines<br />without breaking the numbering
# three
## three point one
## three point two
  1. one
  2. two
    spanning several lines
    without breaking the numbering
  3. three
    1. three point one
    2. three point two
Definition list
;item 1
:definition 1
;item 2
:definition 2-1
:definition 2-2
item 1
definition 1
item 2
definition 2-1
definition 2-2
Adopting definition list to indent text
:Single indent
::Double indent
:::::Multiple indent

This adoption may be controversial from the viewpoint of accessibility.

Single indent
Double indent
Multiple indent
Mixture of different types of list
# one
# two
#* two point one
#* two point two
# three
#; three item one
#: three def one
# four
#: four def one
#: this rather looks like the continuation of # four
#: and thus often used instead of <br />
# five
## five sub 1
### five sub 1 sub 1
## five sub 2
;item 1
:* definition 1-1
:* definition 1-2
:
;item 2
:# definition 2-1
:# definition 2-2

The usage of #: and *: for breaking a line within an item may also be controversial.

  1. one
  2. two
    • two point one
    • two point two
  3. three
    three item one
    three def one
  4. four
    four def one
    this rather looks like the continuation of # four
    and thus often used instead of <br />
  5. five
    1. five sub 1
      1. five sub 1 sub 1
    2. five sub 2
item 1
  • definition 1-1
  • definition 1-2
item 2
  1. definition 2-1
  2. definition 2-2
Preformatted text
 preformatted text is done with
 a '''space''' at the 
 ''beginning'' of the line

This way of preformatting only applies to section formatting, and character formatting markups are still effective.

preformatted text is done with
a space at the 
beginning of the line

Paragraphs

Description You type You get
Line breaks (1)
Merely pressing
enter
does not make
line breaks.

Merely pressing enter does not make line breaks.

Line breaks (2)
Adding the<br/>
break command<br/>
does.

Adding the
break command
does.

Paragraph breaks
Double enter

makes paragraph

breaks.

Double enter

makes paragraph

breaks.

HTML [2]

Some HTML tags are allowed in MediaWiki, for example <code>, <div>, <span> and <font>. These apply anywhere you insert them.

Description You type You get
Fixed width text
<tt>Fixed width text</tt>

Fixed width text

Blockquotes
text text text text text text text text text text text text
text text text text text text text text text text text text
<blockquote>  quote quote quote quote quote quote </blockquote>
text text text text text text text text text text text text

text text text text text text text text text text text text text text text text text text text text text text text text

quote quote quote quote quote quote

text text text text text text text text text text text text

Comment
<!--This is comment-->
Completely preformatted text
<pre>this way, all markups are '''ignored'''</pre>
this way, all markups are '''ignored'''

Links

Description You type You get
Internal links

Internal links use double brackets ( [[ ]] ) and a pipe ( | ) for link text.

[[Some Wiki Page]]

[[Some Wiki Page|My page]]

[[Some Wiki Page|My page]]s rock

When linking to long pages (such as this one) it might be desirable to link to a certain section. This will save the user the time of looking for the section you were refering to in the page you linked from. Linking is done as before but a # is added followed by the section name.

[[Help:Formatting#Links|Using links]]

This link will take you directly to this section of the page.

Some Wiki Page

My page

My pages rock





Using links

External links

External links normally use single brackets ( [ ] ) and a trailing space for link text

http://www.google.com

[http://www.google.com]

[http://www.google.com Google]

[http://www.google.com Google]Search Page

http://www.google.com

[3]

Google

GoogleSearch Page

Redirecting

Redirects are used to direct all common names for a page, to the same page, e.g. on this wiki, the page PMC redirects to the page Process Modelling and Control.

Redirects can be added (on the page you want to redirect FROM) in this way:

#REDIRECT [[Main Page]]

This creates a redirect to the Main Page from the page in which the redirect is added.
REMEMBER: Redirects work instantly, the page from which you redirect will not be shown.

Mail addresses Use this to create a link that opens up your default mail client and starts a new email to the address in the link.
[mailto:example@up.ac.za Example]
Example

Other formatting

Beyond the text formatting markup shown above, here are some other formatting references: (on the MediaWiki site)

References