Wikitext reference I

From Sagataflwiki

(Difference between revisions)
Jump to: navigation, search
(Removing more general tag, so that only the more specific sub-category tag remains)
 
(20 intermediate revisions not shown)
Line 1: Line 1:
This is a quick reference guide to some of the WikiText functions. More may appear in [[Wikitext reference II]] later.
This is a quick reference guide to some of the WikiText functions. More may appear in [[Wikitext reference II]] later.
 +
== Making a link ==
 +
<pre>
 +
[[Article name]]
 +
</pre>
 +
As shown above, just put the article's name in double square brackets, and make sure that the 2nd and later words in the link are capitalized correctly.
 +
== Making a pluralized word link to a singlar article ==
 +
<pre>
 +
[[Article name]]s
 +
</pre>
 +
Most article names are in the singular form (Spell, not Spell'''s'''), but often an editor will want to turn a pluralized word into an internal hyperlink. This is done simply by adding an s immediately after the 2nd finishing square bracked, without a space in between.
 +
<br>[[Article name]]s
 +
 +
== Making a piped link ==
 +
<pre>
 +
[[Destination|ClickMe]]
 +
</pre>
 +
Gives this: [[Help:Destination|ClickMe]]
 +
 +
The ClickMe part is the word or words that the reader can see (and can click on), and the Destination part is where the reader is taken by the click.
 +
 +
== Making an internal link to an ahcor ==
 +
<pre>
 +
stuff
 +
</pre>
 +
== Making an external link ==
 +
<pre>
 +
stuff
 +
</pre>
== Adding categories to an article ==
== Adding categories to an article ==
Put this at the bottom of the article, with XYZ being the name of the category. You can put it anywhere in the article, but it's much easier for everyone if all categories are placed at the bottom.
Put this at the bottom of the article, with XYZ being the name of the category. You can put it anywhere in the article, but it's much easier for everyone if all categories are placed at the bottom.
<pre>
<pre>
-
[[Category:XYZ|Categories]]
+
[[Category:XYZ]]
</pre>
</pre>
 +
(Note, it used to be <pre>[[Category:XYZ|Categories]]</pre>, but the |Categories ending appears to do no good, and to do some harm, so it should be removed whereever it occurs.
 +
=== Controlling alphabetization ===
 +
Normally you'd be happy with having the article XYZ alphabetized under X (and tending to be last in X, since it is actually alphabetized not under X but under X, then Y, then Z), but if for some reason you want it to be alphabetized under Ergo, you write it like this:
 +
<pre>
 +
[[Category:XYZ|Ergo]]
 +
</pre>
 +
This is used in the Compare and Contrast articles, as seen here:
 +
<br>[[:Category:Compare_and_contrast]] and<br>
 +
[[:Category:Learning Sagatafl]]
 +
<br>(and yes, currently those two categories have identical contents, but eventually many more articles will be in Learning Sagatafl)
 +
 +
=== Hidden categories ===
 +
It is apparently possible to make some categories invisible, by adding a command word (a so-called "magic word") to the page for the category. Unregistered users will then never see those categories, while registered users can only see them if they turn on a special function under Preferences.
 +
 +
It is not yet documented here how this is done, but it could be a good idea t turn off most editor-only categories, since presumably most readers of this wiki will be interested only in the rules and the design history, rather than in the many strange tags that editors might want to place temporarily or permanently on articles. The Completion tags should perhaps still be visible to everyone. Or perhaps not.
 +
 +
It will eventually be documented here, how to do this, bu is not a high priority, as it can be done at any time and with ease, because it is done on each category page, rather than on each category tag in each article.
 +
== Linking to a category ==
== Linking to a category ==
 +
Notice the preceding colon.
<pre>
<pre>
-
[[Category:Editor stuff]]
+
[[:Category:Editor stuff]]
</pre>
</pre>
-
[[Category:Editor stuff]]
+
[[:Category:Editor stuff]]
-
== Table ==
+
== Making a redirect ==
-
Table with 3 columns and 3 rows, first in boldface.
+
In the first line of the article, include this
<pre>
<pre>
-
{|
+
#REDIRECT [[pagename]]
-
! A !! B !! C
+
-
|-
+
-
| 1 || 2 || 3
+
-
|-
+
-
| 4 || 5 || 6
+
-
|}
+
</pre>
</pre>
 +
Where you replace pagename with the name of the article you wish to link to.<br><br>
 +
 +
To redirect to a category instead, put in first a colon, then then name of the cateogry, e.g. like this:
 +
<pre>
 +
#REDIRECT [[:Category:Editor stuff]]
 +
</pre>
 +
 +
In both cases, what happens is an automatic instant redirect, rather than the user being shown a page and expected to clikc on the redirect link.
-
And the result that it produces below:
+
The command REDIRECT might not be case-sensitive, but just to be safe, always write it in all-caps. It is not known whether it makes any difference if there is text on the lines under the REDIRECT line, but as that is nonsensical, always erase all other text before putting in a redirect.
-
{|
+
== See also ==
-
! Item !! B !! C
+
[[Wikitext table reference I]]<br>
-
|-
+
http://www.mediawiki.org/wiki/Help:Links <br>
-
| 1 || 2 || 3
+
http://www.mediawiki.org/wiki/Help:Formatting
-
|-
+
-
| 4 || 5 || 6
+
-
|}
+
-
[[Category:Editor stuff|Categories]]
+
[[Category:wikitext]]

Latest revision as of 21:27, 22 January 2011

This is a quick reference guide to some of the WikiText functions. More may appear in Wikitext reference II later.

Contents

Making a link

[[Article name]]

As shown above, just put the article's name in double square brackets, and make sure that the 2nd and later words in the link are capitalized correctly.

Making a pluralized word link to a singlar article

[[Article name]]s

Most article names are in the singular form (Spell, not Spells), but often an editor will want to turn a pluralized word into an internal hyperlink. This is done simply by adding an s immediately after the 2nd finishing square bracked, without a space in between.
Article names

Making a piped link

[[Destination|ClickMe]]

Gives this: ClickMe

The ClickMe part is the word or words that the reader can see (and can click on), and the Destination part is where the reader is taken by the click.

Making an internal link to an ahcor

stuff

Making an external link

stuff

Adding categories to an article

Put this at the bottom of the article, with XYZ being the name of the category. You can put it anywhere in the article, but it's much easier for everyone if all categories are placed at the bottom.

[[Category:XYZ]]
(Note, it used to be
[[Category:XYZ|Categories]]
, but the |Categories ending appears to do no good, and to do some harm, so it should be removed whereever it occurs.

Controlling alphabetization

Normally you'd be happy with having the article XYZ alphabetized under X (and tending to be last in X, since it is actually alphabetized not under X but under X, then Y, then Z), but if for some reason you want it to be alphabetized under Ergo, you write it like this:

[[Category:XYZ|Ergo]]

This is used in the Compare and Contrast articles, as seen here:
Category:Compare_and_contrast and
Category:Learning Sagatafl
(and yes, currently those two categories have identical contents, but eventually many more articles will be in Learning Sagatafl)

Hidden categories

It is apparently possible to make some categories invisible, by adding a command word (a so-called "magic word") to the page for the category. Unregistered users will then never see those categories, while registered users can only see them if they turn on a special function under Preferences.

It is not yet documented here how this is done, but it could be a good idea t turn off most editor-only categories, since presumably most readers of this wiki will be interested only in the rules and the design history, rather than in the many strange tags that editors might want to place temporarily or permanently on articles. The Completion tags should perhaps still be visible to everyone. Or perhaps not.

It will eventually be documented here, how to do this, bu is not a high priority, as it can be done at any time and with ease, because it is done on each category page, rather than on each category tag in each article.

Linking to a category

Notice the preceding colon.

[[:Category:Editor stuff]]

Category:Editor stuff

Making a redirect

In the first line of the article, include this

#REDIRECT [[pagename]]

Where you replace pagename with the name of the article you wish to link to.

To redirect to a category instead, put in first a colon, then then name of the cateogry, e.g. like this:

#REDIRECT [[:Category:Editor stuff]]

In both cases, what happens is an automatic instant redirect, rather than the user being shown a page and expected to clikc on the redirect link.

The command REDIRECT might not be case-sensitive, but just to be safe, always write it in all-caps. It is not known whether it makes any difference if there is text on the lines under the REDIRECT line, but as that is nonsensical, always erase all other text before putting in a redirect.

See also

Wikitext table reference I
http://www.mediawiki.org/wiki/Help:Links
http://www.mediawiki.org/wiki/Help:Formatting

Personal tools