wiki documentation: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: wiki documentation
| Old | New | Line | |
|---|---|---|---|
| 1 | + | # Guide to Wiki Editing | |
| 2 | + | ||
| 3 | + | ## Overview | |
| 4 | + | ||
| 5 | + | Tutorials | |
| 6 | + | ||
| 7 | + | - [WikiPedia Tutorial](http://en.wikipedia.org/wiki/Wikipedia:Tutorial) | |
| 8 | + | - spam, no tut ! : <http://www.chat11.com/30_Second_Quick_Wiki_Tutorial> --- 30 Second Quick Wiki Tutorial | |
| 9 | + | ||
| 10 | + | A [[Sand Box]] is available for practice. | |
| 11 | + | ||
| 12 | + | If you have any problems, please use this [Forum](https://forum.lazarus.freepascal.org/index.php?board=8.0). You can also leave a note or suggestion on our [[Site Feedback]] page. | |
| 13 | + | ||
| 14 | + | ## Syntax Highlighting | |
| 15 | + | ||
| 16 | + | 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. | |
| 17 | + | ||
| 18 | + | Use the "\<syntaxhighlight=pascal\>" tag for FPC and Pascal code. | |
| 19 | + | ||
| 20 | + | Use the "\<syntaxhighlight=delphi\>" tag for Delphi code. | |
| 21 | + | ||
| 22 | + | Note: "\<source=pascal\>" could also work but is not recommended (see [highlighter docs](http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Alternative_.3Csource.3E_tag)) | |
| 23 | + | ||
| 24 | + | More languages are supported; for a list, see the [highlighter docs](http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages). | |
| 25 | + | ||
| 26 | + | - for XML code, use \<syntaxhighlight lang=xml\> | |
| 27 | + | - for SQL code, use \<syntaxhighlight lang=sql\> | |
| 28 | + | - for DOS/CMD window code, use \<syntaxhighlight lang=dos\> | |
| 29 | + | - for bash/shell script code, use \<syntaxhighlight lang=bash\> | |
| 30 | + | - for ini file content, use use \<syntaxhighlight lang=ini\> | |
| 31 | + | - for Visual BASIC code, use \<syntaxhighlight lang=vb\> | |
| 32 | + | - for Java code, use \<syntaxhighlight lang=java\> | |
| 33 | + | - for JavaScript code, use \<syntaxhighlight lang=javascript\> | |
| 34 | + | ||
| 35 | + | The following example shows the use of the syntax highlighter in this Wiki: | |
| 36 | + | ||
| 37 | + | <syntaxhighlight lang=pascal> | |
| 38 | + | Program Test; | |
| 39 | + | Uses Crt; | |
| 40 | + | ||
| 41 | + | Var I : Integer; | |
| 42 | + | ||
| 43 | + | Begin | |
| 44 | + | For I := 0 to 12 do | |
| 45 | + | WriteLn('Test ',I:2); | |
| 46 | + | End. | |
| 47 | + | </syntaxhighlight> | |
| 48 | + | ||
| 49 | + | results in this output | |
| 50 | + | ||
| 51 | + | ``` pascal | |
| 52 | + | Program Test; | |
| 53 | + | Uses Crt; | |
| 54 | + | ||
| 55 | + | Var I : Integer; | |
| 56 | + | ||
| 57 | + | Begin | |
| 58 | + | For I := 0 to 12 do | |
| 59 | + | WriteLn('Test ',I:2); | |
| 60 | + | End. | |
| 61 | + | ``` | |
| 62 | + | ||
| 63 | + | Below is an example for XML sources. | |
| 64 | + | ||
| 65 | + | <syntaxhighlight lang="xml"> | |
| 66 | + | <xs:complexType name="DecimalWithUnits"> | |
| 67 | + | <xs:simpleContent> | |
| 68 | + | <xs:extension base="xs:decimal"> | |
| 69 | + | <xs:attribute name="Units" type="xs:string" | |
| 70 | + | use="required"/> | |
| 71 | + | </xs:extension> | |
| 72 | + | </xs:simpleContent> | |
| 73 | + | </xs:complexType> | |
| 74 | + | </syntaxhighlight> | |
| 75 | + | ||
| 76 | + | which results in: | |
| 77 | + | ||
| 78 | + | ``` xml | |
| 79 | + | <xs:complexType name="DecimalWithUnits"> | |
| 80 | + | <xs:simpleContent> | |
| 81 | + | <xs:extension base="xs:decimal"> | |
| 82 | + | <xs:attribute name="Units" type="xs:string" | |
| 83 | + | use="required"/> | |
| 84 | + | </xs:extension> | |
| 85 | + | </xs:simpleContent> | |
| 86 | + | </xs:complexType> | |
| 87 | + | ``` | |
| 88 | + | ||
| 89 | + | Below is an example for INI file content: | |
| 90 | + | ||
| 91 | + | <syntaxhighlight lang=ini> | |
| 92 | + | [Section Name] | |
| 93 | + | Name=Value | |
| 94 | + | Height=23 | |
| 95 | + | Width=32 | |
| 96 | + | </syntaxhighlight> | |
| 97 | + | ||
| 98 | + | which results in: | |
| 99 | + | ||
| 100 | + | ``` ini | |
| 101 | + | [Section Name] | |
| 102 | + | Name=Value | |
| 103 | + | Height=23 | |
| 104 | + | Width=32 | |
| 105 | + | ``` | |
| 106 | + | ||
| 107 | + | For program output or other verbatim quotes simply indent the text by one character like this: | |
| 108 | + | ||
| 109 | + | `This text is indented from the left margin by one character.` | |
| 110 | + | ||
| 111 | + | You can also use \<pre\> and \</pre\> tags. For example: | |
| 112 | + | ||
| 113 | + | This text begins with the <pre> tag and ends with the </pre> tag | |
| 114 | + | ||
| 115 | + | ## Keyboard shortcuts | |
| 116 | + | ||
| 117 | + | To display keyboard shortcuts use template Template:keypress: | |
| 118 | + | ||
| 119 | + | <code>Ctrl</code>+<code>F12</code> | |
| 120 | + | ||
| 121 | + | This will show as: | |
| 122 | + | ||
| 123 | + | `Ctrl`+`F12` | |
| 124 | + | ||
| 125 | + | ## Note | |
| 126 | + | ||
| 127 | + | To make text visible as a note use template Note: | |
| 128 | + | ||
| 129 | + | <blockquote>'''Note:''' This is a note for the reader</blockquote> | |
| 130 | + | ||
| 131 | + | This will be displayed as: | |
| 132 | + | ||
| 133 | + | > **Note:** This is a note for the reader | |
| 134 | + | ||
| 135 | + | ## Tip | |
| 136 | + | ||
| 137 | + | To make text visible as a tip use the Tip template: | |
| 138 | + | ||
| 139 | + | <blockquote>'''Tip:''' This is a tip for the reader</blockquote> | |
| 140 | + | ||
| 141 | + | This will be displayed as: | |
| 142 | + | ||
| 143 | + | > **Tip:** This is a tip for the reader | |
| 144 | + | ||
| 145 | + | ## Warning | |
| 146 | + | ||
| 147 | + | To make text visible as a warning use template Warning: | |
| 148 | + | ||
| 149 | + | <blockquote>'''Warning:''' This is a warning for the reader</blockquote> | |
| 150 | + | ||
| 151 | + | This will be displayed as: | |
| 152 | + | ||
| 153 | + | > **Warning:** This is a warning for the reader | |
| 154 | + | ||
| 155 | + | --- | |
| 156 | + | *From the Free Pascal wiki, page "wiki documentation", as it stood on 2020-03-04 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
