Difference between revisions of "wiki documentation"
Hansiglaser (talk | contribs) (Syntax Highlighting) |
|||
Line 1: | Line 1: | ||
− | + | == Guide to Wiki Editing == | |
+ | === Overview === | ||
+ | Tutorials | ||
+ | * [http://www.chat11.com/30_Second_Quick_Wiki_Tutorial 30 Second Quick Wiki Tutorial] | ||
+ | * [http://en.wikipedia.org/wiki/Wikipedia:Tutorial WikiPedia Tutorial] | ||
+ | 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. | |
− | + | === 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: | ||
+ | <pre> | ||
+ | <delphi> | ||
+ | Program Test; | ||
+ | Uses Crt; | ||
− | + | Var I : Integer; | |
− | |||
+ | Begin | ||
+ | For I := 0 to 12 do | ||
+ | WriteLn('Test ',I:2); | ||
+ | End. | ||
+ | </delphi> | ||
+ | </pre> | ||
+ | results in this output | ||
+ | <delphi> | ||
+ | Program Test; | ||
+ | Uses Crt; | ||
− | + | Var I : Integer; | |
− | + | Begin | |
+ | For I := 0 to 12 do | ||
+ | WriteLn('Test ',I:2); | ||
+ | End. | ||
+ | </delphi> | ||
+ | |||
+ | For XML sources use the "<xml>" and "</xml>" tags. | ||
+ | <pre> | ||
+ | <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> | ||
+ | </pre> | ||
+ | results in | ||
+ | <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> | ||
+ | |||
+ | 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">. |
Revision as of 15:44, 11 June 2007
Guide to Wiki Editing
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.
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 <delphi> Program Test; Uses Crt;
Var I : Integer;
Begin
For I := 0 to 12 do WriteLn('Test ',I:2);
End. </delphi>
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 <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>
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">.