FND-Wiki editing

From "A B C"
Revision as of 09:07, 12 August 2017 by Boris (talk | contribs) (Created page with "<div id="BIO"> <div class="b1"> Wiki editing </div> {{Vspace}} <div class="keywords"> <b>Keywords:</b>  Wiki editing, namespaces, user page setup, a course journal ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Wiki editing


 

Keywords:  Wiki editing, namespaces, user page setup, a course journal stub page, and an insights! stub page


 



 


Caution!

This unit is under development. There is some contents here but it is incomplete and/or may change significantly: links may lead to nowhere, the contents is likely going to be rearranged, and objectives, deliverables etc. may be incomplete or missing. Do not work with this material until it is updated to "live" status.


 


Abstract

...


 


This unit ...

Prerequisites

This unit has no prerequisites.


 


Objectives

...


 


Outcomes

...


 


Deliverables

  • Time management: Before you begin, estimate how long it will take you to complete this unit. Then, record in your course journal: the number of hours you estimated, the number of hours you worked on the unit, and the amount of time that passed between start and completion of this unit.
  • Journal: Document your progress in your course journal.
  • Insights: If you find something particularly noteworthy about this unit, make a note in your insights! page.


 


Evaluation

Evaluation: NA

This unit is not evaluated for course marks.


 


Contents

For more extensive formatting help see: http://meta.wikimedia.org/wiki/Help:Editing
For Math markup see: http://meta.wikimedia.org/wiki/Help:Formula


 

The Wiki concept

Wiki sites are collections of Web pages that allow you to view, edit and create pages from your browser, there is no need for special technology and basic editing is simple and intuitive with "Wikitext markup".

The basic workflow of Wikis is straightforward:

  • Register an account and browse the site.
  • Whenever you find something that you can improve, edit it.
  • Whenever you find something that you would like to comment on, click on the "discussion" tab and share your views.
  • If you are interested in what becomes of your edits or the discussion, click on the "watch" tab, and the page will be added to a list of bookmarks to pages you are "watching". (You can even generate an RSS feed for recent changes or new pages).

No e-mail, no obligations. Do what you like, when you like, what you can.

Editing on the Course Wiki is only enabled for instructors. However you can freely edit all pages on the Student Wiki, once you have an account.


 


 

Editing basics

Start editing
To start editing a Wiki page, click on the "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.


Preview before saving
When you have finished, press Show preview to see how your changes will look. Repeat the edit/preview process until you are satisfied, then click Save and your changes will be immediately applied to the article and accessible on the Web. They will also be stored in the main database for as long as the Wiki exists. Thus it is always possible to get back earlier versions of pages - back to the very first edit.


Basic text formatting

Here are some examples of the markup of Wikitext. It is not the same as HTML markup, however some HTML markup will work. In particular, the Wiki applies styles through CSS technology (Cascading Style Sheets) and thus HTML tags can be used to apply consistent styles to individual page elements. Javascript won't work.

What it looks like What you type

You can emphasize text by putting two apostrophes on each side. Three apostrophes will emphasize it strongly. Five apostrophes is even stronger.

You can ''emphasize text'' by putting two
apostrophes on each side. Three apostrophes
will emphasize it '''strongly'''. Five
apostrophes is '''''even stronger'''''.

A single newline has no effect on the layout.

But an empty line starts a new paragraph.

A single newline
has no effect
on the layout.

But an empty line
starts a new paragraph.

You can break lines
without starting a new paragraph.

You can break lines<br>
without starting a new paragraph.<br>

You can format text in a monospace font with a dashed box around it either by marking it with the HTML <pre> tag, or by putting a blank space at the beginning of a line.

Example.

(This may not be very useful beyond the types of examples we show here, but it is a frequent source of confusion, when you find your text marked up this way by accident)

You can format text in a monospace
font with a dashed box around it
either by marking it with the HTML
<pre> tag, or by putting a blank
space at the beginning of a line.

 Example.

(This may not be very useful beyond the
types of examples we show here, but
it is a frequent source of confusion, when
you find your text marked up this way by
accident)

Other special characters at the beginning of a line include:

  • bulleted list
  1. numbered list
term
and definition
Other special characters at the beginning
of a line include:

* bulleted list

# numbered list

; term
: and definition

You should "sign" your comments on discussion pages:

Three tildes gives your user name - Boris (talk)
Four tildes: user name plus date/time - Boris (talk) 22:18, 27 December 2012 (EST)
Five tildes: date/time alone - 22:18, 27 December 2012 (EST)
You should "sign" your comments on discusion pages:
: Three tildes gives your user name - ~~~
: Four tildes: user name plus date/time - ~~~~
: Five tildes: date/time alone - ~~~~~

You can use normal HTML character codes for special characters such as > < & ° Å Ä ü →
... but modern browsers will handle Unicode well enough: > < & ° Å → 烦死了! (¬A)⊕A

You can use normal HTML character codes for special characters such as &gt; &lt; &amp; &deg; &Aring; &Auml; &uuml; &rarr;
... but modern browsers will handle Unicode well enough: > < & ° Å → 烦死了! (¬A)⊕A

You can use HTML tags, too, if you want. Some useful ways to use HTML:

Put text in a typewriter font. The same font is generally used for computer code.

Strike out or underline text, write in small caps, highlight, or color for emphasis.

Superscripts and subscripts: x2, x2

Invisible comments that only appear while editing the page.

You can use <b>HTML tags</b>, too, if you
want. Some useful ways to use HTML:

Put text in a <tt>typewriter font</tt>.
The same font is generally used for
<code>computer code</code>.

<strike>Strike out</strike> or <u>underline</u> text, write 
<span style="font-variant:small-caps"> in small caps</span>, 
<span style="background-color: #FFFFAA;">highlight</span>, or
<span style="color: #DD0000;"> color</span> for emphasis.

Superscripts and subscripts:
x<sup>2</sup>, x<sub>2</sub>

Invisible comments that only appear
while editing the page.
<!-- Note to editors: Be kind! -->

For a list of HTML tags that are allowed, see HTML in wikitext. I tend to use Wiki-markup when I'm in a hurry, but use the HTML tag whenever I can't remember a Wiki-tag. It really doesn't make a difference.

However: I never use Wiki-table markup. I find it less intuitive than HTML markup, more difficult to debug, and there's really no point in remembering both types of markup given that one really needs to be comfortable with HTML tables anyway.


 

Links

You will often want to make clickable links to other pages.

What it looks like What you type

Here's a link to a page named Sandbox. You can even say Sandboxes and the link will show up right.

You can put formatting around a link. Example: Sandbox.

Here's a link to a page named [[Sandbox]].
You can even say [[Sandbox]]es
and the link will show up right.

You can put formatting around a link.
Example: ''[[Sandbox]]''.

You can link to an arbitrary piece of text with a piped link. Put the link target first, then the pipe character "|", then the link text - as in this example.

You can link an arbitrary piece of text
with a ''piped link''. Put the link
target first, then the pipe character "|", then
the link text - as in [[Sandbox| this example]].

You can make an external link to a Web page just by typing an URL, e.g. http://igem.org

Or you can link arbitrary text: iGEM. (Note: No "|" for external links, URL and text are separated by a blank, and only single square brackets!)

Or you can generate a footnote-like link: [1].

You can make an external link to a Web page
just by typing an URL, e.g. http://igem.org

Or you can link arbitrary text:
[http://igem.org iGEM]. 
(Note: No "|" for '''external''' links,
URL and text are separated by a blank,
and only single square brackets!)

Or you can generate a footnote-like link:
[http://igem.org]. 


Note: remember:

  • internal links (using [[...]] tags to link to pages on this Wiki) are separated from linked text with a pipe character: [[URL|text]].
  • External links (using [...] tags to link to pages elsewhere on the Internet) are separated from linked text with a space character: [URL text].


 

Special syntax

Two special syntax items need to be mentioned: "templates" and "magic words":

Templates
Templates are pieces of Wikitext that are substituted where a code that links to them has been placed into a page. For example, if you enter {{Lorem}} on a page, the "Lorem ipsum dolor sit amet ..." placeholder text is inserted in place of that code. Wikis make extensive use of templates.
Magic words
some reserved "magic"-words are replaced with dynamically created contents when the page is rendered. For example __TOC__ forces placing a Table Of Contents at the position of this token rather than its default position, while __NOTOC__ suppresses creation of a Table Of Contents on a page.


 

Creating a new page

To create a new page simply insert a link to a Wiki page, which has a page name that does not exist yet. The link will appear in red (except if you inadvertently used the name of a page that already exists), and the new page will be created when you click on the link. Page names can be long and contain blank spaces. Internally, all blank spaces are converted to underscore characters, but you can use the page name without underscores in links; the Wiki software translates this for you.


 

Namespaces

The Wiki maintains some pages in special collections, in so called "namespaces". This is useful, because the behaviour of the software can be customized for different namespaces: for example you may be allowed to edit in the main- and the user- namespace, but not in the MediaWiki: namespace, where pages are held that affect the gears and wires of the Wiki. Page names without a prefix live in the main space. Some commonly used prefixes are:

  • User: - personal pages for user with an account on the Wiki;
  • Talk: - discussion pages for comments on pages, accessible via the "Discussion" tab;
  • Help: - this page for example;
  • Template: - pages with reusable text.
  • Special: - pages that implement special functionality (like login, user lists, or lists of recently changed pages);
  • Category: - an index of pages that have been given a common tag. This is a convenient way to access pages that are in some way related;


 

Categories

Once your page has been edited, you can associate it with one or more categories. For example, add the appropriate category tag by typing [[Category:BCH441_2020]]. The page is then automatically linked from a page that collects all pages with that category tag. I would prefer that you do not create new categories; ask me if you feel a need for it.


 

Creating a new section or subsection on a page

To create a section or subsection, simply insert a section header into an existing section. Header levels are defined by the number of "=" characters before and after the header text. Click on an edit link of this page to see example code. Once a page has more than two headings, the Wiki automatically creates a table of contents. You can adjust the position of the table of contents by typing the "magic word" __TOC__somewhere on your page (Note: double underscore), you can also suppress having a table of contents created with__NOTOC__.


 

Edit conflicts

If someone else makes an edit while you are making yours, the result is an edit conflict. Many conflicts can be automatically resolved by the Wiki. If it can't be resolved, however, you will need to resolve it yourself. The Wiki gives you two text boxes, where the top one is the other person's edit and the bottom one is your edit. Merge your edits into the top edit box, which is the only one that will be saved.


 

Reverting pages to a previous state

Sometimes a page needs to be reverted to a previous state. Access the page through a link to the Recent Changes special page: Special:Recentchanges. Find the page you need to revert, click on the hist link, click on the version you need and verify that it is the correct one. Then click on the edit tab at the top and Save page. A new version of the page is then created with the old text. Note that this does not actually overwrite anything - all edits are archived in the database.


 

Special markup on this Wiki

Here are some special templates and extensions installed on this Wiki:


Vertical space

The template code {{Vspace}} will insert a two-line high space to help structuring text.


References and footnotes

Enclosing text in <ref> ... <\ref> tags will create a footnote reference and display the text wherever you place a <references /> tag on the page.[1] The reference will display as hover-text, so you can keep your references organized in one section of the page, but your in-text citations will show you the contents.

Syntax highlight

The GeSHI syntax highlighter extension is installed on this Wiki but it was recently broken by the MediaWiki developers.

Type: <source lang="R"> for (i in 1:5) { print(i^2) } # 1 4 9 16 25 </source>

... to get:

for (i in 1:5) {
    print(i^2)
} # 1  4  9  16  25

Note: no highlighting, and the page is flagged as having syntax highlighting errors.

Pubmed Articles and abstracts

{{#pmid:15289071}}

This inserts the article information in a <div>, formatted by Template:Pubmed.
Steipe (2004) Consensus-based engineering of protein stability: from intrabodies to thermostable enzymes. Meth Enzymol 388:176-86. (pmid: 15289071)

PubMed ] [ DOI ]


{{#pmid: 15289071 |Steipe2004}}

This formats the pubmed parser output for the Cite extension; A footnote mark will be inserted here[2] and the actual reference will appear beneath the <references /> section of the page. This too will be shown as hover-text.

Math markup

<math>H = - \sum_{i=0}^n p_i \log_{2} p_i</math>


Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle H = - \sum_{i=0}^n p_i \log_{2} p_i}

see: http://meta.wikimedia.org/wiki/Help:Formula


ToDo items

Type:

<div class="ToDo">
ToDo:
* This ...
* and that.
</div>

... to get:

ToDo:

  • This ...
  • and that.


Notes

Type:

<div class="note">
Note: take special care to ...

</div>

... to get:

Note: take special care to ...


Linking text to Wikipedia

... using the {{WP|...}} template.

If the linked text is the same as the Wikipedia page titke, simply type it:
{{WP|Mutual information}}
Mutual information


 

If the linked text is different, use the "|" pipe character to separate page-name and text:

{{WP|Mutual information|'''WP article on Mutual Information'''}}
WP article on Mutual Information


 

Collapsible elements

See: Manual: Collapsible elements

<div class="mw-collapsible mw-collapsed" data-expandtext="Expand" data-collapsetext="Collapse" style="width:50%; ">
Visible text  ...
<div class="mw-collapsible-content" style="padding:10px;">
* Collapsed text 1
* Collapsed text 2
* Collapsed text 3
</div>
</div>


Example:

The Road Not Taken    Robert Frost

Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
 
Then took the other, as just as fair,
And having perhaps the better claim
Because it was grassy and wanted wear,
Though as for that the passing there
Had worn them really about the same,
 
And both that morning equally lay
In leaves no step had trodden black.
Oh, I marked the first for another day!
Yet knowing how way leads on to way
I doubted if I should ever come back.
 
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference.


Sample reference section

  1. This is what the link looks like - and as you can see if you hover over it, the reference gets displayed as hover-text.
  2. Steipe (2004) Consensus-based engineering of protein stability: from intrabodies to thermostable enzymes. Meth Enzymol 388:176-86. (pmid: 15289071)

    PubMed ] [ DOI ]



 


Self-evaluation

 



 


Further reading, links and resources

 


Notes


 


About ...
 
Author:

Boris Steipe <boris.steipe@utoronto.ca>

Created:

2017-08-05

Modified:

2017-08-12

Version:

0.2

Version history:

  • 0.1 First contents imported from Help:editing
  • 0.1 First stub


 

If in doubt, ask! If anything about this learning unit is not clear to you, do not proceed blindly but ask for clarification. Post your question on the course mailing list: others are likely to have similar problems. Or send an email to your instructor.



 


CreativeCommonsBy.png This copyrighted work is licensed under a Creative Commons Attribution 4.0 International License.