Difference between revisions of "Help:Formatting"

From Chemical Engineering @ UP wiki
Jump to: navigation, search
Line 1: Line 1:
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 <code><nowiki>''this''</nowiki></code>. Please note that this page is largely reproduced from the official [[MediaWiki]] page (see References)
+
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 <code><nowiki>''this''</nowiki></code>. 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 [http://www.mediawiki.org/wiki/Help:Formatting] ==
 
== Text formatting markup [http://www.mediawiki.org/wiki/Help:Formatting] ==
Line 182: Line 182:
 
== Paragraphs ==
 
== Paragraphs ==
  
{| class="wikitable" border="1" cellpadding="5"
+
{| class="wikitable" border="1" cellpadding="5"
 
! style="width:15%" |Description
 
! style="width:15%" |Description
 
! style="width:45%" |You type
 
! style="width:45%" |You type
Line 189: Line 189:
 
|Line breaks (1)
 
|Line breaks (1)
 
|
 
|
<pre>Merely pressing
+
<pre>
 +
Merely pressing
 
enter
 
enter
 
does not make
 
does not make
line breaks.</pre>
+
line breaks.
 +
</pre>
 
|
 
|
 
Merely pressing
 
Merely pressing
Line 201: Line 203:
 
|Line breaks (2)
 
|Line breaks (2)
 
|
 
|
<pre>Adding the<br/>
+
<pre>
 +
Adding the<br/>
 
break command<br/>
 
break command<br/>
 
does.
 
does.
Line 212: Line 215:
 
|Paragraph breaks
 
|Paragraph breaks
 
|
 
|
<pre>Double enter
+
<pre>
 +
Double enter
  
 
makes paragraph
 
makes paragraph
  
breaks.</pre>
+
breaks.
 +
</pre>
 
|
 
|
 
Double enter
 
Double enter
Line 228: Line 233:
 
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <code><nowiki><code></nowiki></code>, <code><nowiki><div></nowiki></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>. These apply anywhere you insert them.
 
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <code><nowiki><code></nowiki></code>, <code><nowiki><div></nowiki></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>. These apply anywhere you insert them.
  
{| class="wikitable" border="1" cellpadding="5"
+
{| class="wikitable" border="1" cellpadding="5"
!Description
+
! style="width:15%" |Description
!You type
+
! style="width:45%" |You type
!You get
+
! style="width:40%" |You get
 
|-
 
|-
 
|Fixed width text
 
|Fixed width text
Line 269: Line 274:
 
== Links ==
 
== Links ==
  
{| class="wikitable" border="1" cellpadding="5"
+
{| class="wikitable" border="1" cellpadding="5"
 
! style="width:15%" |Description
 
! style="width:15%" |Description
 
! style="width:45%" |You type
 
! style="width:45%" |You type
Line 281: Line 286:
 
[[Some Wiki Page|My page]]
 
[[Some Wiki Page|My page]]
  
[[Some Wiki Page|My page]]s</pre>
+
[[Some Wiki Page|My page]]s rock</pre>
 
|
 
|
 
[[Some Wiki Page]]
 
[[Some Wiki Page]]

Revision as of 12:00, 31 March 2009

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

Some Wiki Page

My page

My pages rock

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

Other formatting

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

References