wiki documentation

From Lazarus-ccr

Jump to: navigation, search

[edit] Guide to Wiki Editing

[edit] Overview

Tutorials

A Sand Box is available for practice.

If you have any problems, please notify the site administrator or post a bug report on the Lazarus-CCR SF site. You can also leave a note or suggestion on our Site Feedback page.

[edit] 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 add sources. Use the "<delphi>" tags for FPC code and the "<xml>" tag for XML code. The following example shows the use of the syntax highlighter in this Wiki:

<delphi>
Program Test;
Uses Crt;

Var I : Integer;

Begin
  For I := 0 to 12 do
    WriteLn('Test ',I:2);
End.
</delphi>

results in this output

 
Program Test;
Uses Crt;
 
Var I : Integer;
 
Begin
  For I := 0 to 12 do
    WriteLn('Test ',I:2);
End.
 

For XML sources use the "<xml>" and "</xml>" tags.

<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> 
</xml>

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> 
 

For program output or other verbatim quotes please use the "<pre>" and "</pre>" tags.

Note that the syntax highlighter will be changed in the future. Currently MediaWiki 1.9 is installed and uses an unofficial syntax highlighter. Within a year MediaWiki 1.10 will be installed, which has an official syntax highlighter. This will require a different syntax: <source lang="delphi">.