Help:Editing: Difference between revisions
m Reverted edit of 58.147.0.227, changed back to last version by Jhattara |
|||
| Line 107: | Line 107: | ||
|- valign="top" | |- valign="top" | ||
| | | | ||
<math>\sin x | <math>\sin x + \ln y</math><br> | ||
sin''x'' | sin''x'' + ln''y'' | ||
<!-- no space between roman "sin" and italic "x" --> | <!-- no space between roman "sin" and italic "x" --> | ||
| Line 114: | Line 114: | ||
'''x''' = 0 | '''x''' = 0 | ||
Ordinary text should use [[#emph|wiki markup for emphasis]], and should not use <code> | Ordinary text should use [[#emph|wiki markup for emphasis]], and should not use <code><i></code> or <code><b></code>. However, mathematical formulas often use italics, and sometimes use bold, for reasons unrelated to emphasis. Complex formulas should use [[m:Help:Formula|<code><math></code> markup]], and simple formulas may use <code><math></code>; or <code><i></code> and <code><b></code>; or <code><nowiki>''</nowiki></code> and <code><nowiki>'''</nowiki></code>. According to [[Wikipedia:WikiProject Mathematics#Italicization and bolding|WikiProject Mathematics]], wiki markup is preferred over HTML markup like <code><i></code> and <code><b></code>. | ||
| | |||
<pre><nowiki> | |||
<math>\sin x + \ln y</math> | |||
sin''x'' + ln''y'' | |||
<math>\mathbf{x} = 0</math> | |||
'''x''' = 0 | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
A typewriter font for <tt>monospace text</tt> | |||
or for computer code: <code>int main()</code> | |||
* For semantic reasons, using <code><code></code> where applicable is preferable to using <code><tt></code>. | |||
| | |||
<pre><nowiki> | |||
A typewriter font for <tt>monospace text</tt> | |||
or for computer code: <code>int main()</code> | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
You can use <small>small text</small> for captions. | |||
| | |||
<pre><nowiki> | |||
You can use <small>small text</small> for captions. | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
You can <s>strike out deleted material</s> | |||
and <u>underline new material</u>. | |||
You can also mark <del>deleted material</del> and | |||
<ins>inserted material</ins> using logical markup | |||
rather than visual markup. | |||
* When editing regular Wikipedia articles, just make your changes and don't mark them up in any special way. | |||
* When editing your own previous remarks in talk pages, it is sometimes appropriate to mark up deleted or inserted material. | |||
| | |||
<pre><nowiki> | |||
You can <s>strike out deleted material</s> | |||
and <u>underline new material</u>. | |||
You can also mark <del>deleted material</del> and | |||
<ins>inserted material</ins> using logical markup | |||
rather than visual markup. | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Diacritical marks:''' | |||
<br/> | |||
è é ê ë ì í | |||
À Á Â Ã Ä Å <br/> | |||
Æ Ç È É Ê Ë <br/> | |||
Ì Í | |||
Î Ï Ñ Ò <br/> | |||
Ó Ô Õ | |||
Ö Ø Ù <br/> | |||
Ú Û Ü ß | |||
à á <br/> | |||
â ã ä å æ | |||
ç <br/> | |||
è é ê ë ì í<br/> | |||
î ï ñ ò ó ô <br/> | |||
œ õ | |||
ö ø ù ú <br/> | |||
û ü ÿ | |||
* See [[meta:Help:Special characters|special characters]]. | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
è é ê ë ì í | |||
&Agrave; &Aacute; &Acirc; &Atilde; &Auml; &Aring; | |||
&AElig; &Ccedil; &Egrave; &Eacute; &Ecirc; &Euml; | |||
&Igrave; &Iacute; &Icirc; &Iuml; &Ntilde; &Ograve; | |||
&Oacute; &Ocirc; &Otilde; &Ouml; &Oslash; &Ugrave; | |||
&Uacute; &Ucirc; &Uuml; &szlig; &agrave; &aacute; | |||
&acirc; &atilde; &auml; &aring; &aelig; &ccedil; | |||
&egrave; &eacute; &ecirc; &euml; &igrave; &iacute; | |||
&icirc; &iuml; &ntilde; &ograve; &oacute; &ocirc; | |||
&oelig; &otilde; &ouml; &oslash; &ugrave; &uacute; | |||
&ucirc; &uuml; &yuml; | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Punctuation:''' | |||
<br/> | |||
¿ ¡ § ¶<br/> | |||
† ‡ • – —<br/> | |||
‹ › « »<br/> | |||
‘ ’ “ ” | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
&iquest; &iexcl; &sect; &para; | |||
&dagger; &Dagger; &bull; &ndash; &mdash; | |||
&lsaquo; &rsaquo; &laquo; &raquo; | |||
&lsquo; &rsquo; &ldquo; &rdquo; | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Commercial symbols:''' | |||
<br/> | |||
™ © ® ¢ € ¥<br/> | |||
£ ¤ | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
&trade; &copy; &reg; &cent; &euro; &yen; | |||
&pound; &curren; | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Subscripts:''' | |||
<br/> | |||
x<sub>1</sub> x<sub>2</sub> x<sub>3</sub> | |||
'''Superscripts:''' | |||
<br/> | |||
x<sup>1</sup> x<sup>2</sup> x<sup>3</sup> | |||
or x¹ x² x³ | |||
*The latter method of superscripting can't be used in the most general context, but is preferred when possible (as with units of measurement) because most browsers have an easier time formatting lines with it. | |||
ε<sub>0</sub> = | |||
8.85 × 10<sup>−12</sup> | |||
C² / J m. | |||
1 [[hectare]] = [[1 E4 m²]] | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
x<sub>1</sub> x<sub>2</sub> x<sub>3</sub> | |||
</nowiki></pre> | |||
<pre><nowiki> | |||
x<sup>1</sup> x<sup>2</sup> x<sup>3</sup> | |||
or x&sup1; x&sup2; x&sup3; | |||
&epsilon;<sub>0</sub> = | |||
8.85 &times; 10<sup>&minus;12</sup> | |||
C&sup2; / J m. | |||
1 [[hectare]] = [[1 E4 m&sup2;]] | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Greek characters:''' | |||
<br/> | |||
α β γ δ ε ζ<br/> | |||
η θ ι κ λ μ ν<br/> | |||
ξ ο π ρ σ ς<br/> | |||
τ υ φ χ ψ ω<br/> | |||
Γ Δ Θ Λ Ξ Π<br/> | |||
Σ Φ Ψ Ω | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
&alpha; &beta; &gamma; &delta; &epsilon; &zeta; | |||
&eta; &theta; &iota; &kappa; &lambda; &mu; &nu; | |||
&xi; &omicron; &pi; &rho; &sigma; &sigmaf; | |||
&tau; &upsilon; &phi; &chi; &psi; &omega; | |||
&Gamma; &Delta; &Theta; &Lambda; &Xi; &Pi; | |||
&Sigma; &Phi; &Psi; &Omega; | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Math characters:''' | |||
<br/> | |||
∫ ∑ ∏ √ − ± ∞<br/> | |||
≈ ∝ ≡ ≠ ≤ ≥ →<br/> | |||
× · ÷ ∂ ′ ″<br/> | |||
∇ ‰ ° ∴ ℵ ø<br/> | |||
∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇<br/> | |||
¬ ∧ ∨ ∃ ∀ ⇒ ⇔<br/> | |||
→ ↔<br/> | |||
* See also [[Wikipedia:WikiProject Mathematics|WikiProject Mathematics]]. | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
&int; &sum; &prod; &radic; &minus; &plusmn; &infin; | |||
&asymp; &prop; &equiv; &ne; &le; &ge; &rarr; | |||
&times; &middot; &divide; &part; &prime; &Prime; | |||
&nabla; &permil; &deg; &there4; &alefsym; &oslash; | |||
&isin; &notin; &cap; &cup; &sub; &sup; &sube; &supe; | |||
&not; &and; &or; &exist; &forall; &rArr; &hArr; | |||
&rarr; &harr; | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Spacing in simple math formulas:''' | |||
<br/> | |||
Obviously, ''x''² ≥ 0 is true. | |||
*To space things out without allowing line breaks to interrupt the formula, use non-breaking spaces: <tt>&nbsp;</tt>. | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
Obviously, ''x''&sup2;&nbsp;&ge;&nbsp;0 is true. | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Complicated formulas:''' | |||
<br/> | |||
: <math>\sum_{n=0}^\infty \frac{x^n}{n!}</math> | |||
* See [[m:Help:Formula]] for how to use <tt><math></tt>. | |||
* A formula displayed on a line by itself should probably be indented by using the colon (:) character. | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
: <math>\sum_{n=0}^\infty \frac{x^n}{n!}</math> | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Suppressing interpretation of markup:''' | |||
<br/> | |||
<nowiki>Link → (''to'') the [[Wikipedia FAQ]]</nowiki> | |||
* Used to show literal data that would otherwise have special meaning. | |||
* Escape all wiki markup, including that which looks like HTML tags. | |||
* Does not escape HTML character references. | |||
* To escape HTML character references such as <tt>&rarr;</tt> use <tt>&amp;rarr;</tt> | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
<nowiki>Link &rarr; (''to'') | |||
the [[Wikipedia FAQ]]</nowiki> | |||
</nowiki></pre> | |||
|- valign="top" | |||
| | |||
'''Commenting page source:''' | |||
<br/> | |||
''not shown when viewing page'' | |||
* Used to leave comments in a page for future editors. | |||
* Note that most comments should go on the appropriate [[Wikipedia:Talk page|Talk page]]. | |||
| | |||
<br/> | |||
<pre><nowiki> | |||
<!-- comment here --> | |||
</nowiki></pre> | |||
|} | |||
''(see also: [[Chess symbols in Unicode]])'' | |||
==== Tables ==== | |||
There are two ways to build tables: | |||
*in special Wiki-markup (see [[[http://en.wikipedia.org/wiki/:Help:Table]]) | |||
*with the usual HTML elements: <table>, <tr>, <td> or <th>. | |||
For the latter, and a discussion on when tables are appropriate, see [http://en.wikipedia.org/wiki/How_to_use_tables Wikipedia:How to use tables]. | |||
=== Tables === | === Tables === | ||
Revision as of 08:42, 11 June 2007
Wiki Editing
Wikis are easy to edit, giving the user a wide array of options without having to learn any programming or markup languages.
Editing Resources
- Use the Hattrick wiki sandbox to try out your editing skills.
- Start with Getting started to know more about editing in Hattrick wiki.
- You can see more generic details in Help:Contents.
- Detailed help for Editors can be found on the Wikimedia site: Wikimedia for Editors.
Short examples
The best example is to click EDIT at the top of any page to see the source of the content to see how things are done.
Some basic examples to get you going (click EDIT to see the source of how this is done):
- To create a list (like this one) just start every line with an asterisk: *
- To create a numbered list, start each line with a hash: #
- Italic text is created by enclosing your text with two apostrophes: ''Italic text''.
- Bold text is created by enclosing your text with three apostrophes: '''Bold text'''.
- To create a link to something inside the Wiki, just enclose the page name in 2 sets of square brackets My Hattrick: [[My Hattrick]]
- To create a link to something outside the Wiki, enclose the URL 1 set of square brackets: Hattrick
- To write titles, sections... put 2 or more equals signs at the start and the end of the line: ==Short Examples==.
The wiki markup
In the left column of the table below, you can see what effects are possible. In the right column, you can see how those effects were achieved. In other words, to make text look like it looks in the left column, type it in the format you see in the right column.
You may want to keep this page open in a separate browser window for reference. If you want to try out things without danger of doing any harm, you can do so in the Sandbox.
Note: The more up to date version of the MediaWiki User's Guide (editing overview) can be found here.
Sections, paragraphs, lists and lines
This section has been moved to Help:Editing (sections, paragraphs, lists and lines).
Links and URLs
This section has been moved to Help:Editing (links and URLs).
Images
| What it looks like | What you type |
|---|---|
A picture:
or, floating to the right side of the page and with a caption: ![]() or, floating to the right side of the page without a caption: ![]()
|
A picture: [[Image:Wiki.png]] or, with alternative text: [[Image:Wiki.png|jigsaw globe]] or, floating to the right side of the page and with a caption: [[Image:Wiki.png|frame|Wikipedia Encyclopedia]] or, floating to the right side of the page ''without'' a caption: [[Image:Wiki.png|right|Wikipedia Encyclopedia]] |
|
Clicking on an uploaded image displays a description page, which you can also link directly to: Image:Wiki.png |
[[:Image:Wiki.png]] |
|
To include links to images shown as links instead of drawn on the page, use a "media" link. |
[[media:Tornado.jpg|Image of a Tornado]] |
Character formatting
| What it looks like | What you type |
|---|---|
|
Emphasize, strongly, very strongly.
|
''Emphasize'', '''strongly''', '''''very strongly'''''. |
|
<math>\sin x + \ln y</math> <math>\mathbf{x} = 0</math> Ordinary text should use wiki markup for emphasis, and should not use |
<math>\sin x + \ln y</math>
sin''x'' + ln''y''
<math>\mathbf{x} = 0</math>
'''x''' = 0
|
|
A typewriter font for monospace text
or for computer code:
|
A typewriter font for <tt>monospace text</tt> or for computer code: <code>int main()</code> |
|
You can use small text for captions. |
You can use <small>small text</small> for captions. |
|
You can You can also mark
|
You can <s>strike out deleted material</s> and <u>underline new material</u>. You can also mark <del>deleted material</del> and <ins>inserted material</ins> using logical markup rather than visual markup. |
|
Diacritical marks:
À Á Â Ã Ä Å
|
è é ê ë ì í À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü ß à á â ã ä å æ ç è é ê ë ì í î ï ñ ò ó ô œ õ ö ø ù ú û ü ÿ |
|
Punctuation:
|
¿ ¡ § ¶ † ‡ • – — ‹ › « » ‘ ’ “ ” |
|
Commercial symbols:
|
™ © ® ¢ € ¥ £ ¤ |
|
Subscripts:
Superscripts:
ε0 = 8.85 × 10−12 C² / J m. |
x<sub>1</sub> x<sub>2</sub> x<sub>3</sub> x<sup>1</sup> x<sup>2</sup> x<sup>3</sup> or x¹ x² x³ ε<sub>0</sub> = 8.85 × 10<sup>−12</sup> C² / J m. 1 [[hectare]] = [[1 E4 m²]] |
|
Greek characters:
|
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω |
|
Math characters:
|
∫ ∑ ∏ √ − ± ∞ ≈ ∝ ≡ ≠ ≤ ≥ → × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ ℵ ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ |
|
Spacing in simple math formulas:
|
Obviously, ''x''² ≥ 0 is true. |
|
Complicated formulas:
|
: <math>\sum_{n=0}^\infty \frac{x^n}{n!}</math>
|
|
Suppressing interpretation of markup:
|
<nowiki>Link → (''to'')
the [[Wikipedia FAQ]]</nowiki>
|
|
Commenting page source:
|
<!-- comment here --> |
(see also: Chess symbols in Unicode)
Tables
There are two ways to build tables:
- in special Wiki-markup (see [[[1]])
- with the usual HTML elements: <table>, <tr>, <td> or <th>.
For the latter, and a discussion on when tables are appropriate, see Wikipedia:How to use tables.
Tables
Placement of the Table of Contents (TOC)
At the current status of the wiki markup language, having at least four headers on a page triggers the TOC to appear in front of the first header (or after introductory sections). Putting __TOC__ anywhere forces the TOC to appear at that point (instead of just before the first header). Putting __NOTOC__ anywhere forces the TOC to disappear. See also compact TOC for alphabet and year headings.
Keeping headings out of the Table of Contents
If you want some subheadings to not appear in the Table of Contents, then make the following replacements.
Replace == Header 2 == with <h2> Header 2 </h2>
Replace === Header 3 === with <h3> Header 3 </h3>
And so forth.
For example, notice that the following header has the same font as the other subheaders to this "Tables" section, but the following header does not appear in the Table of Contents for this page.
This header has the h4 font, but is NOT in the Table of Contents
This effect is obtained by the following line of code.
<h4> This header has the h4 font, but is NOT in the Table of Contents </h4>
Variables
(See also m:Help:Variable)
| Code | Effect |
|---|---|
| {{CURRENTMONTH}} | 09 |
| {{CURRENTMONTHNAME}} | September |
| {{CURRENTMONTHNAMEGEN}} | September |
| {{CURRENTDAY}} | 17 |
| {{CURRENTDAYNAME}} | Thursday |
| {{CURRENTYEAR}} | 2026 |
| {{CURRENTTIME}} | 16:23 |
| {{NUMBEROFARTICLES}} | 25,539 |
| {{PAGENAME}} | Editing |
| {{NAMESPACE}} | Help |
| {{localurl:pagename}} | /wiki/Pagename |
| {{localurl:Wikipedia:Sandbox|action=edit}} | /index.php?title=Wikipedia:Sandbox&action=edit |
| {{SERVER}} | https://wiki.hattrick.org |
| {{ns:1}} | Talk |
| {{ns:2}} | User |
| {{ns:3}} | User talk |
| {{ns:4}} | Hattrick |
| {{ns:5}} | Hattrick talk |
| {{ns:6}} | File |
| {{ns:7}} | File talk |
| {{ns:8}} | MediaWiki |
| {{ns:9}} | MediaWiki talk |
| {{ns:10}} | Template |
| {{ns:11}} | Template talk |
| {{ns:12}} | Help |
| {{ns:13}} | Help talk |
| {{ns:14}} | Category |
| {{ns:15}} | Category talk |
| {{SITENAME}} | Hattrick |
NUMBEROFARTICLES is the number of pages in the main namespace which contain a link and are not a redirect, i.e. number of articles, stubs containing a link, and disambiguation pages.
Templates
The MediaWiki software used by Hattrick wiki has limited support for template inclusion. This means standardized text chunks (such as boilerplate text) can be inserted into articles. For example, typing {{stub}} will appear as "This article is a stub. You can help Hattrick by expanding it." when the page is saved. See Hattrick:Template messages for the complete list. Other commonly used ones are: {{disambig}} for disambiguation pages, {{spoiler}} for spoiler warnings and {{sectstub}} like an article stub but for a section. The are many subject-specific stubs e.g.: {{stub-country}} and {{stub-region}}. For a complete list of stubs see Hattrick:Template messages/Stubs.
Hiding the edit links
Insert __NOEDITSECTION__ into the document to suppress the edit links that appear next to every section header.
