Help:Contents: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== How to link == | |||
{| | |||
|- | |||
||'''Description''' | |||
||'''You type''' | |||
||'''You get''' | |||
|- | |||
|Internal link | |||
|<tt><nowiki>[[Main Page]]</nowiki></tt> | |||
|[[Main Page]] | |||
|- | |||
|Piped link | |||
|<tt><nowiki>[[Main Page|different text]]</nowiki></tt> | |||
|[[Main Page|different text]] | |||
|- | |||
|External link | |||
|<tt><nowiki>http://mediawiki.org</nowiki></tt> | |||
|http://mediawiki.org | |||
|- | |||
|External link,<br /> | |||
different title | |||
|<tt><nowiki>[http://mediawiki.org MediaWiki]</nowiki></tt> | |||
|[http://mediawiki.org MediaWiki] | |||
|- | |||
|External link,<br /> | |||
numbered | |||
|<tt><nowiki>[http://mediawiki.org]</nowiki></tt> | |||
|[http://mediawiki.org] | |||
|- | |||
|Anchor link | |||
|<tt><nowiki>[[#See also]]</nowiki></tt> | |||
|[[#See also]] | |||
|- | |||
|Anchor link at another page | |||
|<tt><nowiki>[[Help:Images#See also]]</nowiki></tt> | |||
|[[Help:Images#See also]] | |||
|- | |||
|Category link | |||
|<tt><nowiki>[[:Category:Help]]</nowiki></tt> | |||
|[[:Category:Help]] | |||
|- | |||
|Internal link to image file | |||
|<tt><nowiki>[[media:example.jpg]]</nowiki></tt> | |||
|[[media:example.jpg]] | |||
|- | |||
|Internal link to pdf file | |||
|<tt><nowiki>[[media:example.pdf]]</nowiki></tt> | |||
|[[media:example.pdf]] | |||
|- | |||
|Interwiki link | |||
|<tt><nowiki>[[Wikipedia:MediaWiki]]</nowiki></tt> | |||
|[[Wikipedia:MediaWiki]] | |||
|- | |||
|mailto link | |||
|<tt><nowiki>[mailto:info@example.org email me]</nowiki></tt> | |||
|[mailto:info@example.org email me] | |||
|- | |||
|redirect | |||
|<tt><nowiki>#REDIRECT [[Main Page]]</nowiki></tt> | |||
| → [[Main Page]] | |||
|} | |||
=== More advanced === | |||
{| {{Prettytable}} | |||
|- | |||
|{{Hl3}}|'''Description''' | |||
|{{Hl3}}|'''You type''' | |||
|{{Hl3}}|'''You get''' | |||
|- | |||
|Piped link,<br /> | |||
different title | |||
|<tt><nowiki>[[Main Page|<span title="different title">different text</span>]]</nowiki></tt> | |||
|[[Main Page|<span title="different title">different text</span>]] | |||
|- | |||
|External link,<br /> | |||
same host unnamed | |||
|<tt><nowiki>[http://{{SERVERNAME}}/pagename]</nowiki></tt> | |||
|[http://{{SERVERNAME}}/pagename] | |||
|- | |||
|mailto named with subject line and body | |||
|<tt><nowiki>[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info]</nowiki></tt> | |||
|[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info] | |||
|} | |||
---- | |||
{{admin tip|tip= | |||
Which protocols (like http:) are allowed for links is controlled by the [http://www.mediawiki.org/wiki/Manual:%24wgUrlProtocols $wgUrlProtocols]<!-- deliberate use of http url, these pages get exported. Should these admin tips even be here? This is supposed to be end user help is it not? --> setting. | |||
}} | |||
{{admin tip|tip= | |||
To remove the 'external link image' from next to each of the external links, add the following to the page located at <code>MediaWiki:Monobook.css</code> on your wiki. | |||
<pre> | |||
#bodyContent a.external, | |||
#bodyContent a[href ^="gopher://"] { | |||
background: none; | |||
padding-right: 0; | |||
} | |||
</pre> | |||
}} | |||
== Text formatting markup == | == Text formatting markup == | ||
Revision as of 12:28, 15 September 2008
How to link
Description | You type | You get |
Internal link | [[Main Page]] | Main Page |
Piped link | [[Main Page|different text]] | different text |
External link | http://mediawiki.org | http://mediawiki.org |
External link, different title |
[http://mediawiki.org MediaWiki] | MediaWiki |
External link, numbered |
[http://mediawiki.org] | [1] |
Anchor link | [[#See also]] | #See also |
Anchor link at another page | [[Help:Images#See also]] | Help:Images#See also |
Category link | [[:Category:Help]] | Category:Help |
Internal link to image file | [[media:example.jpg]] | media:example.jpg |
Internal link to pdf file | [[media:example.pdf]] | media:example.pdf |
Interwiki link | [[Wikipedia:MediaWiki]] | Wikipedia:MediaWiki |
mailto link | [mailto:info@example.org email me] | email me |
redirect | #REDIRECT [[Main Page]] | → Main Page |
More advanced
Template:Hl3|Description | Template:Hl3|You type | Template:Hl3|You get |
Piped link, different title |
[[Main Page|<span title="different title">different text</span>]] | different text |
External link, same host unnamed |
[http://{{SERVERNAME}}/pagename] | [2] |
mailto named with subject line and body | [mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info] | info |
Text formatting markup
Description | You type | You get |
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'' |
Fixed width text |
<tt>Fixed width text</tt> |
Fixed width text |
only at the beginning of the line | ||
Indent text |
:Single indent |
|
Headings of different levels [1] |
=level 1=[2] |
Level 1 |
Horizontal rule |
---- |
|
Bullet list |
* one |
|
Numbered list |
# one |
|
Mixture of bulleted and numbered lists |
# one |
|
Definition list |
;Definition |
|
Preformatted text |
preformatted text is done with |
preformatted text is done with a space at the beginning of the line |
Preformatted text with no indentation |
<pre> some preformatted text with no indentation </pre> |
some preformatted text with no indentation |
Blockquotes |
Body <blockquote> quote quote quote quote quote quote </blockquote> text text text text text text text text text text text text |
Body
text text text text text text text text text text text text |
Comment |
<!--This is comment--> |
Image Syntax
The full syntax for displaying an image is:
[[Image:{name}|{options}]]
Where options can be zero or more of the following, separated by pipes:
thumb
,thumbnail
, orframe
: Controls how the image is formattedleft
,right
,center
,none
: Controls the alignment of the image on the pagebaseline
,sub
,super
,top
,text-top
,middle
,bottom
,text-bottom
: Controls the vertical alignment of the image on the page{width}px
: Resizes the image to the given width in pixels{caption text}
: Must not end with "px"- Special cases:
page=1
: displays the specified page when showing a djvu file.
The options can be given in any order. If a given option does not match any of the other possibilities, it is assumed to be the caption text. Caption text can contain wiki links or other formatting.
See also: Help:Images
Wiki table markup summary
{| | 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.
- XHTML attributes. Each mark, except table end, optionally accepts one or more XHTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.
- Cells and caption (| or ||, ! or !!, and |+) hold content. So separate any attributes from content with a single pipe (|). Cell content may follow on same line or on following lines.
- Table and row marks ({| and |-) do not directly hold content. Do not add pipe (|) after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it and your final attribute if it was touching the erroneous pipe!
- Content may (a) follow its cell mark on the same line after any optional XHTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headers, or nested tables, must of course be on its own new line.
See also: Help:Tables
- ↑ 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.