Difference between revisions of "Sandbox"

From Allotments4All

Jump to: navigation, search
Line 1: Line 1:
 
[[Main Page]]
 
[[Main Page]]
 
===Examples===
 
<!--
 
:'''The rest of this page is deprecated but will be updated periodically.'''
 
:'''Please direct edits to the [[meta:MediaWiki User's Guide: Editing overview|Meta-Wikimedia version of this page]]'''
 
 
-->
 
{| border="1" cellpadding="2" cellspacing="0"
 
|-
 
! What it looks like
 
! What you type
 
|- valign="top"
 
|
 
Start your [[Wikipedia:Manual of Style (headings)|sections]] as follows:
 
 
<!-- The following code messes up the table of contents
 
    and makes the section edit links much less useful,
 
    so please do not use it.
 
== New section ==
 
=== Subsection ===
 
==== Sub-subsection ====
 
-->
 
<!-- The following should look almost the same, using
 
    HTML headings markup instead of wiki headings.
 
    However, it messes up the section edit links,
 
    so please do not use it.
 
<h2>New section</h2>
 
<h3>Subsection</h3>
 
<h4>Sub-subsection</h4>
 
-->
 
<!-- The following just uses bolding and font changes,
 
    so it should be safe.  However, it might not
 
    look exactly right, especially when people
 
    use non-standard CSS stylesheets.
 
-->
 
'''<font style="font-size:120%">New section</font>'''
 
 
'''<font style="font-size:110%">Subsection</font>'''
 
 
'''<font style="font-size:100%">Sub-subsection</font>'''
 
 
* Start with a second-level heading (<tt><nowiki>==</nowiki></tt>); don't use first-level headings (=).
 
* Don't skip levels (for example, second-level followed by fourth-level).
 
* A [[#Placement_of_the_Table_of_Contents_.28TOC.29|Table of Contents]] will automatically be added to an article that has four or more sections.
 
*If appropriate, place subsections in an appropriate order. If listing countries, place them in alphabetical order rather than, say, relative to population of [[OECD]] countries, or some random order.
 
|
 
<pre><nowiki>
 
==New section==
 
 
===Subsection===
 
 
====Sub-subsection====
 
</nowiki></pre>
 
|- valign="top"
 
|
 
A single [[newline]]
 
generally has no effect on the layout.
 
These can be used to separate
 
sentences within a paragraph.
 
Some editors find that this aids editing
 
and improves the function ''diff''
 
(used internally to compare
 
different versions of a page).
 
 
But an empty line
 
starts a new paragraph.
 
 
* When used in a list, a newline ''does'' affect the layout ([[#lists|see below]]).
 
|
 
<pre><nowiki>
 
A single [[newline]]
 
generally has no effect on the layout.
 
These can be used to separate
 
sentences within a paragraph.
 
Some editors find that this aids editing
 
and improves the function ''diff''
 
(used internally to compare
 
different versions of a page).
 
 
But an empty line
 
starts a new paragraph.
 
</nowiki></pre>
 
|- valign="top"
 
|
 
You can break lines<br>
 
without starting a new paragraph.
 
 
* Please use this sparingly.
 
* Close markup between lines, do not start a [[link]] or ''italics'' or '''bold''' on one line and close it on the next.
 
|
 
<pre><nowiki>
 
You can break lines<br>
 
without starting a new paragraph.
 
</nowiki></pre>
 
|- id="lists" valign="top"
 
|
 
* It's easy to create a list:
 
** Start every line with a star ([[asterisk]]).
 
*** More stars means deeper levels.
 
**** A newline in a list
 
marks the end of a list item.
 
 
* An empty line starts a new list.
 
|
 
<pre><nowiki>
 
* It's easy to create a list:
 
** Start every line with a star.
 
*** More stars means deeper levels.
 
**** A newline in a list
 
marks the end of a list item.
 
 
* An empty line starts a new list.
 
</nowiki></pre>
 
|- valign="top"
 
|
 
# Numbered lists are also good
 
## very organized
 
## easy to follow
 
### easier still
 
|
 
<pre><nowiki>
 
# Numbered lists are also good
 
## very organized
 
## easy to follow
 
### easier still
 
</nowiki></pre>
 
|- valign="top" id="definition"
 
|
 
; Definition list : list of definitions
 
; item : the item's definition
 
; another item
 
: the other item's definition
 
 
* Begin with a semicolon.  One item per line; a newline can appear before the colon, but using a space before the colon improves parsing.
 
|
 
<pre><nowiki>
 
; Definition list : list of definitions
 
; item : the item's definition
 
; another item
 
: the other item's definition
 
</nowiki></pre>
 
|- valign="top"
 
|
 
* You can even create mixed lists
 
*# and nest them
 
*#* like this
 
*#*; can I mix definition list as well?
 
*#*: yes
 
*#*; how?
 
*#*: it's easy as
 
*#*:* a
 
*#*:* b
 
*#*:* c
 
|
 
<pre><nowiki>
 
* You can even create mixed lists
 
*# and nest them
 
*#* like this
 
*#*; can I mix definition list as well?
 
*#*: yes
 
*#*; how?
 
*#*: it's easy as
 
*#*:* a
 
*#*:* b
 
*#*:* c
 
</nowiki></pre>
 
|- valign="top"
 
|
 
: A colon indents a line or paragraph.
 
A manual newline starts a new paragraph.
 
 
* This is primarily for displayed material, but is also used for discussion on [[Wikipedia:Talk page|Talk page]]s.
 
|
 
<pre><nowiki>
 
: A colon indents a line or paragraph.
 
A manual newline starts a new paragraph.
 
</nowiki></pre>
 
|- valign=top
 
|
 
When there is a need for separating a block of text
 
<blockquote>
 
the '''blockquote''' command will indent both margins when needed instead of the left margin only as the colon does. 
 
</blockquote>
 
This is useful for (as the name says) inserting blocks of quoted (and cited) text. 
 
|
 
<pre><nowiki>
 
<blockquote>
 
The '''blockquote''' command will indent
 
both margins when needed instead of the
 
left margin only as the colon does. 
 
</blockquote>
 
</nowiki></pre>
 
|- valign=top
 
|
 
(See formula on right):
 
 
*This is useful for:
 
** pasting preformatted text;
 
** algorithm descriptions;
 
** program source code;
 
** [[ASCII art]];
 
** chemical structures;
 
* '''WARNING''': If you make it wide, you [[page widening|force the whole page to be wide]] and hence less readable, especially for people who use lower resolutions. Never start ordinary lines with spaces.
 
|
 
<pre><nowiki>
 
IF a line starts with a space THEN
 
it will be formatted exactly
 
as typed;
 
in a fixed-width font;
 
lines will not wrap;
 
ENDIF
 
</nowiki></pre>
 
|- valign="top"
 
|
 
<center>Centered text.</center>
 
 
* Please note the American spelling of "center."
 
|
 
<pre><nowiki>
 
<center>Centered text.</center>
 
</nowiki></pre>
 
|- valign="top"
 
|
 
A [[horizontal dividing line]]:
 
this is above it
 
----
 
and this is below it.
 
 
* Mainly useful for
 
**disambiguation - but to be used sparsely, only when separating completely different, unrelated (groups of) meanings
 
**separating threads on Talk pages.
 
|
 
<pre><nowiki>
 
A [[horizontal dividing line]]:
 
this is above it
 
----
 
and this is below it.
 
</nowiki></pre>
 
|}
 

Revision as of 23:03, 3 February 2006

Main Page