Help:Editing:Intermediate - EcoliWiki
EcoliHub logo

E. coli is indeed the coolest thing on the planet - Carl Zimmer

Help:Editing:Intermediate

From EcoliWiki

Jump to: navigation, search


Contents

Indenting

To indent a block of text, use a colon (:) like this:

:Level 1
::Level 2
:::Level 3

Gives:

Level 1
Level 2
Level 3

This is especially useful on discussion pages, where indentation can indicate replies to a particular comment.

Lists

More on lists at meta

There are different kinds of lists.

Bulleted

Use * to start each line. Different numbers of *s give different levels of nesting.

Markup Gives on the page:
*item
*item
**item
**item
*item
**item
***item
*item
  • item
  • item
    • item
    • item
  • item
    • item
      • item
  • item

Numbered

Use # to start each line. Different numbers of #s give different levels of nesting. Note that this does not give outline numbering, as in the table of contents boxes.

Markup Gives on the page:
#item
#item
##item
##item
#item
##item
###item
#item
  1. item
  2. item
    1. item
    2. item
  3. item
    1. item
      1. item
  4. item

More list examples

Markup Gives on the page:
Indent the whole list
:*Item 1
:*Item 2
:**Item 2.1
:*Item 3
  • Item 1
  • Item 2
    • Item 2.1
  • Item 3
Mix types w/continuation
#Item 1 has an embedded numbered list
##Item 1.1
##Item 1.2
#:and then item 1 continues Lorem ipsum dolor sit amet, consectetur 
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore 
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. 
#Item 2
##Item 2.1 has an embedded bulleted list
##*2.1.1
##*2.1.2
##:before it continues Duis aute irure dolor in reprehenderit 
in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
Excepteur sint occaecat cupidatat non proident, sunt in culpa 
qui officia deserunt mollit anim id est laborum
##Item 2.2
  1. Item 1 has an embedded numbered list
    1. Item 1.1
    2. Item 1.2
    and then item 1 continues Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
  2. Item 2
    1. Item 2.1 has an embedded bulleted list
      • 2.1.1
      • 2.1.2
      before it continues Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
    2. Item 2.2

Some of the more complex list types don't render particularly well, and should probably be avoided.

Getting Started

Images in EcoliWiki are particularly useful for showing gene constructs, structures of gene products, plasmid maps, etc. Uploading images is simple enough. First, you must be logged into EcoliWiki. If you don't have an account, request one by emailing EcoliWiki at ecoliwiki@gmail.com.

Uploading

Once you're logged in, there will be a toolbox on the left-hand side of the page. In it will be an Upload file link. If you can't find it, click Special:Upload here to upload the file.


Once you have clicked Upload file, you'll be taken to a page similar to this:

To upload an image on your computer, click Browse and locate the file of interest. If you want, write a brief summary about the image. Once you've located the file, click the Upload File button.

If all goes well, you'll be taken to a page that shows the image. One error you might get is that a file is larger then the recommended file size. You can try and resize your image on the computer, then re-upload the file.

Using Images

Using images in EcoliWiki is done by doing the following: Let's say you want to link to an image called Fun.JPG. To do this, simply type [[Image:Fun.JPG]] and the image will appear.

Image:Fun.JPG

Clicking on the image will take you to the image page in EcoliWiki.

Let's say though, that you wanted to make the picture smaller and move it to the right of the page. You can do this by adding some wiki code after the file name. For example, | thumb| will make the image a thumbnail. Writing [[Image:Fun.JPG|thumb|right]] will make the picture go to the right of the page, like in the example below:


Now our image is on the right and we can write on the left.


Image inclusion syntax

To generalize the above: there is a syntax for adding images in Mediawiki wikis. To add an image, use:

[[Image:ImageFileName|{type}|{location}|{size}|{caption}]]

{type}, {location}, {size}, and {caption} are all optional. Anything that is not recognizable as {type} {location} or {size} is treated as a caption.

  • type: allowed values are 'thumb', 'thumbnail' or 'frame'. If this is left blank, there is no box around the image, and it doesn't display a caption
  • location: allowed values are 'right', 'left', 'center' or 'none'. Text will wrap around 'left' or 'right' but not around 'center'. Use {{Clr}} to prevent text below from wrapping.
  • size:{width}px width in pixels. Ignored if type is 'frame'.

Examples

In the examples below, the image is placed at the beginning of a block of nonsense text, so you can see how wrapping around the image works.

Simple Image

[[Image:Fun.JPG ]]

Image:Fun.JPGLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Simple Image Resized

[[Image:Fun.JPG |50px]]

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Framed Images with caption

Default alignment: [[Image:Fun.JPG |frame| Sample image figure legend]]

Sample image figure legend
Sample image figure legend
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Centered: [[Image:Fun.JPG|frame|50px|center| Sample image figure legend]]

Sample image figure legend
Sample image figure legend
Note that size is ignored when frame is set. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Thumbnails

[[Image:Fun.JPG|thumb|50px|left|Sample image figure legend]]

The EcoliWiki logo
The EcoliWiki logo
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

See also

More about Images at meta and at Wikipedia. Embedded images on EcoliWiki must be uploaded, and then linked. To upload, go to Upload file from the toolbox. The most recently uploaded images and files are listed in Special:Newimages.

Basic usage

TableEdit provides a more user-friendly way to create and edit tables in mediawiki than using the standard wiki mark-up. TableEdit tables show up in a page with their own Edit link. Registered users can then add rows and columns, add information, and/or edit information already in the table.

Create a new table

Step 1: Add a newTableEdit tag where you want the table to appear.

To add a new table that can be edited by TableEdit, there are two options:

  • Add an empty table by putting <newTableEdit/> in the text where you want the table to appear.
  • Add a table with defined headings by entering the following:
<newTableEdit>
Heading 1
Heading 2
Heading 3
etc...
</newTableEdit>
You can edit the columns later if needed.

Step 2: Save the page.

If you used option 2, an empty table with your headings appears when you save the page. Note that the default table has the column headings arrayed horizontally from left to right. You can change the orientation when you edit the table.

If you used option 1, there will a Create table here link. You can create the headings when you edit the table.

Step 3: Edit the table Click on the link and use the table editor to add information.

Example

1. Create a table with the headings enclosed in newTableEdit tags.
<newTableEdit>
US State
Capitol
Governor
</newTableEdit>



2. Click on the edit table link to go to the Table Editor.



3. Add a row.



I don't know who the governor is, let's leave that for someone else to add.
4. Save in the edit page.



5. Let's add a column and make the heading background light blue.



6. Save back to the editor.



7. Save back to the wiki page.



Basic Table templates

For table formats that you plan to use on more than one page, you can define a template. To add a table based on a template, put: <newTableEdit>Template:TemplateName</newTableEdit>. The template should be a Template page in the wiki that has a list of the table headings. When a table is made using a template, the headings can only be edited on the template page. Changing the template page will change the headings on all tables that use that template. Note that the changes won't be apparent until someone tries to edit the table and save it back to the page.

Advanced Table templates

Using tags to specify more table properties

Attributes for the table can be wrapped in XML-like tags.

  • Use <type>1</type> to create a vertical table, i.e. the headings are arrayed from top to bottom in the first column. The default is a horizontal orientation where the headings are arrayed from left to right in the first row.
  • Use <headings></headings> for headings. Headings can have additional attributes, which can be used to customize the user interface and link content of rows to external sources (see below).
  • Use <heading_style></heading_style> for heading style
  • Use <table_style></table_style> for table style

Programming the TableEdit interface

Heading lists can have additional markup to modify the behavior of the Table Editor. Anything after a || in the headings list is considered part of a list of additional parameters for that heading. Individual parameters are delimited by single |s. The first parameter after the heading text is a unique column_name for the heading (this allows you to use non-unique names for the actual display). If this is not present, the heading name is assumed to be usable as the column_name. These are used for lookup and calculation fields as described below

About

We use templates to control the layout of our pages.

Creating a template

Template names are prefixed with Template:, you create them like any other wiki page.

Using a template

Templates are wiki pages which can be used in other pages in three ways:

  • {{Name}} includes the content of the template at the moment the page containing it is fetched "[[Template:Name]]".
  • {{subst:Name}} inserts the content of the template into the code of the page in a form that is editable normally "[[Template:Name]]" after you have saved your text.
  • {{msgnw:Name}} when the page containing it is fetched, includes the template in a form that displays it as raw wiki syntax, like <nowiki> does

Control template inclusion

You can control template inclusion by the use of <noinclude> and <includeonly> tags.

Anything between <noinclude> and </noinclude> will be processed and displayed only when the page is being viewed directly, not included.

Possible applications are:

  • Categorising templates
  • Interlanguage links to similar templates in other languages
  • Explanatory text about how to use the template

The converse is <includeonly>. Text between <includeonly> and </includeonly> will be processed and displayed only when the page is being included. The obvious application is to add all pages containing a given template to a category.

Note that the usual update problems apply -- if you change the categories inside a template, the categories of the referring pages won't be updated until those pages are edited.

Templates

Including content from one page into another.

More Info

  • Basic Editing tutorial - Just enough to get started: Entering Edit mode for existing pages, creating new pages, adding Links, basic formatting (italic,bold,bold-italic), Subheadings, Categories
  • Intermediate Editing tutorial (all on one page) - For users who want more control over appearance: Indenting, Lists, Image and table basics. Basic templates, Including content from one page into another. Individual tutorials:
Personal tools