Help:Editing BoyWiki 101: Difference between revisions

From BoyWiki
No edit summary
Line 53: Line 53:


{{Boxes end}}
{{Boxes end}}
==== Table of contents ====
When a page has at least four headings, a table of contents (TOC) will automatically appear after the lead and before the first heading. The TOC can be controlled by magic words or templates:
* <code><nowiki>__FORCETOC__</nowiki></code> forces the TOC to appear at the normal location regardless of the number of headings.
* <code><nowiki>__TOC__</nowiki></code> forces the TOC to appear at the point where the magic word is inserted instead of the normal location.
* <code><nowiki>__NOTOC__</nowiki></code> disables the TOC entirely.
=== Indent text ===
Indentation is most commonly used on talk pages.
{{markup
|<nowiki>Indentation as used on talk pages:
:Each colon at the start of a line
::causes the line to be indented by three more character positions.
:::(The indentation persists
so long as no carriage return or line break is used.)
:::Repeat the indentation at any line break.
::::Use an extra colon for each response.
:::::And so forth ...
::::::And so on ...</nowiki>
|Indentation as used on talk pages:
:Each colon at the start of a line
::causes the line to be indented by three more character positions.
:::(The indentation persists
so long as no carriage return or line break is used.)
:::Repeat the indentation at any line break.
::::Use an extra colon for each response.
:::::And so forth ...
::::::And so on ...
}}
=== Text formatting ===
{| class="wikitable"
|- valign="top"
! Description
! What you type
! What it looks like
|- id="emph" valign="top"
|
''Italics'', '''bold'''
|
<pre>To ''italicize text'', just put
2 apostrophes on each side.
3 apostrophes will '''bold the text'''
5 apostrophes for '''''bold italics'''''
'''''Italic and bold
formatting''''' only works properly
within a single line.
For text as {{Smallcaps|small caps}},
that uses a [[Help:Template|template]].
</pre>
|
To ''italicize text'', just put
2 apostrophes on each side.
3 apostrophes will '''bold the text'''
5 apostrophes for '''''bold italics'''''
'''''Italic and bold
formatting''''' only works properly
within a single line.
|-
|
Small chunks of source code within a line of normal text.
Code is displayed in a monospace font.
|
<pre><nowiki>function <code>int m2()</code> is nice</nowiki></pre>
|
function <code>int m2()</code> is nice
|- valign="top"
|
Syntax highlighting for source code.
Computer code has colored text and more stringent formatting.
For example, to define a function: <code>int m2()</code>, with highlights.
|
<pre><nowiki><syntaxhighlight lang="cpp">
#include <iostream>
int m2 (int ax, char *p_ax) {
  std::cout <<"Hello World!";
  return 0;
}</syntaxhighlight></nowiki></pre>
|
<syntaxhighlight lang="cpp">
#include <iostream>
int m2 (int ax, char *p_ax) {
  std::cout <<"Hello World!";
  return 0;
}</syntaxhighlight>
|-
|
<small>Small text</small>
|
<pre><nowiki>Use <small>small text</small> if needed.
A span tag can set text font-size as
being <span style="font-size: 87%">87%
of prior size</span>, to match an
image caption.</nowiki></pre>
|
Use <small>small text</small> if needed.
A span tag can set text font-size as
being <span style="font-size: 87%">87%
of prior size</span>, to match an
image caption.
|-
|
<big>Big text</big> (Obsolete)
|
<pre><nowiki>
Better not use <big>big text</big>,
unless <small> it's <big>within</big>
small</small> text.
</nowiki></pre>
|
Better not use <big>big text</big>,
unless <small> it's <big>within</big>
small</small> text.
|-
|
You can include a '''non-breaking space''' (sometimes called '''non-printing character''') where you require two words to always appear together on the same line, such as ''Mr.&nbsp;Smith'' or ''400&nbsp;km/h'', using '''<code>&amp;nbsp;</code>''' in place of a regular space between the two "words" that need to behave as a single word (never be separated on different lines).
|
<pre>Mr.&amp;nbsp;Smith or 400&amp;nbsp;km/h</pre>
|
Mr.&nbsp;Smith or 400&nbsp;km/h
|-
|
'''Extra spacing''' within text can best be achieved using the [[Template:Pad|pad]] template.
|
<pre><nowiki>Mary {{pad|4em}} had a little lamb.</nowiki></pre>
|
Mary {{pad|4em}} had a little lamb.
|-
|
'''Typewriter font''' (Obsolete)
(Also works beyond the end of a paragraph.)
|
<pre><nowiki><tt>arrow      &amp;rarr;</tt>
<tt>''italics'', '''bold'''</tt>
<tt>[[wikilink]]
New paragraph </tt>started here.</nowiki></pre>
|
<tt>arrow      &rarr;</tt>
<tt>''italics'', '''bold'''</tt>
<tt>[[wikilink]]
New paragraph </tt>started here.
|}


==See also==
==See also==

Revision as of 12:04, 19 April 2014



Help Editing

This pages is intended to be a basic overview of editing pages on BoyWiki.


Equal signs are used to mark the enclosed text as a section heading: ==Section name== for a primary section; ===Subsection name=== for the next level (a subsection); and so on to the lowest-level subsection, with =====Sub-subsection name=====. Spaces between the equal signs and the heading text are optional, and will not affect the way the heading is displayed. The heading must be typed on a separate line. Include one blank line above the heading, and optionally one blank line below it, for readability in the edit window. (Only two or more consecutive blank lines will add more white space in the public appearance of the page.)

Page layout

'''Page layout''' The Body sections


Example:


Wiki Code:

== Section ==
=== Subsection ===
==== Sub-subsection ====

Gives:

Section

Subsection

Sub-subsection

==References==

{{reflist}}


==See also==


==External links==


Table of contents

When a page has at least four headings, a table of contents (TOC) will automatically appear after the lead and before the first heading. The TOC can be controlled by magic words or templates:

  • __FORCETOC__ forces the TOC to appear at the normal location regardless of the number of headings.
  • __TOC__ forces the TOC to appear at the point where the magic word is inserted instead of the normal location.
  • __NOTOC__ disables the TOC entirely.

Indent text

Indentation is most commonly used on talk pages.

Template:Markup

Text formatting

Description What you type What it looks like

Italics, bold

To ''italicize text'', just put
2 apostrophes on each side.

3 apostrophes will '''bold the text'''

5 apostrophes for '''''bold italics'''''

'''''Italic and bold
formatting''''' only works properly
within a single line.

For text as {{Smallcaps|small caps}},
that uses a [[Help:Template|template]].

To italicize text, just put 2 apostrophes on each side.

3 apostrophes will bold the text

5 apostrophes for bold italics

Italic and bold formatting only works properly within a single line.


Small chunks of source code within a line of normal text.

Code is displayed in a monospace font.

function <code>int m2()</code> is nice

function int m2() is nice

Syntax highlighting for source code.

Computer code has colored text and more stringent formatting. For example, to define a function: int m2(), with highlights.

<syntaxhighlight lang="cpp">
#include <iostream>
int m2 (int ax, char *p_ax) {
  std::cout <<"Hello World!";
  return 0;
}</syntaxhighlight>
#include <iostream>
int m2 (int ax, char *p_ax) {
  std::cout <<"Hello World!";
  return 0;
}

Small text

Use <small>small text</small> if needed.

A span tag can set text font-size as
being <span style="font-size: 87%">87%
of prior size</span>, to match an
image caption.

Use small text if needed.

A span tag can set text font-size as being 87% of prior size, to match an image caption.

Big text (Obsolete)

Better not use <big>big text</big>,
unless <small> it's <big>within</big>
small</small> text.

Better not use big text, unless it's within small text.

You can include a non-breaking space (sometimes called non-printing character) where you require two words to always appear together on the same line, such as Mr. Smith or 400 km/h, using &nbsp; in place of a regular space between the two "words" that need to behave as a single word (never be separated on different lines).

Mr.&nbsp;Smith or 400&nbsp;km/h

Mr. Smith or 400 km/h

Extra spacing within text can best be achieved using the pad template.

Mary {{pad|4em}} had a little lamb.

Mary Template:Pad had a little lamb.

Typewriter font (Obsolete)

(Also works beyond the end of a paragraph.)

<tt>arrow      &rarr;</tt>

<tt>''italics'', '''bold'''</tt>

<tt>[[wikilink]]

New paragraph </tt>started here.

arrow →

italics, bold

wikilink

New paragraph started here.

See also

External links