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