Text Formatting Rules

    Keywords: SL description

This page lists all formatting rules for text in pages. See Text Formatting Rules - Introduction if you are just beginning to edit pages.

Table of contents


Emphasis (Bold/Italic)

  • Put two single-quotes '' on both sides for emphasis (''italic'' -> italic).
  • Put two underscore __ on both sides for strong emphasis (__bold__ -> bold).
  • These can be combined (__''bolditalic''__ -> bolditalic)
  • Emphasis can be used multiple times within a line, but cannot cross line boundaries.


  • Extra spaces/tabs and single line breaks inside text are ignored, all the text will be considered a single paragraph.
  • To make multiple paragraphs, use a blank line between them
  • To make a line break at a specific point, use %%% (in headings and lists too: continue text in same line).
  • Four (or more) minus signs (----) at the start of a line make a horizontal rule.
  • %%%% makes a "clear all" linebreak, forcing text below a diagram. [1]

Indentation, preformatted, and verbatim text

To indent a paragraph, start the line either with

  • '>' (preferred; indents everything, with a line in front of it: lists, headings, diagrams) or with
  • ';:' ("mis"using definition lists; avoid if possible).

In order to use preformatted text or make simple tables, start lines with a space (gets rendered with monospace font). [2]

In order to use text verbatim -- without the wiki interpreting any characters -- have two lines just containing three backticks (```) on their own, nothing else. Everything between those lines is inserted verbatim as preformatted text. (HTML characters get escaped though for security reasons.)

Example: This is standard text

This is level 1 indentation using ;: (semicolon-colon).
And this is level 2 indentation ;;: (semicolon-semicolon-colon).

This is level 1 indentation using > (greater_than).

And this is level 2 indentation. > > (greater_than-greater_than)

  • This is an indented list. > > * (greater_than-greater_than-asterisk)
This is preformatted text
using a monospace font
(each line started with a space).
This is preformatted/verbatim text, which can contain !WikiWords (Links) or
{{anything}} else http://really.
It is shown <verbatim>.


  • * at the start of a line for first level
    • ** for second level
      • *** for third level, etc
  • Use * for bullet and # for numbered lists (mix at will)
  • ;Term: Definition for definition lists
  • One line for each item
  • Other leading whitespace signals preformatted text, changing font.


  • '== ' at the start of a line makes a large heading.
  • '=== ' at the start of a line makes a medium heading.
  • '==== ' at the start of a line makes a small heading.

You can optionally end the line with the same amount of '=' (Wikipedia style).

Note: There has to be a space after the '=' at the start.

2nd note: all headings show up in the TOC (Table Of Contents) of the page.

Display Text Formatting Symbols

  1. To force a symbol to be displayed (instead of being interpretted as formatting), place a "!" before the symbol. To display B4 instead of B4, type in !B4 in edit page.
  2. For displaying the square brackets ('['), use ![ for the opening bracket, or else it will be interpreted as a link (e.g. [aji] against aji ).
  3. "!" may not work for all symbols. In the case of multi character symbols, consider typing the formatting symbol ' or _ 4 times in between the text formatting symbols.

Formulas (MathJax)

Sensei's Library supports MathJax with which you can write formulas delimited by double backticks (````) such as:

  • “``sum_(territ\o\ry=0)^(oo) empty + prison\er_W``”, which produces:
``sum_(territ\o\ry=0)^(oo) empty + prison\er_W``
  • “``sum_("territory"=0)^\infty "empty" + "prisoner"_W``”, which produces:
``sum_("territory"=0)^\infty "empty" + "prisoner"_W``
  • “``G_t = { a_t - t, b_t - t, … | p_t + t, q_t + t, … }``”, which produces:
``G_t = { a_t - t, b_t - t, … | p_t + t, q_t + t, … }``


  • Perhaps some of these should be moved to the page MathJax and/or a new page CGT/Coding with MathJax?
  • The syntax differs in some respects from the MathJax syntax used at sites such as [ext] Mathematics Stack Exchange (editing help).
  • One may sometimes see an error message, “``color(red)("[Math Processing error]")``”, which goes away after a while or on reloading the page.
    • This appears to happen if one’s browser is stressed, e.g. using a large amount of memory. ΏPerhaps a timeout?
  • Formulae in the middle of links, though otherwise correctly formatted, are not underlined like the rest of the link (if any); the link is however followed as usual when one clicks on the formula.
    • It may therefore be felt advisable to avoid MathJax in linked text.
    • This also goes for section headings and diagram titles, because of the links in the Table of Contents
    • Especially in the latter case, formulae may be used anyway if the gain in clarity justifies it.
  • In the examples below: ``color(darkgreen)("Preferred (dark green) ") color(darkred)("Deprecated (dark red)")``
  • To group an expression you can use many sorts of brackets (see Grouping brackets on [ext] http://asciimath.org/).
    • Sometimes brackets are removed, sometimes not: “``2^(3^4)+(2+3)/4+(G^L)_t``” yields “``2^(3^4)+(2+3)/4+(G^L)_t``”.
      • (To Do: discover & document the rules)
    • To be sure your brackets do not appear, use “{:” and “:}”, as in “``{:G^L:}_t``” yields “``{:G^L:}_t``”.
  • Superscripts (using “^”) are honoured after subscripts (using “_”), but not before them.
    • Where they must occur in the opposite order, you can use invisible brackets, as in “``{:G^L:}_t``”, yielding “``color(darkgreen)({:G^L:}_t)``”.
    • Of course you may also use visible brackets, e.g. “``(G^L)_t``” (yielding “``color(darkgreen)((G^L)_t)``”)
      • If you code “``G_t^L``”, you get “``color(darkred)(G_t^L)``”, which is at best ambiguous, and may be read as “``color(darkred)((G_t)^L)``”, which is wrong.
      • And if you simply code “``G^L_t``”, you get “``color(darkred)(G^L_t)``”, which is a useless mess!
  • When coding CGT:
    • (To Do: update from symbols recently found & documented at Abstract Game)
    • The game STAR should be coded as “``ast``” (yielding “``color(darkgreen)(ast)``”), not as “``*``” (yielding “``color(darkred)(*)``”).
    • It is preferable to code the double-bar used in compressed abstract game notation and for “is fuzzy against” as the literal text “" || "” rather than simply “||”.
      • This yields e.g. “``color(darkgreen)({a" || "b|c}" || "G)``” rather than “``color(darkred)({a||b|c}||G)``”.
    • It is preferable to code UP STAR using a literal (and therefore an HTML entity) for UP (but not for STAR): “`` "&uarr;"ast ``”, yielding “``color(darkgreen)("↑"ast)``”.
      • When it is part of a larger formula, the space seems to return unless you bracket it, i.e. you need to code “``{:"&uarr;"ast:}``” (if you do not want the brackets displayed).
      • The simpler code “`` uarr ast ``”, yields “`` color(darkred)(uarr ast) ``”, which unfortunately contains a confusing extra space.
      • The same goes mutatis mutandis for DOWN STAR.
      • If anyone discovers a simpler way to achieve this, please note it here.
    • Similarly, code “``"2"ast``” and “``"2"uarr``” (→ “``color(darkgreen)("2"ast")``” and “``color(darkgreen)("2"uarr")``”) rather than “``2 ast2 uarr``” (→ “``color(darkred)(2 ast"…2 uarr)``”) or “``2"*"``” (→ “``color(darkred)(2"*")``”).
      • When it is part of a larger formula, the space seems to return unless you bracket it, i.e. you need to code “``{:"2"ast:}``” etc. (if you do not want the brackets displayed).

Mark-Up Language (HTML)

  • Don't bother (see Wiki and HTML for reasons).
  • '<' and '>' and '&' are themselves.

Supported characters

  • Be aware that not everyone can display Unicode.
    • This remark dates from 2007, by now (2019) this should be less of a problem, as long as you avoid exotic languages.
  • To insert special characters (HTML entities) you may use the numerical &#XXXX; syntax, hexadecimal &#xYYYY; syntax or one of the [ext] predefined HTML entity names. Examples: &#21163; renders as 劫, &Uuml; renders as Ü.
    • On the whole, entity names should be preferred to the numerical form, as they make for more readable page source.

Many somewhat less common characters can be used directly in the source. These include:

  … – — Ώ ‘ “ ” ‘ ’ « »
  § † ‡ Ή ² ³
  £ ₯
  ± Χ χ Ό ½ Ύ
  • ° Ί ͺ
  α ι ν σ ϊ
  δ λ ο φ ό
  ΰ θ μ ς ω
  β κ ξ τ ϋ
  ί Π π ή ώ œ ζ
  • All characters can also be entered using the HTML numerical or entity syntax mentioned above, but that makes the page source harder to read, especially with numerical syntax: compare ‘4Χ6’, ‘4&times;6’, ‘4&#10761;6’,
  • It could thus be argued that the above characters should be left as they are in the source, but we currently (2019-01-08) appear to have no consensus.
    • A case where the HTML syntax may be preferred is when the characters themselves are (in the edit box font) harder or impossible to distinguish: “- – —” versus “- &ndash; &mdash;”.

It appears that arbitrary Unicode characters may be entered in the source while editing, but that many (including Chinese, Japanese, Korean and Greek) will be converted to numerical HTML syntax when the page is stored or previewed. These include:

√ ⁰ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁿ ⁽ ⁾ ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎ ∈ ≠ ≡ ⇐ ⇔ ⇒ ← → ↔ ↑ ↓ ◦ ‣ ∙
≥ ≤ ≈
⅓ ⅐ ⅑ ⅒ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ ⅟
ℕ ℤ ℚ ℝ ℂ ℵ
⌊ ⌋ ⌈ ⌉
▲ ▼ ► ◄
★ ○ ⚆ ⚇ ● ⚈ ⚉

Subscripts (a strange disordered selection, and not even uniformly rendered in some fonts)

&#8320; ... &#8329; → ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎ (Latin) ₐ ₑ ₕ ᵢ ⱼ ₖ ₗ ₘ ₙ ₒ ₚ ᵣ ₛ ₜ ᵤ ᵥ ₓ (Greek) ᵦ ᵧ ᵨ ᵩ ᵪ (IPA) ₔ, .


  • Subpages show up in the left yellow page area.
  • Their name is of the form "basename / subpage".
  • Links to subpages are of the form [basename / subpage].
  • A subpage from the current page can be referenced by [/subpage].
  • The %%Subpages%% macro will create a table of content of subpages.

Subpages have some limitations, so you must have a good reason to create a subpage, as you cannot structure content with this concept.

More specifically, they lack following:

References (Links)

You can use hyperlinks to link parts of your text to other pages, parts of them (diagrams, headers, footnotes, anchors) or arbitrary URLs or to add pictures to your text. Some links are usually created automatically, but you can suppress them.

Suppressing links and specifying the text

  • JoinedWords and some URLs are usually automatically linked, as explained below
    • You can suppress this automatic linking by preceding the them with a '!', e.g. !NotLinkedAsWikiName, !http://not.linked.to/.
  • You can create a link with arbitrary text and target by using square brackets and '|' (or '¦') in the form [(linked-text)|(target)], where (target) is one of the variants described below, e.g. a ‘Wiki Name’ or a URL:
  • The second form is more general, as you can link single words, multiple words with spaces or arbitrary text. This can make your text easier to read: compare “The Art of 9x9 Go” with "TheArtOf9x9Go".

Linking to other (main) pages

  • You can link to other pages by JoiningCapitalizedWords or by enclosing in square brackets: [Go].
    • If you use square brackets, spaces and the caracters [ . , - ' + ( ) ] are removed, as explained at WikiName.
    • In all cases, the result should be the ‘Wiki Name’ of the page (see there for details).

Linking to related pages

Linking to parts of pages

You can link to particular points on pages (‘anchors’), using automatically generated or manually specified anchors:

  • Use automatically generated anchors to link to (sub-)headers, diagrams or footnotes by number:
    • Caution: These links may be invalidated if the order (or number) of headers, diagrams or footnotes on the target page changes; use manually generated “anchors”, to avoid this.
    • Links to (sub-)headers by number: use #tocnumber at the end or on its own (on the same page). Example: [ReferenceSection - Cultural pages|ReferenceSection#toc2] produces ReferenceSection - Cultural pages.
    • Links to diagrams by number: use #diagnumber at the end or on its own. Example: [Ko – diagram 3 | ko#diag3] produces Ko - diagram 3; the unnamed link ko#diag3 also links there.
    • Links to footnotes (next section) by number: use #number at the end or on its own. Example: [Ko – note 3 | ko#3] produces Ko - note 3; the unnamed link ko#3 also links there.
      • There are also automatically generated anchors #r(number): they refer to the (first) place referring to a footnote, and can be used to return there from the footnote. It is unlikely to be useful to code a link to these.
  • Use manually specified anchors to link to an arbitrary point on a page using the anchor template (see there for details):
    • Choose an (anchor-name) consisting only of numbers and letters; see the template for other restrictions.
    • Create an HTML anchor on the target page by inserting {{:anchor|(anchor-name)}} at the desired point, e.g. {{:anchor|list}} for an anchor called list (as on page EGC).
    • Refer to it on the same page as #(anchor-name). Warning: the name is case-sensitive.
    • Refer to it from another page by adding #(anchor-name) to the page link, e.g. EGC#list for the example.

Linking to wiki functions (editing etc.)

  • “[Edit this page | phpwiki:?edit=TextFormattingRules]” creates a link like “Edit this page”, to do just what it says. (Please cancel if you test that link!)
  • to be extended with any other possibilities

Linking to URLs

  • URLs starting with "http:", "https:", "ftp:" or "mailto:" (obfuscated!) are linked automatically, as in: http://gtl.xmp.net/.
  • URLs of images, ending with .png, .gif or .jpg, are inlined if put in square brackets. See How to add images.
    • To left- or right-align an inlined picture, see Picture Template.
    • N.B. Images are not properly displayed when previewing a page in edit mode.


  • Create links to footnotes with [#1] or any other number (i.e. square brackets + hash + number), and precede the footnote itself with [1] (i.e. square brackets + number).
  • In order to link to a footnote at another page, use [(pagename)#(number)].

A reference to a footnote looks like.[99]

Here is another reference.[99]

[99] A footnote looks like this; the number links back to the first reference to it.

Spaces in links

You can use spaces to make the code of your links more readable: [ Ko – note 3 | ko #3 ] produces the same result as [Ko – note 3|ko#3], namely Ko - note 3. Note, however, that no space is allowed between # and the anchor name.


A ko  
$$ A ko
$$ . . O X . .
$$ . O . O X .
$$ . . O X . .

All diagram lines start with "$$ ".

The first line is the title line. It can define two things:

  • Whether odd numbers are black or white. If the line begins with $$B, the numbers will be rendered as B1,W2,B3, and so on. Enter W right after the "$$" for W1,B2,W3.
  • The caption of the diagram. Any other text will be displayed below the diagram.

In the board area, you can enter the following:

  • White stone: O; marked with circle: W; marked with square: @
  • Black stone: X; marked with circle; B; marked with square: #
  • Empty point: .; marked with circle; C; marked with square: S; marked as hoshi: ,; marked completely blank: _
  • Numbered stones: 1 through 9 and 0 ("0" produces W10 or B10, the highest number possible, unless you specify a higher starting point with m.)
  • Letters: a-z (lowercase)
  • Borders and corners: -, |, +

All diagrams are also available as SGF files -- you can download them by clicking on the diagram graphic.

You can also refer to moves with images like "B3 is good" by writing "B3 is good", and in the same way to marked stones: "WS is good" gives "white+square is good".

Read more about it in How Diagrams Work.


Syntax summary:

{{:img | alternate text | URL(:i(number))) (| title=title) (| link=URL) (| caption=caption) (| float=[left|right]) (| width=pixels) (| height=pixels) }}
for details, see Special Templates/Image.


Table of Contents

  • Use the %%TOC%% macro to create the table of contents (as the one on the top of this very page).
  • %%TOC+%% will also add a table of content of subpages (as made by %%Subpages%%).
  • %%TOC-%% will omit the table of diagrams, and only show the table of contents

Navigation Box

Back to beginning
See SL Tips and Tricks for more

  • Subsequent lines preceded by => are displayed in a distinct right aligned box. This can be useful as a navigating aid. See the example at the right side.
  • Lines preceded by =< are displayed in a left aligned box.

Prefabricated Boxes


Box placed in the top right corner for displaying Chinese, Korean and Japanese translation of (Go-)terms.

Search box

%%Search%% will add a search box in the page



Lines starting with a single '%' are source comments / remarks and are not normally shown when viewing a page. Note that HTML comments – between “<!--” and “-->” – are not comments in our markup: otherwise the preceding text would read ‘– between “” –’! This behaviour can be changed in User Preferences, in which case they are shown in grey.

Note that when a comments occurs between two lines of normal text with no intervening blank lines they will be formatted in the same paragraph. I.e.

% does not break the

will be formatted as

This paragraph

User-defined templates

A template allows one to create standard formatting or boilerplate text with variable parts. Some templates, such as {{:anchor}}, are pre-defined special templates, but one can also create one’s own templates.

For more details, see the help-article How templates work.

SL Writing Guidelines

You may follow some SL Conventions, but they are less important than your ideas and insights!

See also


[1] Charles: I consistently make that eight per-cents, in order to give a good clearance below diagrams. But I don't know whether that depends on the browser in use (I have IE).

[2] Preformatted text does not wrap, so please do not enter long lines in preformatted text.

Text Formatting Rules last edited by Dieter on November 23, 2023 - 14:19
RecentChanges · StartingPoints · About
Edit page ·Search · Related · Page info · Latest diff
[Welcome to Sensei's Library!]
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Login / Prefs
Sensei's Library