Help:Editing

From LIBISIS
Jump to navigation Jump to search

The pages on a wiki can be edited easily even by those with no experience of web design (i.e., it is not necessary to know any HTML in advance). Editing a page consists of typing in the text along with a few simple formatting instructions. For example,

  • Typing * at the start of each line creates a bulleted list (like this one).
  • Surrounding text by two "=" characters, e.g., ==Formatting a Page==, creates a level-1 header (like the header of this section).

Here is a brief description of the more commonly-used formatting instructions. You can find more comprehensive help in the MediaWiki User's Guide.

Headings

Section headings are created by surrounding the heading text with two or more equal signs.

  • ==Level 1 Heading==
  • ===Level 2 Heading===
  • ====Level 3 Heading====

When you have three or more 'Level 1' headings, a table of contents is automatically produced before the first section. In this section, Formatting a Page is the Level 1 heading and Headings is a Level 2 heading.

Paragraphs

The wiki ignores single newlines in the text. To create a new paragraph, type in two carriage returns in succession (i.e., make sure that there is a blank line between paragraphs). Note however that single newlines are important when formatting lists (see below). Please note a couple of things:

  • Although single newlines are ignored, you should make sure that there are no spaces at the beginning of each line. Lines starting with a space are treated as preformatted text (equivalent to using the <pre> tag).
  • You can add line breaks without creating a new paragraph by using the standard HTML <br> tag.

Lists

Bulleted lists are created by putting a '*' at the beginning of the line (i.e., there must be no blank characters before it). An extra '*' creates a list within a list. A newline will end the list (so you cannot have any newlines within any list item).

What you type What you get
* List item 1
* List item 2
** Sublist item 1
** Sublist item 2
* List item 3
  • List item 1
  • List item 2
    • Sublist item 1
    • Sublist item 2
  • List item 3

Similarly, numbered lists are created by putting a '#' at the beginning of the line.

What you type What you get
# List item 1
# List item 2
#* Sublist item 1
#* Sublist item 2
# List item 3
  1. List item 1
  2. List item 2
    • Sublist item 1
    • Sublist item 2
  3. List item 3

A third type of list is called a definition list.

What you type What you get
;Term 1: Definition of term 1
;Term 2: Definition of term 2
Term 1
Definition of term 1
Term 2
Definition of term 2

This is very useful if you want to have a subheader followed by indented text, but you don't want to create a new section.

Incidentally, notice that you can indent any new paragraph by putting a colon at the beginning of the line.

Internal Links

If you want to link to another wiki page, just put the title of the page within two square brackets, e.g., [[New Topic]].

  • If you want the link to use different text, add a vertical bar after the page title and follow it with the replacement text.
What you type What you get
* [[New Topic]]
* [[New Topic|Same link, different text]]

External links

External links, i.e., to pages outside the wiki, including the rest of the NeXus web site, can be displayed in a couple of ways. If the text is a valid URL, it will automatically be formatted as a hyperlink or you can enclose the URL in single square brackets. If the brackets only contain the URL, the hyperlink will be displayed as a reference, but if you add some text after a space, the text is formatted as the hyperlink.

What you type What you get
* http://www.nexusformat.org/
* [http://www.nexusformat.org/]
* [http://www.nexusformat.org/ NeXus Home Page]

Centering Text

Text can be centered by using the standard HTML <center> tag.

What you type What you get
This text is not centered.

<center>This text is.</center>

This text is not centered.

This text is.

Preformatting Text

You can use the HTML <pre> tag, to preserve precise line breaks, etc. This is also used to display XML files; otherwise, the XML tags would be treated as unknown HTML tags and not be printed.

  • Preformatted text is also automatically displayed within a shaded box in monospace font, as if it were code.
What you type What you get
This text 
is not preformatted.
<pre>
This text 
is.
</pre>

This text is not preformatted.

This text 
is.

Formatting Characters

Put two or more (single) apostrophe characters around text to add progressively greater emphasis. Standard HTML markup can be used for other formatting and special characters (see the MediaWiki User's Guide for a complete list). If you need to produce a complex equation, you can use TeX within <math> tags (the NeXus web server needs some configuration to get this to work properly).

What you type What you get
* This text is ''emphasized''.
* This is '''emphasized even more'''.
* This is '''''emphasized the most'''''.
  • This text is emphasized.
  • This is emphasized even more.
  • This is emphasized the most.
* <tt>Typewriter font</tt>
  • Typewriter font
* <small>Small text</small>
  • Small text
* x<sup>2</sup> and H<sub>2</sub>O
  • x2 and H2O
* &alpha;, &beta;, &gamma;
  • α, β, γ
<math>\sum_{n=0}^\infty \frac{x^n}{n!}</math>

<math>\sum_{n=0}^\infty \frac{x^n}{n!}</math>

Images

To upload images, use the upload page. You can find previous uploads on the image list. Clicking on an uploaded image displays a description page, which you can also link directly to, e.g. Image:NeXus.png. The syntax is like an internal link, with alternate text following a '|'. However, this alternate text is only displayed by browsers if the image can't be located. If you add an additional '|', you can specify the image positioning ('left', 'right', 'center'). Use a 'media' link if you want to link to an image but not display it at all.

What you type What you get
A picture: [[Image:NeXus_narrow.png|NeXus]]

A picture: NeXus

On the right: [[Image:NeXus_narrow.png|NeXus|right]]
On the right:
Or left: [[Image:NeXus_narrow.png|NeXus|left]]
Or left:
[[media:NeXus.png|NeXus banner]]

NeXus banner

Tables

Tables can be entered using standard HTML tags. However, a simpler pipe syntax requires less typing. Here is a simplified description of that syntax.

  • Start the table with "{|" at the start of a new line optionally followed by HTML attributes.
  • Start a new row with "|-" at the start of a new line.
  • Start a new cell with "|" or "||" at the start of a new line, or "||" between cells in the same row.
  • If you need to modify the cell formatting, put the HTML attributes between the two vertical bars.
  • If the cell is a header cell, replace the first (or only) vertical bar with "!".
  • End the table with the line "|}".
What you type What you get
{| align="center" border="1"
|-
! &nbsp; || Col 1 || Col 2
|-
! Row 1
| align="center" | a<sub>11</sub> 
| align="center" | a<sub>12</sub>
|-
! Row 2 
| align="center" | a<sub>21</sub> 
| align="center" | a<sub>22</sub>
|}
  Col 1 Col 2
Row 1 a11 a12
Row 2 a21 a22

In the NeXus wiki, we have defined a couple of templates, {{Tablestyle}} and {{Headcellstyle}}, for producing the default table formatting.

What you type What you get
{| {{Tablestyle}}
|-
! {{Headcellstyle}} | &nbsp;
! {{Headcellstyle}} | Col 1 
! {{Headcellstyle}} | Col 2
|-
! {{Headcellstyle}} | Row 1
| align="center" | a<sub>11</sub> 
| align="center" | a<sub>12</sub>
|-
! {{Headcellstyle}} | Row 2 
| align="center" | a<sub>21</sub> 
| align="center" | a<sub>22</sub>
|}
  Col 1 Col 2
Row 1 a11 a12
Row 2 a21 a22

References