Help:Editing

Revision as of 09:44, 25 November 2005 by Helen (talk | contribs) (editing basics, wikitext markup)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.7. Up-to-date documentation for the latest stable version of Moodle may be available here: Editing.

Editing Basics

Start editing
To start editing a page, click on the "Edit this page" (or just "edit") link at one of its edges. This will bring you to the edit page: a page with a text box containing the wikitext: the editable source code from which the server produces the webpage.
Summarize your changes
You should write a short edit summary in the small field below the edit-box.
Preview before saving
When you have finished, press preview to see how your changes will look - before you make them permanent. Repeat the edit/preview process until you are satisfied, then click "Save" and your changes will be immediately applied to the article.

Wikitext markup

What it looks like What you type

Start sections with header lines

Note: Single equal signs give the highest level heading, like the page title; usually projects have the convention not to use them.


New section

Subsection

Sub-subsection

  • Start with a second-level heading (==); don't use first-level headings (=).
  • Don't skip levels (for example, second-level followed by fourth-level).
  • A table of contents will automatically be added to an article that has four or more sections.
  • If you want to keep headings out of the TOC you have to use HTML heading tags and close them without using a slash e.g. <h4>heading too low level to be in the toc of large page<h4>.

== New section ==

=== Subsection ===

==== Sub-subsection ====


Newline

A single newline has no effect on the layout.

But an empty line starts a new paragraph, or ends a list or indented part. (<p> disables this paragraphing until </p> or the end of the section)

You can make the wikitext more readable by putting in newlines.


A single
newline
has no
effect on the
layout.

But an empty line
starts a new paragraph.
  • Unordered lists are easy to do:
    • start every line with a star
      • more stars means deeper levels
  • A newline
  • in a list

marks the end of the list.

  • Of course
  • you can
  • start again.
* Unordered Lists are easy to do:
** start every line with a star
*** more stars means deeper levels
*A newline
*in a list  
marks the end of the list.
*Of course
*you can
*start again.

  1. Numbered lists are also good
    1. very organized
    2. easy to follow
  2. A newline
  3. in a list

marks the end of the list.

  1. New numbering starts
  2. with 1.
# Numbered lists are also good
## very organized
## easy to follow
#A newline
#in a list  
marks the end of the list.
#New numbering starts
#with 1.
  • You can even do mixed lists
    1. and nest them
      • or break lines
        in lists
* You can even do mixed lists
*# and nest them
*#* or break lines<br>in lists
Definition list
word 
definition of the word
longer phrase
phrase defined
; word : definition of the word
; longer phrase 
: phrase defined
  • One item per line; a newline can appear before the colon, but using a space before the colon improves parsing.
indenting
A colon indents a line or paragraph.

A manual newline starts a new paragraph.

: A colon indents a line or paragraph.
A manual newline starts a new paragraph.

When there is a need for separating a block of text

the blockquote command will indent both margins when needed instead of the left margin only as the colon does.

This is useful for (as the name says) inserting blocks of quoted (and cited) text.

<blockquote>
The '''blockquote''' command will indent 
both margins when needed instead of the 
left margin only as the colon does.  
</blockquote>
Centered text.
  • Please note the US-English spelling of "center".
<center>Centered text.</center>
A horizontal dividing line:

this is above it...


...and this is below it.

If you don't use a section header, you don't get a TOC entry.

A horizontal dividing line: 
this is above it...
----
...and this is below it.

Links, URLs

Internal links

  • Enclose the target name in double square brackets -- "[[" and "]]"
  • First letter of target name is automatically capitalized
  • Spaces are represented as underscores (but don't do underscores yourself)
  • Links to nonexistent pages are shown in red -- Help:Starting a new page tells about creating the page.
  • When the mouse cursor "hovers" over the link, you see a "hover box" containing...
What it looks like What you type
Basic

Sue is reading the official position (or Official positions).

Sue is reading the 
[[official position]]
(or [[Official position]]s).
Interwiki linking

A link to the page on another wiki (e.g. the same subject in another language)

*For more info see [[m:Help:Interwiki linking]].
*[[:fr:Wikipédia:Aide]].
Section of page

If the section doesn't exist, the link goes to the top of the page. If there are multiple sections by the same name, link to specific ones by adding how many times that header has alreay appeared (e.g. if there are 3 sections entitled "Example header," and you wish to link to the third one, then use [[#Example section 3]]. For more info, see Help:Editing FAQ.

*[[List of cities by country#Morocco]].
*[[List of cities by country#Sealand]].

Piped link

Use a pipe "|" to create a link label:

*[[Help:Link|About Links]]
*[[List of cities by country#Morocco|
Cities in Morocco]]
"blank" pipes hide:

After you save, the server automatically fills in the link label.

*In parentheses: [[kingdom (biology)|]]. 
*Namespace: [[Meta:Requests for adminship|]].
Links to nonexistent pages

The weather in London is a page that doesn't exist yet.

  • You can create it by clicking on the link.
  • Have a look at how to start a page guide and the naming conventions page for your project.
[[The weather in London]] is a page
that doesn't exist yet.
Link to yourself

You should "sign" your comments on talk pages:

Your user name: Karl Wick
Or your user name plus date/time: Karl Wick 08:10 Oct 5, 2002 (UTC)

The server will fill in the link after you save.

You should "sign" your comments on talk pages:
: Your user name: ~~~
: Or your user name plus date/time: ~~~~
Redirects

one article title to another with this special link.

#REDIRECT [[United States]]
"Magic" links
ISBN 0123456789X
RFC 123
Media links

To include links to non-image uploads such as sounds, use a "media" link.
Sound


[[media:Sg_mrob.ogg|Sound]]
Links to Categories

To include links to a Category page.
Category:English documentation


[[:Category:English documentation]]
Dates

Use links for dates, so everyone can set their own display order. Use Special:Preferences to change your own date display setting.

[[July 20]], [[1969]] , [[20 July]] [[1969]]
and [[1969]]-[[07-20]]
will all appear as 20 July-1969 if you set your date display preference to 1 January 2001.
Special pages

"What links here" and "Recent changes" can be linked as:
Special:Whatlinkshere/Help:Editing and Special:Recentchangeslinked/Help:Editing

[[Special:Whatlinkshere/
Help:Editing]] and
[[Special:Recentchangeslinked/
Help:Editing]]

External links

Nupedia, [1]
[http://www.nupedia.com Nupedia],
[http://www.nupedia.com]
Or just give the URL: http://www.nupedia.com.
  • In the URL all symbols must be among: A-Z a-z 0-9 ._\/~%- &#?!=()@ \x80-\xFF. If a URL contains a different character it should be converted; for example, ^ has to be written ^ (to be looked up in ASCII). A blank space can also be converted into an underscore.
Or just give the URL:
http://www.nupedia.com.

Images, video, and sounds

See also: Help:Images and other uploaded files

What it looks like What you type
In-line picture
Wikipedia - The Free Encyclopedia
  • For many projects, only images that have been uploaded to the same project or the Commons can be used. To upload images, use the upload page. You can find the uploaded image on the image list
A picture: [[Image:Wiki.png]]

or, with alternative text (strongly encouraged) vbgf

[[Image:Wiki.png|
Wikipedia - The Free Encyclopedia]] 

Web browsers render alternative text when not displaying an image -- for example, when the image isn't loaded, or in a text-only browser, or when spoken aloud. See Alternative text for images for help on choosing alternative text. See Extended image syntax for more options. There is more information on resizing and other formatting tricks.

Other ways of linking to pictures
  • The Image page: Image:Wiki.png
  • A link to just the picture: Wikipedia
  • Clicking on an image displayed on a page (such as any of the ones above) also leads to the description page
  • To include links to images shown as links instead of drawn on the page, use a "media" link.
[[:Image:Wiki.png]]
[[media:Wiki.png|Wikipedia]]
Other Media Links -- Video and Sounds

Use a "media" link: Sound
There is More information on other media types.

[[media:Sg_mrob.ogg|Sound]]

Text formatting -- controlling how it looks

What it looks like What you type

Emphasize (italics), strongly (bold), very strongly (bold italics). (These are double and triple apostrophes, not double quotes.)

''Emphasize'', '''strongly''',
'''''very strongly'''''.

You can also write italic and bold. This is useful in mathematical formulas where you need specific font styles rather than emphasis.

F = ma

(The difference between these two methods is not very important for graphical browsers, so most people ignore it). But it may make a big difference for the visually impaired ;-)

You can also write <i>italic</i> and <b>bold</b>.
This is useful in mathematical formulas where you 
need specific font styles rather than emphasis.
:<b>F</b> = <i>m</i><b>a</b>

You can also write in small caps. If the wiki has the templates, this can Template:bsmbe much simpler to writeTemplate:esm.

You can also write 
<span style="font-variant:small-caps">
in small caps</span>.
If the wiki has the templates, this can 
{{bsm}}be much simpler to write{{esm}}.
A typewriter font, sometimes used for technical terms and
computer code
.
A typewriter font, sometimes used for 
<tt>technical terms</tt> and <code>computer code</code>.
  • For semantic reasons, using
    &lt;code&gt;
    where applicable is preferable to using
    &lt;tt&gt;
    .
You can use small text for captions.
You can use <small>small text</small> 
for captions.
You can strike out deleted material

and underline new material.

You can also mark deleted material and inserted material using logical markup rather than visual markup.

  • When editing regular articles, just make your changes and do not mark them up in any special way.
  • When editing your own previous remarks in talk pages, it is sometimes appropriate to mark up deleted or inserted material.
You can <strike>strike out deleted material</strike>
and <u>underline new material</u>.

You can also mark <del>deleted material</del> and
<ins>inserted material</ins> using logical markup
rather than visual markup.
Subscript: x2

Superscript: x2 or x²

Most browsers have an easier time formatting lines with &sup2; than with <sup>2</sup>

ε0 = 8.85 × 10−12 C² / J m.

1 hectare = 1 E4 m²

Subscript: x<sub>2</sub>
Superscript: x<sup>2</sup> or x&sup2;
&epsilon;<sub>0</sub> =
8.85 &times; 10<sup>&minus;12</sup>
C&sup2; / J m.

1 [[hectare]] = [[1 E4 m&sup2]]

Spacing things out -- spaces and tables

Using non-breaking spaces

x2    ≥    0 true.

<i>x</i><sup>2</sup>&nbsp;
&nbsp;&ge;
&nbsp;&nbsp;0 true.
Using Wikitext piped tables
x2 ≥0 true.
a b

See templates Template:hs1, Template:hs, and Template:vs for more examples

{||-
|<i>x</i><sup>2</sup> 
| width=20px | || width=20px | ≥0 || true.
|-
| a || || b
|}

See Help:Table for more information

Just show what I typed

<nowiki> and <pre> tags can tell the server and the browser to display things as you typed them.

<tr> <td>
leading space
  • interpret special characters
  • interpret special wiki markup
  • don't reformat text
arrow → italicslink </pre> </td> <td valign="bottom">
 arrow      &rarr;

 ''italics''
 [[link]]

</td> </tr>

<tr valign=top> <td>

preformatted text
IF a line of plain text starts with a space
 it will be formatted exactly
   as typed
 in a fixed-width font
 lines won't wrap
ENDIF
this is useful for:
 * pasting preformatted text;
 * algorithm descriptions;
 * program source code
 * ASCII art;
 * chemical structures;

For larger preformatted text passages you can use the <pre>a lot of text</pre> tag.

WARNING If you make it wide, you force the whole page to be wide and hence less readable. Never start ordinary lines with spaces.

(see also below)

</td>

<td>
 IF a line of plain text starts with a space
  it will be formatted exactly
    as typed
  in a fixed-width font
  lines won't wrap
 ENDIF
 this is useful for:
  * pasting preformatted text;
  * algorithm descriptions;
  * program source code
  * ASCII art;
  * chemical structures;

</td> </tr>


<tr> <td>

typewriter font

arrow →

italics link

</td> <td valign="bottom">

<tt>arrow      &rarr;</tt>

<tt>''italics''</tt>
<tt>[[link]]</tt>

</td> </tr>

<tr> <td>

Show special character codes

&rarr; </td> <td valign="bottom">

&amp;rarr;

</td> </tr>

<tr> <td>

Comments

The text between here and here won't be displayed </td> <td>

The text between '''here'''
<!-- comment here -->
'''and here''' won't be displayed

</td> </tr> </table>

Example

arrow →

italics link

arrow      &rarr;

''italics''
[[link]]
<nowiki>
  • interpret special characters
  • don't interpret special wiki markup
  • reformat text (removing newlines and multiple spaces)

arrow → ''italics'' [[link]]

<nowiki>
arrow      &rarr;

''italics''
[[link]]
</nowiki>
<pre>
  • interpret special characters
  • don't interpret special wiki markup
  • don't reformat text
arrow      →

''italics''
[[link]]
<nowiki><pre>arrow      &rarr;

''italics''
[[link]]
</nowiki></pre>