Help:Advanced editing
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins +/- |
For the basics see Help:Editing.
Contents
- 1 Wikitext markup — making your page look the way you want
- 2 Records of edits in the database
- 3 Links to other help pages
Wikitext markup — making your page look the way you want
- If you want to try out things without danger of doing any harm, you can do so in the SacredWiki:Sandbox.
- More information on HTML tags in wikitext.
Organizing your writing — sections, paragraphs, lists and lines
What it looks like | What you type |
---|---|
Start sections with header lines Note: Single equal signs give the highest level heading, like the page title; usually projects have the convention not to use them. New section Subsection Sub-subsection
|
== New section == === Subsection === ==== Sub-subsection ==== |
A single newline has no effect on the layout. But an empty line starts a new paragraph, or ends a list or indented part. (<p> disables this paragraphing until </p> or the end of the section) (In Cologne blue, two newlines and a div tag give just one newline; in the order newline, div tag, newline, the result is two newlines.) A semicolon at the start of a line is not rendered, but has the effect of rendering the newline. A colon in such a line is not rendered, but has the effect of starting a new, indented line, see definition list. You can make the wikitext more readable by putting in newlines. You might find this causes future problems—see w:Wikipedia:Don't use line breaks for details.
|
A single newline has no effect on the layout. But an empty line starts a new paragraph. |
You can break lines without starting a new paragraph.
|
You can break lines <br/> without starting a new paragraph. |
marks the end of the list.
|
* Unordered Lists are easy to do: ** start every line with a star, *** more stars means deeper levels. * A newline * in a list marks the end of the list. * Of course, * you can * start again. |
marks the end of the list.
|
# Numbered lists are also good ## very organized ## easy to follow # A newline # in a list marks the end of the list. # New numbering starts # with 1. |
|
* You can even do mixed lists *# and nest them *#* or break lines <br/>in lists |
Definition list
|
; word : definition of the word ; longer phrase : phrase defined
|
A manual newline starts a new paragraph.
In the case of a semicolon and some text in front of the colon, the first colon starts a new line (indented as before) even though it is in the wikitext not at the start of the line, see definition list. |
: A colon indents a line or paragraph. A manual newline starts a new paragraph. |
When there is a need for separating a block of text
This is useful for (as the name says) inserting blocks of quoted (and cited) text. |
<blockquote> The '''blockquote''' command will indent both margins when needed instead of the left margin only as the colon does. </blockquote> |
|
<center>Centered text.</center> |
A horizontal dividing line:
this is above it... ...and this is below it. If you don't use a section header, you don't get a TOC entry. |
A horizontal dividing line: this is above it... ---- ...and this is below it. |
Links, URL
More information at Help:Link.
Internal links
General notes:
- Enclose the target name in double square brackets — "[[" and "]]".
- First letter of target name is automatically capitalized.
- Spaces are represented as underscores (but don't do underscores yourself).
- Links to nonexistent pages are shown in red — Help:Starting a new page tells about creating the page.
- When the mouse cursor "hovers" over the link, you see a "hover box" containing... hover over links hereafter to see.
What it looks like | What you type |
---|---|
Sue is reading the official position (or official positions). |
Sue is reading the [[official positions|official position]] (or [[official positions]]). |
You can also italicize / etc. links: e.g., Wikipedia. |
''[[Wikipedia]]'' |
A link to the page on another wiki (e.g. the same subject in another language) |
* See [[m:Help:Interwiki linking]]. * [[:fr:Wikipédia:Aide]]. |
If the section doesn't exist, the link goes to the beginning of the page. If there are multiple sections by the same name, link to specific ones by adding how many times that header has already appeared (e.g. if there are 3 sections entitled "Example header", and you wish to link to the third one, then use [[#Example section 3]]. For more info, see Help:Editing FAQ. |
* [[List of cities by country#Morocco]] * [[List of cities by country#Norway]] |
Use a pipe "|" to create a link label: |
* [[Help:Link|About links]] |
"Blank" pipes hide:
After you save, the server automatically fills in the link label. |
* Parentheses: [[kingdom (biology)|kingdom]]. * Colon: [[m:Requests for adminship|]]. |
A red link (like this one) points to a page that doesn't exist yet.
|
A red link ([[like this one]]) points to a page that doesn't exist yet. |
Please "sign" comments on talk pages:
The server will fill in the link after you save. |
Please "sign" comments on talk pages: : Your user name: ~~~ : Your user name plus timestamp: ~~~~ : Five tildes give a timestamp: ~~~~~ |
One article title to another with this special link, see Help:Redirect. |
#REDIRECT [[United States]] |
|
ISBN 0131103628 RFC 123 |
To include links to non-image uploads such as sounds, use a "media" link.
|
[[media:Example.ogg|Sound]] |
To list a page in a category and have a link to the Category at page end. |
[[Category:English documentation]] |
To link to a category without causing the page to be listed in the category, add a colon |
[[:Category:English documentation]] |
Use links for dates, so everyone can set their own display order. Use Special:Preferences to change your own date display setting. |
[[July 20]] [[1969]] [[20 July]] [[1969]] and [[1969]]-[[07-20]] |
"What links here" etc. can be linked as: |
[[Special:Whatlinkshere/Help:Editing]] |
External link function is used for these as [[page]] will not work. |
http://meta.wikimedia.org /w/index.php?title=Fotonotes&oldid=482030 http://meta.wikimedia.org/w/index.php? title=Fotonotes&diff=493810&oldid=482030 http://meta.wikimedia.org/w/index.php? title=Help:Wikitext_examples&dir=prev&offset =20060813153343&limit=100&action=history |
External links
General notes:
- By default, external links do not open in a new browser window. http://www.mediawiki.org/wiki/Manual:Opening_external_links_in_a_new_window
Nupedia, [1] | [http://www.nupedia.com Nupedia], [http://www.nupedia.com] |
Email Example, | [mailto:email@example.com Email Example], [mailto:email@example.com] |
Or just give the URL: http://www.nupedia.com.
|
Or just give the URL: http://www.nupedia.com. |
Text formatting — controlling how it looks
What it looks like | What you type |
---|---|
Emphasize (italics), strongly (bold), very strongly (bold italics). (These are double and triple apostrophes, not double quotes.) Note: this can also be applied to links (e.g., Wikipedia). |
''Emphasize'', '''strongly''', '''''very strongly'''''. ''[[Wikipedia]]'' |
You can also write italic and bold. This is useful in mathematical formulas where you need specific font styles rather than emphasis.
(The difference between these two methods is not very important for graphical browsers, so most people ignore it.) But it may make a big difference for the visually impaired ;-) |
You can also write <i>italic</i> and <b>bold</b>. This is useful in mathematical formulas where you need specific font styles rather than emphasis. : <b>F</b> = <i>m</i><b>a</b> |
You can also write in small caps. If the wiki has the templates, this can be much simpler to write. |
You can also write <span style="font-variant:small-caps"> in small caps</span>. If the wiki has the templates, this can {{bsm}}be much simpler to write{{esm}}. |
A typewriter font, sometimes used for
technical terms and |
A typewriter font, sometimes used for <tt>technical terms</tt> and <code>computer code</code>.
|
You can use small text for captions. | You can use <small>small text</small> for captions. |
You can and underline new material. You can also mark
|
You can <strike>strike out deleted material</strike> 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. |
Subscript: x2 Superscript: x2 or x² Most browsers have an easier time formatting lines with ² than with <sup>2</sup> |
Subscript: x<sub>2</sub> Superscript: x<sup>2</sup> or x² ε<sub>0</sub> = 8.85 × 10<sup>−12</sup> C² / J m. 1 [[hectare]] = [[1 E4 m²]] |
Disabling wikitext interpretation and/or reformatting
Hereafter are various ways to control processing and formatting. For the code {{tc}} in the examples, referring to Template:Tc, see Help:Template.
regular
arrow → in italics link |
arrow → {{tc}} ''italics'' [[help:Link|link]] |
preserve single newlines (poem tag)
arrow → in |
{{#tag:poem|arrow → {{tc}} ''italics'' [[help:Link|link]]}} |
<nowiki>
can be applied in-line: arrow → {{tc}} ''italics'' [[help:Link|link]] normal again |
''can be applied in-line:'' <nowiki> arrow → {{tc}} ''italics'' [[help:Link|link]] </nowiki>''[[normal]] again'' |
<pre>
arrow → {{tc}} ''italics'' [[help:Link|link]] |
<pre>arrow → {{tc}} ''italics'' [[help:Link|link]]</pre> |
leading space
arrow → in italics link IF a line of plain text starts with a space it will be formatted exactly as typed in a fixed-width font in a grey dotted-outline box lines won't wrap ENDIF this is useful for: * pasting preformatted text; * algorithm descriptions; * program source code * ASCII art; * chemical structures; * poetry WARNING: If you make it wide,
you force the whole page to be wide and
hence less readable. Never start ordinary lines with spaces. |
arrow → {{tc}} ''italics'' [[help:Link|link]] IF a line of plain text starts with a space it will be formatted exactly as typed in a fixed-width font in a grey dotted-outline box lines won't wrap ENDIF this is useful for: * pasting preformatted text * algorithm descriptions * program source code * ASCII art * chemical structures * poetry |
typewriter font (does not work beyond the end of a paragraph): arrow → in italics link New paragraph. |
<tt>arrow → {{tc}}</tt> <tt>''italics''</tt> <tt>[[help:Link|link]] New paragraph.</tt> |
→ |
&rarr; |
The text between here and here won't be displayed |
The text between '''here''' <!-- comment here --> '''and here''' won't be displayed |
In the case of expandable wikitext like {{t1demo|p ''q'' r}}, <nowiki>{{t1demo|p ''q'' r}}</nowiki> displays this wikitext, while with #tag, {{#tag:nowiki|{{t1demo|p ''q'' r}}}} displays the expanded wikitext start-p ''q'' r-end.
Special characters
Umlauts and accents: (See Help:Special characters) |
À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü ß à á â ã ä å æ ç è é ê ë ì í î ï ñ ò ó ô œ õ ö ø ù ú û ü ÿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü ß à á â ã ä å æ ç è é ê ë ì í î ï ñ ò ó ô œ õ ö ø ù ú û ü ÿ |
Punctuation: ¿ ¡ « » § ¶ |
¿ ¡ « » § ¶ † ‡ • - – — ¿ ¡ « » § ¶ † ‡ • - – — |
Commercial symbols: |
™ © ® ¢ € ¥ £ ¤ ™ © ® ¢ € ¥ £ ¤ |
Greek characters: α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω α β γ δ ε ζ |
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω |
Math characters: ∫ ∑ ∏ √ − ± ∞ |
∫ ∑ ∏ √ − ± ∞ ≈ ∝ ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ ø ∈ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ ℵ ∉ ∫ ∑ ∏ √ − ± ∞ ≈ ∝ ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ ø ∈ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ ℵ ∉ |
Writing a symbol over another one:
<span style="position: absolute;">o</span>x
gives ox.
Including another page — transclusion and templates
Changing a transcluded file will change every file that transcludes it.
This transclusion demo is a little bit of text from the page Help:Transclusion Demo to be included into any file. |
{{:Help:Transclusion Demo}} |
A special kind of page designed for transclusion. These pages are found in the Template: namespace. Templates can even take parameters. When you edit a page, all the templates used on the page are listed after the edit box.
This is underlined |
{{H:title|hovertext|This is underlined}} |
Records of edits in the database
Edits are recorded both in the revision table and in the recentchanges table of the database.
The revision table is used for page histories and user contribution lists. The recentchanges table is used for recent and related changes, watchlists, and (in the case of page creation) for the list of new pages.
This distinction is relevant in the case that old edits are removed from one of the two tables. For example, if three months of recent changes are kept in the recentchanges table, while nothing is deleted from the revision table, then older edits can be seen in page histories and user contribution lists, but not in recent and related changes, watchlists, and (in the case of page creation) in the list of new pages.
Import of page revisions adds to the revision table but not to the recentchanges table, so they add to page histories and user contribution lists, but not to recent and related changes, watchlists, and (in the case of page creation) the list of new pages.
Links to other help pages
- Help contents
- Meta · Wikinews · Wikipedia · Wikiquote · Wiktionary · Commons: · mw: · b: · s: · mw:Manual · Google
- Versions of this help page (for other languages see further)
- Meta · Wikinews · Wikipedia · Wikiquote · Wiktionary
- What links here on Meta or from Meta · Wikipedia · MediaWiki
- Reading
- Go · Search · Stop words · Namespace · Page name · Section · Backlinks · Redirect · Category · Image page · Special pages · Printable version
- Tracking changes
- Recent changes (enhanced) | Related changes · Watching pages · Diff · Page history · Edit summary · User contributions · Minor edit · Patrolled edit
- Logging in and preferences
- Logging in · Preferences · User style
- Editing
- Starting a new page · Advanced editing · Editing FAQ · Edit toolbar · Export · Import · Shortcuts · Edit conflict · Page size
- Referencing
- Links · URLs · Piped links · Interwiki linking · Footnotes
- Style and formatting
- Wikitext examples · CSS · Reference card · HTML in wikitext · Formula · List · Table · Sorting · Colors · Images and file uploads
- Fixing mistakes
- Show preview · Testing · Reverting edits
- Advanced functioning
- Expansion · Template · Advanced templates · Parser function · Parameter default · Variable · System message · Substitution · Array · Calculation · Embed page
- Others
- Special characters · Renaming (moving) a page · Talk page · Signatures · Sandbox · Legal issues for editors