Help:Wiki format brief overview

From Mod Wiki

Jump to: navigation, search

This page will get you familiar with the basic methods of formatting text in wiki environment, which is necessary to arrange a full-fledged article. Let's start from the principles.

Contents


Main principles

The main formatting principles are

  • Surrounding tags - with the text enclosed in them.
  • Single markers - indicate the format of the text after them.
  • Templates - complex tags, which create the portions of the text, for convenient use.

Surrounding tags

Bold text

  • You can get the bold text by enclosing the text section between three single inverted comas

Example:

how to write how it looks
'''Bold''' Bold


Italicize text

  • Put the text between two single inverted comas to make the text Italic

Example:

how to write how it looks
''Italic'' Italic


Underlining

  • Put the text between the tags <u>...</u> to underline it

Example:

how to write how it looks
<u>Underlining</u> Underlining


Tags combination

  • Tags can be used in combinations, it's important to keep the correct sequence.

Example:

how to write how it looks
'''<u>Underlining</u>''' Underlining


Block

  • Use the pair <pre>...</pre> to create a block. Bear in mind that the enclosed text will not be combined with the other tags, however the text will be displayed in the place where you put it, retaining all spaces and tabulations.

Example:

how to write how it looks
<pre>Block</pre>
Block


Source code

Use the pair <source lang="..."></source to enclose source code blocks. This highlights the code to make it easier to read. The main kinds are "ini" for Ltx scripts, "lua" for Lua scripts, and "xml" for Xml.

Example:

how to write how it looks
<source lang="ini">
[2515]
; cse_abstract properties
section_name = smart_terrain
name         = esc_bandits_smart_terrain
position     = 131.02030944824,0.065616846084595,-248.9094543457
direction    = 0,0,0
<source lang="lua">
for index = 1, #states do
	table.insert(tbl.state, states[index])
end
<source lang="xml">
<string id="wpn_ak100_m1">
	<text>AK 100</text>
</string>

See http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi for a complete description.

Headings

  • The heading tags are very important because they separate the logical sections. You can see how the headings function below.
==Общие принципы==
...
==Surrounding tags==
...
==Single markers==
...
===Alternative block===

Single markers

Alternative block

  • The drawback of creating block with <pre>...</pre> tags is its inability to format text enclosed within it. There's no such problems with alternative blocks; you can create it, having put space in the beginning of each phrase of the block.

Example:

how to write how it looks

Alternative
Block

Alternative
Block

Contents

  • Appears automatically when the text has more than three headings, however the contents box can be displayed forcibly with the tags below.

Example:

how to write how it looks
__TOC__

Templates

Example

  • On this page I used the example template for a number of times. The condition is often enclosed into the NON-formatiing tag <nowiki>...</nowiki>.
{{sample|<nowiki>Condition</nowiki>|Condition}}

Extras

Editing note

Personal tools
In other languages