Difference between revisions of "wiki documentation"
(note) |
(Updated and expanded; fixed syntax highlighting) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{wiki_documentation}} | |
− | === Overview | + | = Guide to Wiki Editing = |
+ | |||
+ | == Overview == | ||
Tutorials | Tutorials | ||
− | + | ||
* [http://en.wikipedia.org/wiki/Wikipedia:Tutorial WikiPedia Tutorial] | * [http://en.wikipedia.org/wiki/Wikipedia:Tutorial WikiPedia Tutorial] | ||
+ | * spam, no tut ! : http://www.chat11.com/30_Second_Quick_Wiki_Tutorial --- 30 Second Quick Wiki Tutorial | ||
A [[Sand Box]] is available for practice. | A [[Sand Box]] is available for practice. | ||
− | If you have any problems, please | + | If you have any problems, please use this [https://forum.lazarus.freepascal.org/index.php?board=8.0 Forum]. You can also leave a note or suggestion on our [[Site Feedback]] page. |
+ | |||
+ | == Syntax Highlighting == | ||
+ | |||
+ | A Wiki for a programming language site needs a powerful way of showing source code in readable fashion. Therefore we use an automatic syntax highlighter to for sources. | ||
− | === | + | Use the "<syntaxhighlight=pascal>" tag for FPC and Pascal code. |
+ | |||
+ | Use the "<syntaxhighlight=delphi>" tag for Delphi code. | ||
+ | |||
+ | Note: "<source=pascal>" could also work but is not recommended (see [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Alternative_.3Csource.3E_tag highlighter docs]) | ||
+ | |||
+ | More languages are supported; for a list, see the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages highlighter docs]. | ||
+ | * for XML code, use <syntaxhighlight lang=xml> | ||
+ | * for SQL code, use <syntaxhighlight lang=sql> | ||
+ | * for DOS/CMD window code, use <syntaxhighlight lang=dos> | ||
+ | * for bash/shell script code, use <syntaxhighlight lang=bash> | ||
+ | * for ini file content, use use <syntaxhighlight lang=ini> | ||
+ | * for Visual BASIC code, use <syntaxhighlight lang=vb> | ||
+ | * for Java code, use <syntaxhighlight lang=java> | ||
+ | * for JavaScript code, use <syntaxhighlight lang=javascript> | ||
+ | |||
+ | The following example shows the use of the syntax highlighter in this Wiki: | ||
− | |||
<pre> | <pre> | ||
− | < | + | <syntaxhighlight lang=pascal> |
Program Test; | Program Test; | ||
Uses Crt; | Uses Crt; | ||
Line 25: | Line 47: | ||
WriteLn('Test ',I:2); | WriteLn('Test ',I:2); | ||
End. | End. | ||
− | </ | + | </syntaxhighlight> |
</pre> | </pre> | ||
+ | |||
results in this output | results in this output | ||
− | < | + | |
+ | <syntaxhighlight lang=pascal> | ||
Program Test; | Program Test; | ||
Uses Crt; | Uses Crt; | ||
Line 38: | Line 62: | ||
WriteLn('Test ',I:2); | WriteLn('Test ',I:2); | ||
End. | End. | ||
− | </ | + | </syntaxhighlight> |
+ | |||
Below is an example for XML sources. | Below is an example for XML sources. | ||
+ | |||
<pre> | <pre> | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
Line 52: | Line 78: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</pre> | </pre> | ||
− | results in | + | |
+ | which results in: | ||
+ | |||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<xs:complexType name="DecimalWithUnits"> | <xs:complexType name="DecimalWithUnits"> | ||
Line 64: | Line 92: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Below is an example for INI file content: | |
− | ===Keyboard shortcuts | + | <pre> |
+ | <syntaxhighlight lang=ini> | ||
+ | [Section Name] | ||
+ | Name=Value | ||
+ | Height=23 | ||
+ | Width=32 | ||
+ | </syntaxhighlight> | ||
+ | </pre> | ||
+ | |||
+ | which results in: | ||
+ | |||
+ | <syntaxhighlight lang=ini> | ||
+ | [Section Name] | ||
+ | Name=Value | ||
+ | Height=23 | ||
+ | Width=32 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | For program output or other verbatim quotes simply indent the text by one character like this: | ||
+ | |||
+ | This text is indented from the left margin by one character. | ||
+ | |||
+ | You can also use <pre> and </pre> tags. For example: | ||
+ | |||
+ | <pre> | ||
+ | This text begins with the <pre> tag and ends with the </pre> tag | ||
+ | </pre> | ||
+ | |||
+ | == Keyboard shortcuts == | ||
To display keyboard shortcuts use template [[Template:keypress]]: | To display keyboard shortcuts use template [[Template:keypress]]: | ||
Line 74: | Line 130: | ||
This will show as: | This will show as: | ||
+ | |||
{{keypress|Ctrl}}+{{keypress|F12}} | {{keypress|Ctrl}}+{{keypress|F12}} | ||
− | ===Note=== | + | == Note == |
+ | |||
+ | To make text visible as a note use template Note: | ||
+ | |||
+ | <pre>{{Note|This is a note for the reader}}</pre> | ||
+ | |||
+ | This will be displayed as: | ||
+ | |||
+ | {{Note|This is a note for the reader}} | ||
+ | |||
+ | == Tip == | ||
+ | |||
+ | To make text visible as a tip use the Tip template: | ||
+ | |||
+ | <pre>{{Tip|This is a tip for the reader}}</pre> | ||
+ | |||
+ | This will be displayed as: | ||
+ | |||
+ | {{Tip|This is a tip for the reader}} | ||
+ | |||
+ | == Warning == | ||
+ | |||
+ | To make text visible as a warning use template Warning: | ||
− | + | <pre>{{Warning|This is a warning for the reader}}</pre> | |
− | + | This will be displayed as: | |
− | + | {{Warning|This is a warning for the reader}} | |
− | {{ |
Latest revision as of 11:28, 4 March 2020
│
English (en) │
Guide to Wiki Editing
Overview
Tutorials
- WikiPedia Tutorial
- spam, no tut ! : http://www.chat11.com/30_Second_Quick_Wiki_Tutorial --- 30 Second Quick Wiki Tutorial
A Sand Box is available for practice.
If you have any problems, please use this Forum. You can also leave a note or suggestion on our Site Feedback page.
Syntax Highlighting
A Wiki for a programming language site needs a powerful way of showing source code in readable fashion. Therefore we use an automatic syntax highlighter to for sources.
Use the "<syntaxhighlight=pascal>" tag for FPC and Pascal code.
Use the "<syntaxhighlight=delphi>" tag for Delphi code.
Note: "<source=pascal>" could also work but is not recommended (see highlighter docs)
More languages are supported; for a list, see the highlighter docs.
- for XML code, use <syntaxhighlight lang=xml>
- for SQL code, use <syntaxhighlight lang=sql>
- for DOS/CMD window code, use <syntaxhighlight lang=dos>
- for bash/shell script code, use <syntaxhighlight lang=bash>
- for ini file content, use use <syntaxhighlight lang=ini>
- for Visual BASIC code, use <syntaxhighlight lang=vb>
- for Java code, use <syntaxhighlight lang=java>
- for JavaScript code, use <syntaxhighlight lang=javascript>
The following example shows the use of the syntax highlighter in this Wiki:
<syntaxhighlight lang=pascal> Program Test; Uses Crt; Var I : Integer; Begin For I := 0 to 12 do WriteLn('Test ',I:2); End. </syntaxhighlight>
results in this output
Program Test;
Uses Crt;
Var I : Integer;
Begin
For I := 0 to 12 do
WriteLn('Test ',I:2);
End.
Below is an example for XML sources.
<syntaxhighlight lang="xml"> <xs:complexType name="DecimalWithUnits"> <xs:simpleContent> <xs:extension base="xs:decimal"> <xs:attribute name="Units" type="xs:string" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </syntaxhighlight>
which results in:
<xs:complexType name="DecimalWithUnits">
<xs:simpleContent>
<xs:extension base="xs:decimal">
<xs:attribute name="Units" type="xs:string"
use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Below is an example for INI file content:
<syntaxhighlight lang=ini> [Section Name] Name=Value Height=23 Width=32 </syntaxhighlight>
which results in:
[Section Name]
Name=Value
Height=23
Width=32
For program output or other verbatim quotes simply indent the text by one character like this:
This text is indented from the left margin by one character.
You can also use <pre> and </pre> tags. For example:
This text begins with the <pre> tag and ends with the </pre> tag
Keyboard shortcuts
To display keyboard shortcuts use template Template:keypress:
{{keypress|Ctrl}}+{{keypress|F12}}
This will show as:
Ctrl+F12
Note
To make text visible as a note use template Note:
{{Note|This is a note for the reader}}
This will be displayed as:
Tip
To make text visible as a tip use the Tip template:
{{Tip|This is a tip for the reader}}
This will be displayed as:
Warning
To make text visible as a warning use template Warning:
{{Warning|This is a warning for the reader}}
This will be displayed as: