Help:Editing: Difference between revisions
Jump to navigation
Jump to search
(→Using Extensions: Template to use RawFile extension) |
(→Raw File: Use #file when there is no anchor, not #filelink !!!) |
||
Line 196: | Line 196: | ||
== Using Extensions == |
== Using Extensions == |
||
=== Raw File === |
=== Raw File === |
||
See reference syntax [http://wiki.yobi.be/wiki/Mediawiki_RawFile#Syntax here] |
|||
{| {{Prettytable}} |
{| {{Prettytable}} |
||
Line 201: | Line 203: | ||
|Example without anchor (best choice when block immediately follows the link). |
|Example without anchor (best choice when block immediately follows the link). |
||
<pre> |
<pre> |
||
Download [{{# |
Download [{{#file: HelpRawScript.sh}} this file]. |
||
<source lang="bash"> |
<source lang="bash"> |
||
#! /bin/bash |
#! /bin/bash |
||
Line 209: | Line 211: | ||
</pre> |
</pre> |
||
| |
| |
||
Download [{{# |
Download [{{#file: HelpRawScript.sh}} this file]. |
||
<source lang="bash"> |
<source lang="bash"> |
||
#! /bin/bash |
#! /bin/bash |
||
Line 216: | Line 218: | ||
</source> |
</source> |
||
|- |
|- |
||
|Example with an anchor (necessary when there is intermediate block - but need keeping name in sync!). |
|Example with an anchor (necessary when there is intermediate block - but need keeping name in sync!).<br> |
||
When anchor is on another page, use notation '''<code><nowiki>{{#fileLink: myscript.sh|Another Page}}</nowiki></code>''' |
|||
<pre> |
<pre> |
||
Download [{{#filelink: HelpAnotherRawScript.sh}} this file]. |
Download [{{#filelink: HelpAnotherRawScript.sh}} this file]. |
Revision as of 10:09, 13 October 2009
External Links
MediaWiki
MediaWiki - Meta
- Help Contents
- Editing
- Advanced editing | Editing FAQ | Edit toolbar | Export | Import | Shortcuts
- Style & formatting
- Wikitext examples | Reference card | HTML in wikitext | List | Table | Sorting | CSS
From Wikipedia
Hint and Tips
Use <div style="padding-left:...;"> to indend easily a pre, source or blockquote block:
* Look at my indented block:
<div style="padding-left:2em;"><pre>
Some PRE text
... some more ...
Let's finish here
</pre></div>
|
Some PRE text ... some more ... Let's finish here |
Use __TOC__ to control the location of the Table Of Content. This is particularly handy when there are some texts before the first heading in a page, and you want the TOC to appear first. |
Frequently Used
Description | You type | You get |
anywhere | ||
Arrows entities |
⇒ ⇐ ⇓ ⇑ ⇔ → ↓ ↑ ← ↔ |
⇒ ⇐ ⇓ ⇑ ⇔ → ↓ ↑ ← ↔ |
Space |
|
|
only at the beginning of the line | ||
Definition list |
;Definition |
|
HTML Tags
Description | You type | You get |
font tag | Change the <font color="red">font color</font> Change the <font size="3">font size</font> |
Change the font color Change the font size |
Tables
Basic syntax for table is
{| [opt-table-attr] |- [opt-line-attr] |[opt-cell-attr |]Orange |[opt-cell-attr |]Apple |- [opt-line-attr |[opt-cell-attr |] |[opt-cell-attr |]Pie |- [opt-line-attr |[opt-cell-attr |]Butter |[opt-cell-attr]| Ice cream |}
Table can be easily formatted using templates like:
{| {{Prettytable}} |- |{{Hl2}}|First |Second |- |Third |{{Hl2}}|Fourth |} |
| |||||||||
Or better yet, using CSS (eg. see MediaWiki:Common.css) class wikitable (see Table):
{| class="wikitable" |- !First |Second |- |Third !Fourth |} |
| |||||||||
Cell content can be formatted for each cell individually or for all cells on a same row
{| class="wikitable" |- !Very long header !Very long header !Very long header |- |align="left"|left |align="center"|center |align="right"|right |- align="center" |center |center |center |} |} |
|
Using Extensions
Raw File
See reference syntax here
Example without anchor (best choice when block immediately follows the link).
Download [{{#file: HelpRawScript.sh}} this file]. <source lang="bash"> #! /bin/bash echo 'Hello, World!' </source> |
Download [{{#file: HelpRawScript.sh}} this file]. #! /bin/bash
echo 'Hello, World!'
|
Example with an anchor (necessary when there is intermediate block - but need keeping name in sync!). When anchor is on another page, use notation Download [{{#filelink: HelpAnotherRawScript.sh}} this file]. <pre> This block is just to confuse RawFile </pre> {{#fileanchor: HelpAnotherRawScript.sh}} <source lang="bash"> #! /bin/bash echo 'Hello, World!' </source> |
Download [{{#filelink: HelpAnotherRawScript.sh}} this file].
This block is just to confuse RawFile {{#fileanchor: HelpAnotherRawScript.sh}} #! /bin/bash
echo 'I said "Hello, World!"'
|