Difference between revisions of "Henrik help"

From Teknologisk videncenter
Jump to: navigation, search
(New page: == Transclusion == To include the contents of one document in another document <nowiki> {{:Forside}} </nowiki> The : means its in the '''main namespace'''. or <nowiki> {{User:Heth}} </nowi...)
 
m (Numbered Formula)
 
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
To include the contents of one document in another document <nowiki> {{:Forside}} </nowiki>
 
To include the contents of one document in another document <nowiki> {{:Forside}} </nowiki>
 
The : means its in the '''main namespace'''. or <nowiki> {{User:Heth}} </nowiki>
 
The : means its in the '''main namespace'''. or <nowiki> {{User:Heth}} </nowiki>
 +
== educypedia ==
 +
http://www.educypedia.be/
 +
<div style="align:left; margin:5px;">__TOC__</div>
 +
 +
== Numbered Formula ==
 +
 +
<div align="center">
 +
{|width="100%" border="1" rules="all" cellpadding="10" cellspacing="0" style=" style="border:solid 1px gray"; margin: 1em; background: white; border-collapse: collapse;"
 +
|<math>P = U \cdot I = {U^2 \over R} = R \cdot I^2</math>
 +
| width="30%" valign="bottom" style="text-align:right;" |(1)
 +
|}
 +
</div>
 +
<br/>
 +
<math>
 +
f(q) = \sqrt{(1+p+\frac{p^3}{2!})} * (1+q+\frac{q^2}{2!})
 +
</math>
 +
:<math>G = 1 - 2\,\int_0^1 L(X) dX. </math>
 +
 +
==Horizontal Menu Bar==
 +
 +
{|width=720px rules=all border="solid 2px white" cellpadding=5 cellspacing="5" style="text-align:center;"
 +
|-style=" padding:5px; background:blue; border-color: white; border-style: solid; border-width: 2px; font-style:bold; color:white"
 +
|Home
 +
|About Me
 +
|WikiEducator
 +
|WE Projects
 +
|Expertise
 +
|My interests
 +
|Contact
 +
|}
 +
 +
==Table style matching pedagogical templates==
 +
 +
{| width=300px rules=all cellpadding=5 cellspacing="0" border=1px; style="text-align:right; border-color:#AAAAAA; border-style:solid;"
 +
|+style="height:20pt; text-align:left;"|'''Title of Table'''
 +
|- style="background:#F6F9ED; text-align:center;"
 +
!style="text-align:left;"|Text Data
 +
! Numeric Data<br/><nowiki># ###.##</nowiki>
 +
! Percentual Data<br/>%
 +
|-
 +
|style="text-align:left;"|Text 1
 +
|282.75
 +
|37.8%
 +
|-
 +
|style="text-align:left;"|Text 2
 +
|465.25
 +
|62.2%
 +
|-
 +
|style="text-align:left;"|'''Total'''
 +
|748.00
 +
|100.0%
 +
|}
 +
<br/><br/>
 +
 +
==Horizontal justifying content in cells==
 +
 +
{|width="100%" align="center" cellpadding="3" cellspacing="5"  style="border:solid 1px red"
 +
|-
 +
|style="border:solid 1px green; text-align:left"|This text is left aligned
 +
|style="border:solid 1px green; text-align:center"|This text is centered
 +
|style="border:solid 1px green; text-align:right"|This text is right aligned
 +
|style="border:solid 1px green; text-align:justify"|This text is justified
 +
|}
 +
 +
<br/><br/>
 +
==More complex Table==
 +
 +
<blockquote>
 +
<table width=”100% align=”right” border="0" cellspacing="0" cellpadding="0">
 +
<tr>
 +
<td>
 +
<table width="100%" align="left" bgcolor="#000000" border="0" cellspacing="1" cellpadding="2">
 +
  <tr >
 +
    <td width="50%" valign="top" bgcolor="#E2E2E2" style="border:medium; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>INSTRUCTIONAL EVENT</strong></td>
 +
    <td width="50%" valign="top" bgcolor="#EEEEEE" style="border:medium">'''Relation to Learning Process'''</td>
 +
  </tr>
 +
  <tr>
 +
    <td valign="top" bgcolor="#E2E2E2" style="border:medium; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>Gaining attention</strong></td>
 +
    <td valign="top" bgcolor="#EEEEEE" style="border:medium">''Reception'' of patterns of neural impulses</td>
 +
  </tr>
 +
  <tr>
 +
    <td valign="top" bgcolor="#E2E2E2" style="border:medium; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>Informing the learner of the objective</strong></td>
 +
    <td valign="top" bgcolor="#EEEEEE" style="border:medium">Activiating a process of ''executive control''</td>
 +
  </tr>
 +
    </table>
 +
</td>
 +
</tr>
 +
</table>
 +
</blockquote>
 +
 +
==Collapsible Tables==
 +
 +
'''Collapsible tables''' provide a way to collapse and uncollapse a table when a show/hide button is clicked.  The code for this feature is found in the [[MediaWiki:Common.js]].
 +
 +
The initial state of any collapsible content can be controlled using a "collapsible table", because it also allows a table with only one element with content, and a header.
 +
 +
===Simple example===
 +
Tables are simpler to work with, as you merely need to add the '''<tt>collapsible</tt>''' class to the table itself. For the [hide]/[show] link to appear, the table's first row must be a header row, that is, one of the cells in the first row must be declared with an exclamation mark (in wikisyntax). The use of the class <tt>wikitable</tt> in the example below is merely for appearance; it is not needed for <tt>collapsible</tt> to function.
 +
 +
{| class=wikitable style="width:80%;" align=center
 +
!Code entered!!Output produced
 +
|-
 +
|width=50%|&#32;
 +
<nowiki>{| class="wikitable </nowiki>'''collapsible'''"
 +
'''!'''<nowiki> Simple collapsible table
 +
|-
 +
| Lorem ipsum dolor sit amet
 +
|}</nowiki>
 +
|style="width:50%; text-align:center;"|
 +
{| class="wikitable collapsible"
 +
! Simple collapsible table
 +
|-
 +
| Lorem ipsum dolor sit amet
 +
|}
 +
|}
 +
 +
Using the syntax above, collapsible tables are often used to always display an introduction to, or summary of, a lengthy discussion or section of content, while hiding the majority of that content from immediate view.  The summary message is put in the header cell, and the content is placed into the body cell.  The content is then easily accessible by clicking the 'show' button.  The collapsible functionality is also available in larger and more complicated tables, as long as there is a header cell in the first row of the table.
 +
 +
{| class=wikitable style="width:80%;" align=center
 +
!Code entered!!Output produced
 +
|-
 +
|style="width:50%; font-size:90%"|&#32;
 +
<nowiki>{| class="wikitable </nowiki>'''collapsible'''<nowiki>"
 +
|A normal cell in the header row
 +
</nowiki>'''!'''<nowiki> colspan="2"| Header cell spans two cols
 +
|-
 +
| colspan="2" | Lorem ipsum dolor sit amet
 +
| Separate body cell
 +
|}</nowiki>
 +
|style="width:50%; text-align:center;"|
 +
{| class="wikitable collapsible"
 +
|width=33%|A normal cell in the header row
 +
! colspan="2"| Header cell spans two cols
 +
|-
 +
| colspan="2" | Lorem ipsum dolor sit amet
 +
|width=33%| Separate body cell
 +
|}
 +
|}
 +
 +
==Collapsing tables by default==
 +
 +
Just using the <tt>'''collapsible'''</tt> class produces a table which is expanded by default, but can be collapsed by the reader.  It is also possible to create tables which are ''collapsed'' by default, and can be optionally ''expanded''.  There are several methods for doing this, depending on the situations in which you want the table to collapse.
 +
 +
==='collapsed'===
 +
 +
Adding the <tt>'''collapsed'''</tt> class will cause the table to ''always'' be initially collapsed, no matter what happens around it.  It is the simplest method for doing so.  Using the examples above:
 +
 +
{| class=wikitable style="width:80%;" align=center
 +
!Code entered!!Output produced
 +
|-
 +
|width=50%|&#32;
 +
<nowiki>{| class="wikitable </nowiki>'''collapsible collapsed'''"
 +
'''!'''<nowiki> Simple collapsible table
 +
|-
 +
| Lorem ipsum dolor sit amet
 +
|}</nowiki>
 +
|style="width:50%; text-align:center;"|
 +
{| class="wikitable collapsible collapsed"
 +
! Simple collapsible table
 +
|-
 +
| Lorem ipsum dolor sit amet
 +
|}
 +
|-
 +
|style="width:50%; font-size:90%"|&#32;
 +
<nowiki>{| class="wikitable </nowiki>'''collapsible collapsed'''<nowiki>"
 +
|A normal cell in the header row
 +
</nowiki>'''!'''<nowiki> colspan="2"| Header cell spans two cols
 +
|-
 +
| colspan="2" | Lorem ipsum dolor sit amet
 +
| Separate body cell
 +
|}</nowiki>
 +
|style="width:50%; text-align:center;"|
 +
{| class="wikitable collapsible collapsed"
 +
|width=33%|A normal cell in the header row
 +
! colspan="2"| Header cell spans two cols
 +
|-
 +
| colspan="2" | Lorem ipsum dolor sit amet
 +
|width=33%| Separate body cell
 +
|}
 +
|}
 +
 +
==='autocollapse'===
 +
 +
Adding the <tt>'''autocollapse'''</tt> class causes the table to collapse when there are more than a threshold number of collapsible tables on the page. On en.wiki, this threshold is set at 2. The example below, therefore, collapses because there are numerous collapsible tables on the page.
 +
 +
{| class=wikitable style="width:80%;" align=center
 +
!Code entered!!Output produced
 +
|-
 +
|width=50%|&#32;
 +
<nowiki>{| class="wikitable </nowiki>'''collapsible autocollapse'''"
 +
'''!'''<nowiki> Simple collapsible table
 +
|-
 +
| Lorem ipsum dolor sit amet
 +
|}</nowiki>
 +
|style="width:50%; text-align:center;"|
 +
{| class="wikitable collapsible autocollapse"
 +
! Simple collapsible table
 +
|-
 +
| Lorem ipsum dolor sit amet
 +
|}
 +
|}
 +
 +
==='innercollapse' and 'outercollapse'===
 +
Using this pair of classes, it is possible to make a table collapsed by default only when it is ''contained within'' a particular object, such as another table. 
 +
 +
{| class=wikitable style="width:80%;" align=center
 +
!Code entered!!Output produced
 +
|-
 +
|width=50%|&#32;
 +
<nowiki>{| class="wikitable </nowiki>'''outercollapse'''<nowiki>"
 +
! This table does not collapse
 +
|-
 +
| But the table inside this cell
 +
 +
{| class="wikitable </nowiki>'''collapsible innercollapse'''<nowiki>"
 +
! Does collapse
 +
|-
 +
| Hiding this part
 +
|}
 +
 +
|}</nowiki>
 +
|style="width:50%; text-align:center;"|
 +
{| class="wikitable outercollapse"
 +
! This table does not collapse
 +
|-
 +
| But the table inside this cell
 +
{| class="wikitable collapsible innercollapse"
 +
! Does collapse
 +
|-
 +
| Hiding this part
 +
|}
 +
|}
 +
 +
|}
 +
 +
==Other notes==
 +
 +
===Sortable tables===
 +
 +
Collapsible tables can be combined with the [[Help:Sorting|sortable tables]] functionality without difficulty.  However, because the hide/show button is placed in the first header cell located, its positioning can look a bit peculiar if the table is not wide enough:
 +
 +
{| class=wikitable style="width:80%;" align=center
 +
!Code entered!!Output produced
 +
|-
 +
|width=50%|&#32;
 +
<nowiki>{| class="wikitable </nowiki>'''collapsible sortable'''<nowiki>"
 +
!Name!!Score
 +
|-
 +
|John||59
 +
|-
 +
|Jane||100
 +
|-
 +
|Bob||72
 +
|}</nowiki>
 +
|style="width:50%; text-align:center;"|
 +
{|class="wikitable sortable collapsible"
 +
!Name!!Score
 +
|-
 +
|John||59
 +
|-
 +
|Jane||100
 +
|-
 +
|Bob||72
 +
|}
 +
|}
 +
 +
===Customization===
 +
 +
Registered users can edit [[Special:MyPage/monobook.js|their monobook.js]] file to change some of the variables used.
 +
 +
<source lang=javascript>
 +
autoCollapse = 4 //how many collapsible tables on the page before autocollapse works (default=2)
 +
var collapseCaption = 'collapse' //text of the [hide] link (default='hide')
 +
var expandCaption = 'uncollapse' //text of the [show] link (default='show')
 +
</source>
 +
 +
===Other HTML elements===
 +
 +
The code that performs the manipulation only checks for table elements, so these classes will not work for other elements, such as <tt><nowiki><div></nowiki></tt> or <tt><nowiki><span></nowiki></tt>.  There is a similar feature for use with <tt><nowiki><div></nowiki></tt> elements, called "NavFrame".

Latest revision as of 11:20, 19 June 2010

Transclusion

To include the contents of one document in another document {{:Forside}} The : means its in the main namespace. or {{User:Heth}}

educypedia

http://www.educypedia.be/

Numbered Formula

<math>P = U \cdot I = {U^2 \over R} = R \cdot I^2</math> (1)


<math>

f(q) = \sqrt{(1+p+\frac{p^3}{2!})} * (1+q+\frac{q^2}{2!})

</math>

<math>G = 1 - 2\,\int_0^1 L(X) dX. </math>

Horizontal Menu Bar

Home About Me WikiEducator WE Projects Expertise My interests Contact

Table style matching pedagogical templates

Title of Table
Text Data Numeric Data
# ###.##
Percentual Data
%
Text 1 282.75 37.8%
Text 2 465.25 62.2%
Total 748.00 100.0%



Horizontal justifying content in cells

This text is left aligned This text is centered This text is right aligned This text is justified



More complex Table

INSTRUCTIONAL EVENT Relation to Learning Process
Gaining attention Reception of patterns of neural impulses
Informing the learner of the objective Activiating a process of executive control

Collapsible Tables

Collapsible tables provide a way to collapse and uncollapse a table when a show/hide button is clicked. The code for this feature is found in the MediaWiki:Common.js.

The initial state of any collapsible content can be controlled using a "collapsible table", because it also allows a table with only one element with content, and a header.

Simple example

Tables are simpler to work with, as you merely need to add the collapsible class to the table itself. For the [hide]/[show] link to appear, the table's first row must be a header row, that is, one of the cells in the first row must be declared with an exclamation mark (in wikisyntax). The use of the class wikitable in the example below is merely for appearance; it is not needed for collapsible to function.

Code entered Output produced
{| class="wikitable collapsible"
! Simple collapsible table
|-
| Lorem ipsum dolor sit amet
|}
Simple collapsible table
Lorem ipsum dolor sit amet

Using the syntax above, collapsible tables are often used to always display an introduction to, or summary of, a lengthy discussion or section of content, while hiding the majority of that content from immediate view. The summary message is put in the header cell, and the content is placed into the body cell. The content is then easily accessible by clicking the 'show' button. The collapsible functionality is also available in larger and more complicated tables, as long as there is a header cell in the first row of the table.

Code entered Output produced
{| class="wikitable collapsible"
 |A normal cell in the header row
 ! colspan="2"| Header cell spans two cols
 |-
 | colspan="2" | Lorem ipsum dolor sit amet
 | Separate body cell
 |}
A normal cell in the header row Header cell spans two cols
Lorem ipsum dolor sit amet Separate body cell

Collapsing tables by default

Just using the collapsible class produces a table which is expanded by default, but can be collapsed by the reader. It is also possible to create tables which are collapsed by default, and can be optionally expanded. There are several methods for doing this, depending on the situations in which you want the table to collapse.

'collapsed'

Adding the collapsed class will cause the table to always be initially collapsed, no matter what happens around it. It is the simplest method for doing so. Using the examples above:

Code entered Output produced
{| class="wikitable collapsible collapsed"
! Simple collapsible table
|-
| Lorem ipsum dolor sit amet
|}
{| class="wikitable collapsible collapsed"
 |A normal cell in the header row
 ! colspan="2"| Header cell spans two cols
 |-
 | colspan="2" | Lorem ipsum dolor sit amet
 | Separate body cell
 |}

'autocollapse'

Adding the autocollapse class causes the table to collapse when there are more than a threshold number of collapsible tables on the page. On en.wiki, this threshold is set at 2. The example below, therefore, collapses because there are numerous collapsible tables on the page.

Code entered Output produced
{| class="wikitable collapsible autocollapse"
! Simple collapsible table
|-
| Lorem ipsum dolor sit amet
|}
Simple collapsible table
Lorem ipsum dolor sit amet

'innercollapse' and 'outercollapse'

Using this pair of classes, it is possible to make a table collapsed by default only when it is contained within a particular object, such as another table.

Code entered Output produced
{| class="wikitable outercollapse"
! This table does not collapse
|-
| But the table inside this cell

{| class="wikitable collapsible innercollapse"
! Does collapse
|-
| Hiding this part
|}

|}
This table does not collapse
But the table inside this cell
Does collapse
Hiding this part

Other notes

Sortable tables

Collapsible tables can be combined with the sortable tables functionality without difficulty. However, because the hide/show button is placed in the first header cell located, its positioning can look a bit peculiar if the table is not wide enough:

Code entered Output produced
{| class="wikitable collapsible sortable"
!Name!!Score
|-
|John||59
|-
|Jane||100
|-
|Bob||72
|}
Name Score
John 59
Jane 100
Bob 72

Customization

Registered users can edit their monobook.js file to change some of the variables used.

autoCollapse = 4 //how many collapsible tables on the page before autocollapse works (default=2)
var collapseCaption = 'collapse' //text of the [hide] link (default='hide')
var expandCaption = 'uncollapse' //text of the [show] link (default='show')

Other HTML elements

The code that performs the manipulation only checks for table elements, so these classes will not work for other elements, such as <div> or <span>. There is a similar feature for use with <div> elements, called "NavFrame".