More advanced editing

From SubSurfWiki
< Bitnami MediaWiki:Training
TrainingMore advanced editing
Jump to navigation Jump to search


  • Always use class="wikitable" in your tables, unless you are styling a completely new kind of container
  • You can also use sortable, collapsible, and collapsed, e.g. class="collapsible collapsed sortable wikitable"
  • Keep the amount of additional styling to a minimum (changing borders, changing cell colours, etc)
  • The templates {{Yes}}, {{No}}, and {{Perhaps}} are quite useful for some types of table
  • Make the table as readable as possible in wikitext, e.g. keeping rows if possible, rather than one cell per line


Mathematical formulae

  • Formulae that include mathematical letters, like x, and operators like × should not use the plain letter x. For a comprehensive set of symbols, and comparison between <math> tags and the {{math}} template see section TeX vs HTML.
  • The <math> tag typesets using LaTeX markup, which may render as an image or as HTML, depending on environmental settings. The <math> tag is best for the complex formula on its own line in an image format. If you use this tag to put a formula in the line with text, put it in the {{nowrap}} template.
  • The {{math}} template uses HTML, and will size-match a serif font, and will also prevent line-wrap. All templates are sensitive to the = sign, so remember to replace = with {{}} in template input. Use wikimarkup '' and ''' inside the {{math}} template, as well other HTML entities. The {{math}} template is best for typeset formulas in line with the text.
Markup Renders as
<math>2x \times 4y \div 6z + 8
   - \frac {y}{z^2} = 0</math>

{{math|2x &times; 4y &divide;
6z + 8 &minus; {{Fraction
  |y|z<sup>2</sup>}} {{=}} 0}}

<math>\sin 2\pi x + \ln e\,\!</math>
<math>\sin 2\pi x + \ln e</math>
{{math|sin 2&pi;''x'' + ln ''e''}}

2x × 4y ÷ 6z + 8 − y⁄z2 = 0

sin 2πx + ln e

Spacing in simple math formulae

  • Using &nbsp; to prevent line break is not needed; the {{math}} template will prevent line breaks anyway; you can use <br /> if you need an explicit line break inside a formula.
Markup Renders as
It follows that {{math
|''x''<sup>2</sup> &ge; 0}} is true when {{math|<VAR>x</VAR>}} is a real number.
It follows that x2 ≥ 0 is true when x is a real number.

Complicated formulae

  • See Help:Mathematics for how to use <math>.
  • A formula displayed on a line by itself should probably be indented by using the colon (:) character.
Markup Renders as
: <math>\sum_{n=0}^\infty \frac{x^n}{n!}</math>


  • Use references just as you would in a report or scientific paper.
  • References can contain formatting and links.
  • Use {{doi}} to link DOIs, e.g. DOI:10.1190/1.1440994
  • When you need the citation, enclose the text of the reference in <ref> tags:
Markup Renders as
...never done before (Brown, 2012)<ref>Brown, A (2012). Things that have never been done before. ''Journal of Improbability'' '''18''' (4), 121–134.</ref>
...never done before (Brown, 2012)[1]
  • To refer to an item multiple times, use name with a simple alphanumeric key the first time:
Markup Renders as
...always being done (Smith, 2012)<ref name=Smith>Smith, B (2012). Things that are always being done. ''Journal of High Probability'' '''21''' (3), 11–19.</ref>
...always being done (Smith, 2012)[2]
  • Then on subsequent citations you can just use the key. Notice the closing angle bracket has a slash before it:
Markup Renders as
...get done a lot (Smith, 2012)<ref name=Smith />
...get done a lot (Smith, 2012)[2]
  • To render the references, put this in a section entitled 'References':
Markup Renders as
  1. Brown, A (2012). Things that have never been done before. Journal of Improbability 18 (4), 121–134.
  2. 2.0 2.1 Smith, B (2012). Things that hare always being done. Journal of High Probability 21 (3), 11–19.