Difference between revisions of "Help:Formatting"

From Kumu Wiki - TRU
Jump to navigation Jump to search
Line 196: Line 196:
 
===Signatures===
 
===Signatures===
  
{{Help:Formatting/Text_Formatting/Signatures}}
+
You should always sign your comments, though signatures can be inserted anywhere on a wiki page.
 +
{| class="wikitable" width="80%"
 +
! Description !! You type !! You get
 +
|-
 +
! colspan="3" style="background:#ABE" | character (inline) formatting – ''applies anywhere''
 +
|-
 +
| Signature || <nowiki>Three tildes for just a signature, ~~~</nowiki> || Three tildes for just a signature, [[User:CynthiaNg|Cynthia (UBC LSIT)]]
 +
|-
 +
| Signature with Date and Time || <nowiki>Four tildes for your signature with date and time, ~~~~</nowiki> || Four tildes for your signature with date and time, [[User:CynthiaNg|Cynthia (UBC LSIT)]] 22:27, 26 May 2010 (UTC)
 +
|-
 +
| Only Date and Time || <nowiki>Five tildes for date and time only, ~~~~~</nowiki> || Five tildes for date and time only, 22:27, 26 May 2010 (UTC)
 +
|}
 +
*Note: Once you save, the signature and date/time are automatically created. The next time someone edits, it no longer show the tildes.
 +
 
  
 
==Links==
 
==Links==
Line 204: Line 217:
 
== Paragraphs ==
 
== Paragraphs ==
  
{{Help:Formatting/Text_Formatting/Paragraphs}}
+
MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tags <code>&lt;br /></code>.
  
 
== HTML Formatting ==
 
== HTML Formatting ==
  
{{Help:Formatting/HTML_Formatting}}
+
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <code>&lt;code></code>, <code>&lt;div></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>. These apply anywhere you insert them.
 +
 
 +
{| class="wikitable" width="80%"
 +
!Description
 +
!You type
 +
!You get
 +
|-
 +
| Underscore
 +
| <code><nowiki><u>underscore</u></nowiki></code>
 +
|<u>underscore</u>
 +
|-
 +
| Strikethrough
 +
| <code>&lt;del>Strikethrough&lt;/del></code> or <code>&lt;s>Strikethrough&lt;/s></code>
 +
|<del>Strikethrough</del>
 +
|- style="white-space:nowrap"
 +
|Fixed width text
 +
| <code>&lt;tt>Fixed width text&lt;/tt></code> or <code>&lt;code>source code&lt;/code></code>
 +
| <tt>Fixed width text</tt> or <code>source code</code>
 +
|-
 +
|Blockquotes
 +
| <code>
 +
text text text text text text text text text text text text
 +
text text text text text text text text text text text text
 +
&lt;blockquote>  quote quote quote quote quote quote &lt;/blockquote>
 +
text text text text text text text text text text text text
 +
</code>
 +
| 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
 +
|-
 +
| Typewriter font
 +
| <pre>Puts text in a <tt>typewriter
 +
font</tt>. The same font is
 +
generally used for <code>
 +
computer code</code>.</pre>
 +
| Puts the text in a <tt>typewriter
 +
font</tt>. The same font is
 +
generally used for <code>
 +
computer code</code>.
 +
|-
 +
| Superscripts and Subscripts
 +
| <pre>X<sup>2</sup>, H<sub>2</sub>O</pre>
 +
|X<sup>2</sup>, H<sub>2</sub>O
 +
|-
 +
| Centered text
 +
| <pre><center>Centered text</center>
 +
* Please note the American spelling of "center".</pre>
 +
| <center>Centered text</center>
 +
|-
 +
| Comment
 +
| <code>&lt;!-- This is a comment --></code>
 +
Text can only be viewed in the edit window.
 +
|
 +
<!-- This is a real invisible comment -->
 +
|-
 +
| Completely preformatted text
 +
|
 +
<code><nowiki><pre>this way, all markups are '''ignored'''</pre></nowiki></code>
 +
|
 +
<pre> this way, all markups are '''ignored'''.</pre>
 +
|-
 +
|'''Customized''' preformatted text
 +
|
 +
<code><nowiki><pre style="CSS text">this way, all markups are '''ignored'''
 +
and formatted with a CSS text</pre></nowiki></code>
 +
|
 +
<pre style="CSS text">this way, all markups are '''ignored'''
 +
and formatted with a CSS text</pre>
 +
|}
  
 
== Mathematical formulas ==
 
== Mathematical formulas ==
  
{{Help:Formatting/Mathematical_Formulas}}
+
MediaWiki allows you to use LaTeX to insert mathematical formulae by typing in <nowiki><math>Formula here</math></nowiki>. Included here are a couple of examples and commonly used functions and expressions.
 +
{| class="wikitable" width="80%"
 +
! !! What you type !! What it looks like
 +
|-
 +
| Superscript || <nowiki><math> a^2 </math></nowiki> || <math>a^2</math>
 +
|-
 +
| Subscript || <nowiki><math> a_3 </math></nowiki> || <math>a_3</math>
 +
|-
 +
| Grouping || <nowiki><math> a_{x,y} </math></nowiki> || <math>a_{x,y}</math>
 +
|-
 +
| Combination || <nowiki><math> a_3^2 or {a_3}^2 </math></nowiki> || <math>a_3^2</math> or <math>{a_3}^2</math>
 +
|-
 +
| Root || <nowiki><math> ([n] is optional) \sqrt[n]{x} </math></nowiki> || <math>\sqrt[n]{x}</math>
 +
|-
 +
| Fraction || <nowiki><math> \frac{3}{4}=0.75 or (small) \tfrac{1}{3}=0.\bar{3} </math></nowiki> || <math>\frac{3}{4}=0.75</math> or (small) <math>\tfrac{1}{3}=0.\bar{3}</math>
 +
|-
 +
| More Complex Example
 +
|<nowiki><math> \sum_{n=0}^\infty \frac{x^n}{n!} </math></nowiki>
 +
| <math>\sum_{n=0}^\infty \frac{x^n}{n!}</math>
 +
|}
 +
 
 +
See [http://meta.wikimedia.org/wiki/Help:Displaying_a_formula WikiMedia's Help on Displaying a Formula] for a full article on using TeX to display formulae. Beginning at Section 3 (Functions, symbols, special characters) is a comprehensive list of all the symbols.
 +
 
  
 
==Footnotes==
 
==Footnotes==
  
{{Help:Formatting/Footnotes}}
+
You can add footnotes to sentences using
 +
the ''ref'' tag -- this is especially good
 +
for citing a source.
 +
 
 +
{| class="wikitable" width="80%"
 +
!width="1000"|What it looks like
 +
!width="500"|What you type
 +
|-
 +
|There are over six billion people in the world.<ref>CIA World Factbook, 2006.</ref>
 +
References: <references/>
 +
 
 +
|<nowiki>There are over six billion people in the
 +
world.<ref>CIA World Factbook, 2006.</ref>
 +
 
 +
References: <references/></nowiki>
 +
|}
 +
 
  
 
<noinclude>
 
<noinclude>

Revision as of 12:35, 13 January 2014

Info icon 002KUMU Help

Introduction
Create a New Page
Editing a Page
Formatting Text

TRU Wiki Organization
TRU Wiki Guidelines
Using Categories

Frequently Asked Questions
Adding Pictures
Renaming a Page
Adding Links
Creating Course Pages
Adding Footnotes
Editing Your User Page
Embedding Social Media Apps
Creating a Book
All Help Pages

Contact us
Community Policies
Explore the Wiki

You can format your text using the formatting toolbar or wiki markup. Wiki markup can be thought of as a simplified version of html and it consists of normal characters like asterisks, single quotes or equation marks which have a special function in the wiki. For example, to format a word in italic, you include it in two single quotes like ''this''.

Text Formatting

Description You type You get
character (inline) formatting – applies anywhere
Italic text ''italic'' italic
Bold text '''bold''' bold
Bold and italic '''''bold & italic''''' bold & italic
Ignore wiki markup <nowiki>no ''markup''</nowiki> no ''markup''
section formatting – only at the beginning of the line
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


Organizing

Headers & Lines

Description You type You get
section formatting – only at the beginning of the line (with no leading spaces)
Headings of different levels
=level 1=
==level 2==
===level 3===
====level 4====
=====level 5=====
======level 6======

Level 1 is normally set aside for the article title. An article with 4 or more headings automatically creates a table of contents.

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

Lists

Description You type You get
section formatting – only at the beginning of the line (with no leading spaces)
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 more lines<br />doesn't break numbering
# three
## three point one
## three point two
  1. one
  2. two
    spanning more lines
    doesn't break 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 workaround 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
    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

For even more on list, check out Wikipedia's List Help article.


Signatures

You should always sign your comments, though signatures can be inserted anywhere on a wiki page.

Description You type You get
character (inline) formatting – applies anywhere
Signature Three tildes for just a signature, ~~~ Three tildes for just a signature, Cynthia (UBC LSIT)
Signature with Date and Time Four tildes for your signature with date and time, ~~~~ Four tildes for your signature with date and time, Cynthia (UBC LSIT) 22:27, 26 May 2010 (UTC)
Only Date and Time Five tildes for date and time only, ~~~~~ Five tildes for date and time only, 22:27, 26 May 2010 (UTC)
  • Note: Once you save, the signature and date/time are automatically created. The next time someone edits, it no longer show the tildes.


Links

  • Please see Help:Links for detailed information on creating hyperlinks

Paragraphs

MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tags <br />.

HTML Formatting

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
Underscore <u>underscore</u> underscore
Strikethrough <del>Strikethrough</del> or <s>Strikethrough</s> Strikethrough
Fixed width text <tt>Fixed width text</tt> or <code>source code</code> Fixed width text or source code
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
Typewriter font
Puts text in a <tt>typewriter
font</tt>. The same font is 
generally used for <code>
computer code</code>.
Puts the text in a typewriter

font. The same font is generally used for computer code.

Superscripts and Subscripts
X<sup>2</sup>, H<sub>2</sub>O
X2, H2O
Centered text
<center>Centered text</center>
* Please note the American spelling of "center".
Centered text
Comment <!-- This is a comment -->

Text can only be viewed in the edit window.

Completely preformatted text
<pre>this way, all markups are '''ignored'''</pre>
 this way, all markups are '''ignored'''.
Customized preformatted text

<pre style="CSS text">this way, all markups are '''ignored''' and formatted with a CSS text</pre>

this way, all markups are '''ignored'''
 and formatted with a CSS text

Mathematical formulas

MediaWiki allows you to use LaTeX to insert mathematical formulae by typing in <math>Formula here</math>. Included here are a couple of examples and commonly used functions and expressions.

What you type What it looks like
Superscript <math> a^2 </math>
Subscript <math> a_3 </math>
Grouping <math> a_{x,y} </math>
Combination <math> a_3^2 or {a_3}^2 </math> or
Root <math> ([n] is optional) \sqrt[n]{x} </math>
Fraction <math> \frac{3}{4}=0.75 or (small) \tfrac{1}{3}=0.\bar{3} </math> or (small)
More Complex Example <math> \sum_{n=0}^\infty \frac{x^n}{n!} </math>

See WikiMedia's Help on Displaying a Formula for a full article on using TeX to display formulae. Beginning at Section 3 (Functions, symbols, special characters) is a comprehensive list of all the symbols.


Footnotes

You can add footnotes to sentences using the ref tag -- this is especially good for citing a source.

What it looks like What you type
There are over six billion people in the world.[1] References:
  1. CIA World Factbook, 2006.
There are over six billion people in the world.<ref>CIA World Factbook, 2006.</ref> References: <references/>


See Also