Beautiful banners are coming to every article and you can help!
Check out our guidelines and learn how to create your own!

Wikitravel:Wiki markup

From Wikitravel
Revision as of 03:31, 24 November 2011 by Inas (Talk | contribs)

Jump to: navigation, search

Wikitravel uses a special code called Wiki markup for formatting the text and images in an article. The Wiki markup used while editing a page will determine how the text looks and what links and images are in the page.

When editing Wikitravel articles, try to follow the conventions in the Manual of style. These are guidelines for making a "good" Wikitravel article; if you don't quite get all of them, then just do what you can, and someone else will come through and clean up your work after you're done.

Text formatting

To get this output... ...use this markup.

Bold text is surrounded by three apostrophes.

'''Bold text''' is surrounded by three apostrophes.

Italic text is surrounded by two apostrophes.

''Italic text'' is surrounded by two apostrophes.

For a bullet-point list, put each list item on its own line, with a star in front of it:

  • Winken
  • Blinken
  • Nod

For a bullet-point list, put each list item on its own line, with a star in front of it:

*Winken
*Blinken
*Nod

A numbered list is similar to a bullet-point list, but each item starts with a hash symbol instead:

  1. Tinker
  2. Evers
  3. Chance

A numbered list is similar to a bullet-point list, but each item starts with a hash symbol sign instead:

#Tinker
#Evers
#Chance

Making links

To get this output... ...use this markup.

You can link to an article like Main Page by adding the article title with two square brackets around it.

You can link to an article like [[Main Page]] by adding the article title with two square brackets around it.

You can give the link alternate text, like go to the main page, by adding a vertical bar after the title, and then the text you want to use.

You can give the link alternate text, like [[Main Page|go to the main page]], by adding a vertical bar after the title, and then the text you want to use.

Links in different namespaces, like Wikitravel:FAQ or User:Evan, work the same way.

Links in different namespaces, like [[Wikitravel:FAQ]] or [[User:Evan]], work the same way.

Using a vertical bar at the end of the link (but before the closing brackets) will hide the namespace, like FAQ or Evan.

Using a vertical bar at the end of the link (but before the closing brackets) will hide the namespace, like [[Wikitravel:FAQ|]] or [[User:Evan|]].

It's OK to put in links to a page that doesn't exist yet.

It's OK to put in links to [[a page that doesn't exist yet]].

Putting a URL like http://www.google.com/ into text makes it into an external link automatically.

Putting a URL like http://www.google.com/ into text makes it into an external link automatically.

You can give an external link wikitravel style, like Google [1], by using the title you want to use, a space, a single square bracket, the URL, and a closing square bracket.

You can give an external link more readable text, like Google [http://www.google.com/], by using a single square bracket, the URL, a space, the title you want to use, and a closing square bracket.

Special links

Some links to special namespaces appear not in the article itself, but in the Other sites/languages sidebar. These are used for linking to...

Interlanguage links have the format [[xx:Article]], where "xx" is the code for the language being linked to. Wikipedia/Open Directory links are [[WikiPedia:Article]] and [[Dmoz:Article]] respectively. These should be placed at the end of the article, with any Interlanguage links above any Wikipedia or Open Directory links, and any Wikipedia links above any Open Directory links.

Listings

Content in the special tags <see>...</see>, <do>...</do>, <eat>...</eat>, <drink>...</drink>, <sleep>...</sleep>, <listing>...</listing> is automatically formatted into a listing for an attraction, activity, restaurant, bar or accommodation. These listings can be automatically added and edited by pointing and clicking, and you should generally not need to touch their contents in the page editor; see Wikitravel:Listings for details.

Templates

Text enclosed in curly brackets {{ }} is used to insert the contents of templates into text. For example, {{warningbox|Don't go here}} produces the following:

Travel Warning WARNING: Don't go here


See Wikitravel:Template index for a full list.

Tables

Think twice before you add a table to Wikitravel: many things like complicated transport schedules go out of date pretty much instantly and are thus better not added. But if you insist, here's how they work:

{|
table start -- add border="1" cellspacing="0" cellpadding="3" to make the lines between table cells visible
|+
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

So, for example, this:

{| border="1" cellspacing="0" cellpadding="3"
|+ Caption
! Header 1 !! Header 2
|-
| Cell 1 || Cell 2
|}

Looks like this:

Caption
Header 1 Header 2
Cell 1 Cell 2

Comments

Text enclosed between the special comment characters <!-- and --> is not displayed. This can be used to leave instructions or warnings visible only when editing the page, but should be used sparingly.

The following special comments are used by Wikitravel Press to control which parts of the article appears when printed.

<!--PRINT ... PRINT--> 
Used to wrap sections visible only in print and not on the website
<!--WEB-START--> ... <!--WEB-END--> 
Used to wrap sections visible only on the web and not in print

See Editor's Handbook: Preparing guides for print for details.

See also

Variants

Actions

Destination Docents

In other languages

other sites