Difference between revisions of "Help"
m (Protected "Help" ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
m |
||
Line 573: | Line 573: | ||
===Advanced formatting with XHTML=== | ===Advanced formatting with XHTML=== | ||
− | Tables also support more advanced formatting, using XHTML tags. For details, see http://www.mediawiki.org/w/index.php?title=Help:Tables | + | Tables also support more advanced formatting, using XHTML tags. For details, see http://www.mediawiki.org/w/index.php?title=Help:Tables |
Latest revision as of 18:24, 23 November 2011
Contents
Editing an existing page
This Wiki requires that all users who wish to edit a page first create an account on the system. To create an account, click "create account" at the top right corner of the page.
Once you have successfully created an account and logged in, you will see an "edit" link at the top of every page you have rights to edit.
Adding a new page
Adding a new page is as easy as typing a new page url on your web browser's location bar. For example, if I want to add a page called "ubermix is cool", then all I have to do is type the following in the location bar of my browser:
http://wiki.ubermix.org/page/ubermix_is_cool
...and click the "Create" link at the top of the screen. Note that "_" characters are used in place of spaces.
Formatting text
Plain text is nice, but often when building a page you will want to add more complex formatting, such as bold text, links, tables, etc. Unlike many "GUI" editors you might have experienced on other web sites, MediaWiki uses a formatting scheme called "wiki markup" to create styled text. While a little challenging to get the hang of at first, wiki markup is actually quite simple and makes creating pages easier and faster than GUI toolboxes, where you are constantly reaching for your mouse. It also enables the site to preserve a reasonably consistent "look and feel" across all web pages.
The fundamentals of wiki markup are fairly straightforward. At it's simplest, wiki markup essentially means enclosing the text you want formatted in a series of characters. For example, creating bold type is performed by simply surrounding your bold type with ''', like so:
'''this is my bold type'''
The same goes for italic, underline, etc., as follows:
Text formatting markup
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 |
Escape wiki markup | <nowiki>no ''markup''</nowiki> |
no ''markup'' |
section formatting – only at the beginning of the line | ||
Headings of different levels | == Level 2 == === Level 3 === ==== Level 4 ==== ===== Level 5 ===== ====== Level 6 ====== Note:
|
Level 2Level 3Level 4Level 5Level 6 |
Horizontal rule | Text above ---- Text below |
Text above Text below |
Bullet list |
* Start each line * with an [[Wikipedia:asterisk|asterisk]] (*). ** More asterisks gives deeper *** and deeper levels. * Line breaks<br>don't break levels. *** But jumping levels creates empty space. Any other start ends the list. |
Any other start ends the list. |
Numbered list |
# Start each line # with a [[Wikipedia:Number_sign|number sign]] (#). ## More number signs gives deeper ### and deeper ### levels. # Line breaks<br>don't break levels. ### But jumping levels creates empty space. # Blank lines # end the list and start another. Any other start also ends the list. |
Any other start also ends the list. |
Definition list | ;item 1 : definition 1 ;item 2 : definition 2-1 : definition 2-2 |
|
Indent text | : 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 looks like a continuation #: and is often used #: instead<br>of <nowiki><br></nowiki> # five ## five sub 1 ### five sub 1 sub 1 ## five sub 2 |
|
Preformatted text | Start each line with a space. Text is '''preformatted''' and ''markups'' '''''can''''' be done |
Start each line with a space. Text is preformatted and markups can be done |
Preformatted text blocks | <nowiki>Start with a space in the first column, (before the <nowiki>). Then your block format will be maintained. This is good for copying in code blocks: def function(): """documentation string""" if True: print True else: print False</nowiki> |
Start with a space in the first column. (before the <nowiki>). Then your block format will be maintained. This is good for copying in code blocks: def function(): """documentation string""" if True: print True else: print False |
HTML Tags
If you are familiar with HTML, MediaWiki supports a number of HTML tags, like <code></code>, etc. Using HTML is OK, but try not to overuse them as they tend to make pages difficult to edit for a non-HTML user.
Links
There are essentially two kinds of links in MediaWiki: internal and external. Internal links are links to other pages in the wiki, and external links are links to other web sites/locations. Creating either is relatively straightforward as follows:
Internal links
Description | You type | You get |
---|---|---|
Internal link | [[Main Page]] |
Main Page |
Link to a page, with text other than the page name | [[Main Page|different text]] |
different text |
Internal link to a section heading | [[#See also]] Section headings and the top of the page are automatically anchored. |
#See also |
Internal link to a section heading from different text | [[#See also|different text]] |
different text |
Internal link to a section heading on another page | [[Help#See also]] |
Help:Images#See also |
Internal link to an image or a file of other types | [[media:example.jpg]] [[media:example.pdf]] |
media:example.jpg |
External links
External links are similar, only they contain links to content outside of the wiki, as follows:
Description | You type | You get |
---|---|---|
External link | http://mediawiki.org | http://mediawiki.org |
External link with different label | [http://mediawiki.org MediaWiki] | MediaWiki |
Numbered external link | [http://mediawiki.org] | [1] |
Mailto link | [mailto:info@example.org email me] | email me |
Mailto named with subject line and body | [mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info] | info |
Images
All images must be uploaded to the site before they can be included on a page. To upload images, simply click the "Upload file" link in the sidebar to the left.
Please be conscious of the site and other users, and avoid uploading huge images. Scale your image size down using the GIMP or some other tool prior to uploading.
Syntax
The full syntax for displaying an image is:
[[File:filename.extension|options|caption]]
where options can be zero or more of the following, separated by pipes (|):
- Format option: one of border and/or frameless, frame, thumb (or thumbnail);
- Controls how the rendered image is formatted and embedded in the rest of the page.
- Resizing option: one of
- {width}px — Resizes the image to fit within the given maximum width in pixels, without restricting its height;
- x{height}px — Resizes the image to fit within the given maximum height in pixels, without restricting its width;
- {width}x{height}px — Resizes the image to fit within the given width and height in pixels;
- upright — Resizes an image to fit within reasonable dimensions, according to user preferences (suitable for images whose height is larger than width).
- Note that the image will always retain its aspect ratio, and can only be reduced (not increased) in size unless it's in a scalable media type (bitmap images cannot be scaled up).
- The default maximum size depends on the format and the internal image dimensions (according to its media type).
- Horizontal alignment option: one of left, right, center, none;
- Controls the horizontal alignment (and inline/block or floating styles) of the image within a text (no default value).
- Vertical alignment option: one of baseline, sub, super, top, text-top, middle, bottom, text-bottom;
- Controls the vertical alignment of a non-floating inline image with the text before or after the image, and in the same block (the default vertical alignment is middle).
- Link option: one of
- link={target} — Allows to change the target (to an arbitrary page title, or URL) of the generated link, activable on the rendered image surface; e.g.
[[File:Example.jpg|20px|link=http://www.wikipedia.org]]
renders as 20px (external link), or[[File:Example.jpg|20px|link=MediaWiki]]
renders as 20px (internal link). - link= (with an empty value) — (Template:Mediawiki) Displays an image without any activable link; e.g.
[[File:Example.jpg|20px|link=]]
renders as 20px.
- link={target} — Allows to change the target (to an arbitrary page title, or URL) of the generated link, activable on the rendered image surface; e.g.
- ! Link does not work with thumb, thumbnail or frame.
The options can be given in any order. If the given options conflict each other, the latter is applied, except for the format options, where the options take the priority in the order of: frame; thumb (or thumbnail); frameless and/or border.
For further details on images, see http://www.mediawiki.org/wiki/Help:Images
Tables
Tables, too, are fairly straightforward.
Table basics
{| |
table start |
|+ |
table caption, optional; only between table start and first table row |
|- |
table row, optional on first row -- wiki engine assumes the first row |
! |
table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!! ) or start on new lines, each with its own single mark (! ).
|
| |
table data cell, required! Consecutive table data cells may be added on same line separated by double marks (|| ) or start on new lines, each with its own single mark (| ).
|
|} |
table end |
- The above marks must start on a new line except the double
||
and!!
for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored. - Pipe character as content. To insert a pipe (
|
) character into a table use the <nowiki>|
</nowiki> escaping markup
Examples
The following table lacks borders and good spacing but shows the simplest wiki markup table structure.
You type | You get | ||||||
---|---|---|---|---|---|---|---|
{| |Orange |Apple |- |Bread |Pie |- |Butter |Ice cream |} |
|
The cells in the same row can be listed on one line separated by ||
(two pipe symbols). If the text in the cell contains a line break, use <br />
instead.
You type | You get | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
{| |Orange||Apple||more |- |Bread||Pie||more |- |Butter||Ice<br />cream||and<br />more |} |
|
Extra spaces within cells in the wiki markup, as in the wiki markup below, do not affect the actual table rendering.
You type | You get | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
{| | Orange || Apple || more |- | Bread || Pie || more |- | Butter || Ice cream || and more |} |
|
You can have longer text or more complex wiki syntax inside table cells, too:
You type | You get | ||
---|---|---|---|
{| |Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. | * Lorem ipsum dolor sit amet * consetetur sadipscing elitr * sed diam nonumy eirmod tempor invidunt |} |
|
Table headers
Table headers can be created by using "!
" (exclamation mark) instead of "|
" (pipe symbol). Headers usually show up bold and centered by default.
You type | You get | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{| ! align="left"|Item ! Amount ! Cost |- |Orange |10 |7.00 |- |Bread |4 |3.00 |- |Butter |1 |5.00 |- !Total | |15.00 |} |
|
Advanced formatting with XHTML
Tables also support more advanced formatting, using XHTML tags. For details, see http://www.mediawiki.org/w/index.php?title=Help:Tables