Difference between revisions of "Help:Formatting"
m (1 revision(s)) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{PD Help Page}} | {{PD Help Page}} | ||
− | |||
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 <tt><nowiki>''this''</nowiki></tt> | 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 <tt><nowiki>''this''</nowiki></tt> | ||
Line 26: | Line 25: | ||
|- | |- | ||
|Escape wiki markup | |Escape wiki markup | ||
− | |<tt><nowiki><nowiki>no | + | |<tt><nowiki><nowiki>no "markup"</nowiki></nowiki></tt> |
|<nowiki>no ''markup''</nowiki> | |<nowiki>no ''markup''</nowiki> | ||
+ | |- | ||
+ | |Fixed width text | ||
+ | | | ||
+ | <nowiki><tt>Fixed width text</tt></nowiki> | ||
+ | | | ||
+ | <tt>Fixed width text</tt> | ||
|- | |- | ||
| colspan="3" align="center" | ''only at the beginning of the line'' | | colspan="3" align="center" | ''only at the beginning of the line'' | ||
+ | |- | ||
+ | | Indent text | ||
+ | | | ||
+ | <tt><nowiki>:Single indent</nowiki></tt><br /> | ||
+ | <tt><nowiki>::Double indent</nowiki></tt><br /> | ||
+ | <tt><nowiki>:::::Multiple indent</nowiki></tt> | ||
+ | | | ||
+ | :Single indent | ||
+ | ::Double indent | ||
+ | :::::Multiple indent | ||
|- | |- | ||
|Headings of<br /> | |Headings of<br /> | ||
− | different | + | different levels <ref>An article with four or more headings will automatically create a [http://en.wikipedia.org/wiki/Wikipedia:Section#Table_of_contents_.28TOC.29 table of contents].</ref> |
| | | | ||
− | <tt><nowiki>==level 1==</nowiki></tt><br /> | + | <tt><nowiki>=level 1=</nowiki></tt><ref>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.</ref><br /> |
− | <tt><nowiki>===level | + | <tt><nowiki>==level 2==</nowiki></tt><br /> |
− | <tt><nowiki>====level | + | <tt><nowiki>===level 3===</nowiki></tt><br /> |
− | <tt><nowiki>=====level | + | <tt><nowiki>====level 4====</nowiki></tt><br /> |
+ | <tt><nowiki>=====level 5=====</nowiki></tt><br /> | ||
+ | <tt><nowiki>======level 6======</nowiki></tt> | ||
| | | | ||
− | = | + | <!-- little hack to prevent TOC viewing --> |
− | = | + | <span style="font-size: 188%; margin: 0; padding-top: .5em; padding-bottom: .17em; border-bottom: 1px solid #aaa;">Level 1</span><br/><br/> |
− | = | + | <span style="font-size: 150%; margin: 0; padding-top: .5em; padding-bottom: .17em; border-bottom: 1px solid #aaa;">Level 2</span><br/><br/> |
− | = | + | <span style="font-size: 132%; border-bottom: none; font-weight: bold;">Level 3</span><br/> |
+ | <span style="font-size: 100%; border-bottom: none; font-weight: bold;">Level 4</span><br/> | ||
+ | {{DEFAULTSORT:[[[http://www.example.com link title]]#Redirect [[—[[Category:]]]]]}}<span style="font-size: 86%; border-bottom: none; font-weight: bold;">Level 5</span><br/> | ||
+ | <span style="font-size: 80%; border-bottom: none; font-weight: bold;">Level 6</span><br/> | ||
|- | |- | ||
|Horizontal rule | |Horizontal rule | ||
Line 52: | Line 72: | ||
|Bullet list | |Bullet list | ||
| | | | ||
− | * one<br> | + | * one<br /> |
− | * two<br> | + | * two<br /> |
− | * three<br> | + | * three<br /> |
− | ** three and one-third<br> | + | ** three and one-third<br /> |
− | ** three and two-thirds<br> | + | ** three and two-thirds<br /> |
| | | | ||
* one | * one | ||
Line 67: | Line 87: | ||
| | | | ||
# one<br /> | # one<br /> | ||
− | # two<nowiki><br></nowiki>spanning several lines<nowiki><br></nowiki>without breaking the numbering<br /> | + | # two<nowiki><br /></nowiki>spanning several lines<nowiki><br /></nowiki>without breaking the numbering<br /> |
# three<br /> | # three<br /> | ||
## three point one<br /> | ## three point one<br /> | ||
Line 109: | Line 129: | ||
a space at the | a space at the | ||
beginning of the line | beginning of the line | ||
− | |} | + | |- |
+ | |Preformatted text with no indentation | ||
+ | | | ||
+ | <nowiki><pre> some preformatted text with no indentation </pre></nowiki> | ||
+ | | | ||
+ | <pre> | ||
+ | some preformatted | ||
+ | text with no indentation | ||
+ | </pre> | ||
+ | |- | ||
+ | |Blockquotes | ||
+ | | | ||
+ | Body<br> | ||
+ | text text text text text text text text text text text text | ||
+ | text text text text text text text text text text text text | ||
+ | |||
+ | <nowiki><blockquote> quote quote quote quote quote quote </blockquote></nowiki> | ||
+ | |||
+ | text text text text text text text text text text text text | ||
+ | | | ||
+ | Body<br> | ||
+ | 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 | ||
+ | |||
+ | |- | ||
+ | |Comment | ||
+ | | | ||
+ | <tt><nowiki><!--This is comment--></nowiki></tt> | ||
+ | | | ||
+ | <!--This is comment-->|} | ||
+ | |||
Notes: <references/> | Notes: <references/> | ||
Line 119: | Line 173: | ||
== HTML == | == HTML == | ||
− | Some [[ | + | Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <tt><nowiki><code></nowiki></tt>, <tt><nowiki><div></nowiki></tt>, <tt><nowiki><span></nowiki></tt> and <tt><nowiki><font></nowiki></tt>. |
− | {{Admin tip|tip=If you trust your users you can allow full HTML by setting <code> | + | {{Admin tip|tip=If you trust your users you can allow full HTML by setting <code>{{mediawiki|Manual:$wgRawHtml|$wgRawHtml}} = true;</code> in {{mediawiki|Manual:LocalSettings.php|LocalSettings.php}}.}} |
Line 129: | Line 183: | ||
*[[Help:Images|Images]] | *[[Help:Images|Images]] | ||
*[[Help:Tables|Tables]] | *[[Help:Tables|Tables]] | ||
− | [http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_Page_Help/Do-It-Yourself/Formatting_Text | + | *[http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_Page_Help/Do-It-Yourself/Formatting_Text More Formatting from Wikipedia] |
− | |||
− | |||
− | |||
− | |||
+ | {{Languages|Help:Formatting}} | ||
[[Category:Help|Formatting]] | [[Category:Help|Formatting]] |
Revision as of 16:44, 28 October 2008
Important note: When you edit this page, you agree to release your contribution into the public domain. If you don't want this or can't do this because of license restrictions, please don't edit. This page is one of the Public Domain Help Pages, which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see Help:Contents for an overview of all pages. See Project:PD help/Copying for instructions. |
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''
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 <ref>An article with four or more headings will automatically create a table of contents.</ref> |
=level 1=<ref>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.</ref> |
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--> |
Notes: <references/>
Paragraphs
MediaWiki ignores normal line breaks. To start a new paragraph, leave an empty line. You can also start a new line with the HTML tags <br> or <br/>.
HTML
Some HTML tags are allowed in MediaWiki, for example <code>, <div>, <span> and <font>.
Tip for wiki admins: If you trust your users you can allow full HTML by setting $wgRawHtml = true; in LocalSettings.php.
|
Other formatting
Beyond the text formatting markup shown above, here are some other formatting references: