Difference between revisions of "wiki documentation"

From Free Pascal wiki
Jump to navigationJump to search
(Syntax Highlighting)
Line 1: Line 1:
The wiki speeds things by making it possible to make changes and additions with a browser!
+
== 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.
  
For tutorials, please take a look at the [http://www.chat11.com/30_Second_Quick_Wiki_Tutorial 30 Second Quick Wiki Tutorial] or the [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.
+
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.
  
stating specials about _this_ wiki. On June 08, 2007 a syntax highlight plugin was introduced, this should be advertised as prominent as possible to avoid people using "<pre>" tags. Instead of that use the "<delphi>" tags for FPC code and the "<xml>" tag for XML code. Vincent, please add some more details about using the syntax highlighter (including small examples).
+
=== 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;
  
** I don't want to promote it, because it has to be changed within a year or so anyway. Mediawiki 1.10 has official syntax highlighter which will require a different syntax: &lt;source lang="delphi"&gt;. Because the current wiki runs on 1.9, and the 1.10 syntax highlighter is not compatible, I installed a unofficial syntax highlighter of a previous (1.7 IIRC) version. [[User:Vincent|Vincent]] 14:59, 10 June 2007 (CEST)
+
Var I : Integer;
** Feel free to create such a page yourself, with the above mentioned remark. [[User:Vincent|Vincent]] 14:59, 10 June 2007 (CEST)
 
  
 +
Begin
 +
  For I := 0 to 12 do
 +
    WriteLn('Test ',I:2);
 +
End.
 +
</delphi>
 +
</pre>
 +
results in this output
 +
<delphi>
 +
Program Test;
 +
Uses Crt;
  
TODO: will be improved by --[[User:Hansiglaser|Hansiglaser]] 23:36, 10 June 2007 (CEST)
+
Var I : Integer;
  
Maybe it is better to put this content in [[Help:Contents]]. This page is accessible through the Help link in the navigation menu. [[User:Vincent|Vincent]] 02:28, 11 June 2007 (CEST)
+
Begin
 +
  For I := 0 to 12 do
 +
    WriteLn('Test ',I:2);
 +
End.
 +
</delphi>
 +
 
 +
For XML sources use the "&lt;xml&gt;" and "&lt;/xml&gt;" 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 "&lt;pre&gt;" and "&lt;/pre&gt;" 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: &lt;source lang="delphi"&gt;.

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">.