Difference between revisions of "wiki documentation"

From Lazarus wiki
Jump to navigationJump to search
(Updated and expanded; fixed syntax highlighting)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Guide to Wiki Editing ==
+
{{wiki_documentation}}
  
=== Overview ===
+
= Guide to Wiki Editing =
 +
 
 +
== Overview ==
  
 
Tutorials
 
Tutorials
* [http://www.chat11.com/30_Second_Quick_Wiki_Tutorial 30 Second Quick Wiki Tutorial]
+
 
 
* [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 notify the site [http://sourceforge.net/users/vlx/ administrator] or post a bug report on the [http://sourceforge.net/projects/lazarus-ccr Lazarus-CCR] SF site. You can also leave a note or suggestion on our [[Site Feedback]] page.
+
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 ===
+
== 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.  
 
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> tag for FPC code (the Delphi language is the default highlighter language)
+
Use the "<syntaxhighlight=pascal>" tag for FPC and Pascal code.
  
Note: "<source>" could also work but is not recommended (see [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Alternative_.3Csource.3E_tag highlighter docs])
+
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].  
 
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 XML code, use <syntaxhighlight lang=xml>  
* for SQL code, use <syntaxhighlight lang="sql">.
+
* for SQL code, use <syntaxhighlight lang=sql>  
* for DOS/CMD window code, use <syntaxhighlight lang="dos">.
+
* for DOS/CMD window code, use <syntaxhighlight lang=dos>
* for bash/shell script code, use <syntaxhighlight lang="bash">.
+
* 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:
 
The following example shows the use of the syntax highlighter in this Wiki:
 +
 
<pre>
 
<pre>
<syntaxhighlight>
+
<syntaxhighlight lang=pascal>
 
Program Test;
 
Program Test;
 
Uses Crt;
 
Uses Crt;
Line 39: Line 49:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
</pre>
 
</pre>
 +
 
results in this output
 
results in this output
<syntaxhighlight>
+
 
 +
<syntaxhighlight lang=pascal>
 
Program Test;
 
Program Test;
 
Uses Crt;
 
Uses Crt;
Line 51: Line 63:
 
End.
 
End.
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
Below is an example for XML sources.
 
Below is an example for XML sources.
 +
 
<pre>
 
<pre>
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
Line 64: 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 76: Line 92:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
For program output or other verbatim quotes please use the "&lt;pre&gt;" and "&lt;/pre&gt;" tags.
+
Below is an example for INI file content:
 +
 
 +
<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:
  
===Keyboard shortcuts===
+
This text is indented from the left margin by one character.
 +
 
 +
You can also use &lt;pre&gt; and &lt;/pre&gt; tags. For example:
 +
 
 +
<pre>
 +
This text begins with the &lt;pre&gt; tag and ends with the &lt;/pre&gt; tag
 +
</pre>
 +
 
 +
== Keyboard shortcuts ==
  
 
To display keyboard shortcuts use template [[Template:keypress]]:
 
To display keyboard shortcuts use template [[Template:keypress]]:
Line 86: 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 note use template Note:
+
To make text visible as a warning use template Warning:
  
<pre>{{Note|This is note for reader}}</pre>
+
<pre>{{Warning|This is a warning for the reader}}</pre>
  
This will be displayed as  
+
This will be displayed as:
{{Note|This is note for reader}}
 
  
[[Category:Wiki]]
+
{{Warning|This is a warning for the reader}}
[[Category:Troubleshooting]]
 

Latest revision as of 11:28, 4 March 2020

English (en)

Guide to Wiki Editing

Overview

Tutorials

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:

Light bulb  Note: This is a note for the reader

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:

Note-icon.png

Tip: This is a tip for the reader

Warning

To make text visible as a warning use template Warning:

{{Warning|This is a warning for the reader}}

This will be displayed as:

Warning-icon.png

Warning: This is a warning for the reader