annotate public/help/wiki_syntax_detailed.html @ 1482:d4a266e7f316 issue_546

Close obsolete branch issue_546
author Chris Cannam
date Wed, 21 Nov 2012 10:33:11 +0000
parents 5e80956cc792
children bb32da3bea34
rev   line source
Chris@909 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Chris@909 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Chris@909 3 <head>
Chris@909 4 <title>RedmineWikiFormatting</title>
Chris@909 5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
Chris@909 6 <style type="text/css">
Chris@909 7 body { font:80% Verdana,Tahoma,Arial,sans-serif; }
Chris@909 8 h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; }
Chris@909 9 pre, code { font-size:120%; }
Chris@909 10 pre code { font-size:100%; }
Chris@909 11 pre {
Chris@909 12 margin: 1em 1em 1em 1.6em;
Chris@909 13 padding: 2px;
Chris@909 14 background-color: #fafafa;
Chris@909 15 border: 1px solid #dadada;
Chris@909 16 width:95%;
Chris@909 17 overflow-x: auto;
Chris@909 18 }
Chris@909 19 a.new { color: #b73535; }
Chris@909 20
Chris@909 21 .syntaxhl .line-numbers { padding: 2px 4px 2px 4px; background-color: #eee; margin:0 }
Chris@909 22 .syntaxhl .comment { color:#666; }
Chris@909 23
Chris@909 24 .syntaxhl .class { color:#B06; font-weight:bold }
Chris@909 25 .syntaxhl .delimiter { color:black }
Chris@909 26 .syntaxhl .function { color:#06B; font-weight:bold }
Chris@909 27
Chris@909 28 .syntaxhl .inline { background: #eee }
Chris@909 29 .syntaxhl .inline .inline-delimiter { font-weight: bold; color: #888 }
Chris@909 30
Chris@909 31 .syntaxhl .instance-variable { color:#33B }
Chris@909 32 .syntaxhl .reserved { color:#080; font-weight:bold }
Chris@909 33
Chris@909 34 .syntaxhl .string { background-color:#fff0f0; color: #D20; }
Chris@909 35 .syntaxhl .string .delimiter { color:#710 }
Chris@909 36
Chris@909 37 </style>
Chris@909 38 </head>
Chris@909 39
Chris@909 40 <body>
Chris@909 41 <h1><a name="1" class="wiki-page"></a>Wiki formatting</h1>
Chris@909 42
Chris@909 43 <h2><a name="2" class="wiki-page"></a>Links</h2>
Chris@909 44
Chris@909 45 <h3><a name="3" class="wiki-page"></a>Redmine links</h3>
Chris@909 46
Chris@909 47 <p>Redmine allows hyperlinking between issues, changesets and wiki pages from anywhere wiki formatting is used.</p>
Chris@909 48 <ul>
Chris@909 49 <li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
Chris@909 50 <li>Link to a changeset: <strong>r758</strong> (displays <a href="#" class="changeset" title="Search engine now only searches objects the user is allowed to view.">r758</a>)</li>
Chris@909 51 <li>Link to a changeset with a non-numeric hash: <strong>commit:c6f4d0fd</strong> (displays <a href="#" class="changeset">c6f4d0fd</a>).</li>
Chris@909 52 <li>Link to a changeset of another project: <strong>sandbox:r758</strong> (displays <a href="#" class="changeset" title="Search engine now only searches objects the user is allowed to view.">sandbox:r758</a>)</li>
Chris@909 53 <li>Link to a changeset with a non-numeric hash: <strong>sandbox:c6f4d0fd</strong> (displays <a href="#" class="changeset">sandbox:c6f4d0fd</a>).</li>
Chris@909 54 </ul>
Chris@909 55
Chris@909 56 <p>Wiki links:</p>
Chris@909 57
Chris@909 58 <ul>
Chris@909 59 <li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
Chris@909 60 <li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
Chris@909 61 <li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
Chris@909 62 </ul>
Chris@909 63
Chris@909 64 <p>You can also link to pages of an other project wiki:</p>
Chris@909 65
Chris@909 66 <ul>
Chris@909 67 <li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
Chris@909 68 <li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
Chris@909 69 </ul>
Chris@909 70
Chris@909 71 <p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
Chris@909 72
chris@37 73 <p>Links to other resources:</p>
Chris@909 74
Chris@909 75 <ul>
Chris@909 76 <li>Documents:
Chris@909 77 <ul>
Chris@909 78 <li><strong>document#17</strong> (link to document with id 17)</li>
Chris@909 79 <li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
Chris@909 80 <li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
Chris@210 81 <li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
Chris@909 82 </ul></li>
Chris@909 83 </ul>
Chris@909 84
Chris@909 85 <ul>
Chris@909 86 <li>Versions:
Chris@909 87 <ul>
Chris@909 88 <li><strong>version#3</strong> (link to version with id 3)</li>
Chris@909 89 <li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
Chris@909 90 <li><strong>version:"1.0 beta 2"</strong></li>
Chris@909 91 <li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
Chris@909 92 </ul></li>
Chris@909 93 </ul>
Chris@909 94
Chris@909 95 <ul>
Chris@909 96 <li>Attachments:
Chris@909 97 <ul>
Chris@909 98 <li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
Chris@909 99 <li>For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)</li>
Chris@909 100 </ul></li>
Chris@909 101 </ul>
Chris@909 102
Chris@909 103 <ul>
chris@37 104 <li>Repository files:
Chris@909 105 <ul>
chris@37 106 <li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
chris@37 107 <li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
chris@37 108 <li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
chris@37 109 <li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
chris@37 110 <li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
Chris@909 111 <li><strong>export:some/file</strong> (force the download of the file)</li>
Chris@909 112 <li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
Chris@210 113 <li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
chris@37 114 </ul></li>
Chris@909 115 </ul>
Chris@909 116
Chris@909 117 <ul>
chris@37 118 <li>Forum messages:
chris@37 119 <ul>
chris@37 120 <li><strong>message#1218</strong> (link to message with id 1218)</li>
chris@37 121 </ul></li>
chris@37 122 </ul>
chris@37 123
chris@37 124 <ul>
chris@37 125 <li>Projects:
chris@37 126 <ul>
chris@37 127 <li><strong>project#3</strong> (link to project with id 3)</li>
chris@37 128 <li><strong>project:someproject</strong> (link to project named "someproject")</li>
chris@37 129 </ul></li>
chris@37 130 </ul>
chris@37 131
chris@37 132
chris@37 133 <p>Escaping:</p>
chris@37 134
chris@37 135 <ul>
Chris@909 136 <li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
Chris@909 137 </ul>
Chris@909 138
Chris@909 139
Chris@909 140 <h3><a name="4" class="wiki-page"></a>External links</h3>
Chris@909 141
Chris@909 142 <p>HTTP URLs and email addresses are automatically turned into clickable links:</p>
Chris@909 143
Chris@909 144 <pre>
Chris@909 145 http://www.redmine.org, someone@foo.bar
Chris@909 146 </pre>
Chris@909 147
Chris@909 148 <p>displays: <a class="external" href="http://www.redmine.org">http://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
Chris@909 149
Chris@909 150 <p>If you want to display a specific text instead of the URL, you can use the standard textile syntax:</p>
Chris@909 151
Chris@909 152 <pre>
Chris@909 153 "Redmine web site":http://www.redmine.org
Chris@909 154 </pre>
Chris@909 155
Chris@909 156 <p>displays: <a href="http://www.redmine.org" class="external">Redmine web site</a></p>
Chris@909 157
Chris@909 158
Chris@909 159 <h2><a name="5" class="wiki-page"></a>Text formatting</h2>
Chris@909 160
Chris@909 161
Chris@909 162 <p>For things such as headlines, bold, tables, lists, Redmine supports Textile syntax. See <a class="external" href="http://www.textism.com/tools/textile/">http://www.textism.com/tools/textile/</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
Chris@909 163
Chris@909 164 <h3><a name="6" class="wiki-page"></a>Font style</h3>
Chris@909 165
Chris@909 166 <pre>
Chris@909 167 * *bold*
Chris@909 168 * _italic_
Chris@909 169 * _*bold italic*_
Chris@909 170 * +underline+
Chris@909 171 * -strike-through-
Chris@909 172 </pre>
Chris@909 173
Chris@909 174 <p>Display:</p>
Chris@909 175
Chris@909 176 <ul>
Chris@909 177 <li><strong>bold</strong></li>
Chris@909 178 <li><em>italic</em></li>
Chris@909 179 <li><em>*bold italic*</em></li>
Chris@909 180 <li><ins>underline</ins></li>
Chris@909 181 <li><del>strike-through</del></li>
Chris@909 182 </ul>
Chris@909 183
Chris@909 184 <h3><a name="7" class="wiki-page"></a>Inline images</h3>
Chris@909 185
Chris@909 186 <ul>
Chris@909 187 <li><strong>!image_url!</strong> displays an image located at image_url (textile syntax)</li>
Chris@909 188 <li><strong>!>image_url!</strong> right floating image</li>
Chris@909 189 <li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong>!attached_image.png!</strong></li>
Chris@909 190 </ul>
Chris@909 191
Chris@909 192 <h3><a name="8" class="wiki-page"></a>Headings</h3>
Chris@909 193
Chris@909 194 <pre>
Chris@909 195 h1. Heading
Chris@909 196 h2. Subheading
Chris@909 197 h3. Subsubheading
Chris@909 198 </pre>
Chris@909 199
Chris@909 200 <p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
Chris@909 201
Chris@909 202
Chris@912 203
Chris@912 204
Chris@912 205 <h3><a name="9" class="wiki-page"></a>Bullets and Numbering</h3>
Chris@912 206
Chris@912 207 <pre>
Chris@912 208 * First Level Bullet
Chris@912 209 ** Second Level Bullet
Chris@912 210 ** Another Second Level Bullet
Chris@912 211 *** Third Level Bullet
Chris@912 212 ** Back to 2nd Level Bullet
Chris@912 213 * Back to 1st Level Bullet
Chris@912 214 </pre>
Chris@912 215
Chris@912 216 <ul>
Chris@912 217 <li>First Level Bullet</li>
Chris@912 218 <ul>
Chris@912 219 <li>Second Level Bullet</li>
Chris@912 220 <li>Another Second Level Bullet</li>
Chris@912 221 <ul>
Chris@912 222 <li>Third Level Bullet</li>
Chris@912 223 </ul>
Chris@912 224 <li>Back to 2nd Level Bullet</li>
Chris@912 225 </ul>
Chris@912 226
Chris@912 227 <li>Back to 1st Level Bullet</li>
Chris@912 228 </ul>
Chris@912 229
Chris@912 230 <pre>
Chris@912 231 # First Level Numbering
Chris@912 232 ## Second Level Numbering
Chris@912 233 ## Another Second Level Numbering
Chris@912 234 ### Third Level Numbering
Chris@912 235 ## Back to 2nd Level Numbering
Chris@912 236 # Back to 1st Level Numbering
Chris@912 237 </pre>
Chris@912 238
Chris@912 239 <ol>
Chris@912 240 <li>First Level Numbering</li>
Chris@912 241 <ol>
Chris@912 242 <li>Second Level Numbering</li>
Chris@912 243 <li>Another Second Level Numbering</li>
Chris@912 244 <ol>
Chris@912 245 <li>Third Level Numbering</li>
Chris@912 246 </ol>
Chris@912 247 <li>Back to 2nd Level Numbering</li>
Chris@912 248 </ol>
Chris@912 249 <li>Back to 1st Level Numbering</li>
Chris@912 250 </ol>
Chris@912 251
Chris@912 252 <pre>
Chris@912 253 # First Level Numbering
Chris@912 254 #* Bullet inside numbering environment
Chris@912 255 #* Another Bullet inside numbering environment
Chris@912 256 # Back to 1st Level Numbering
Chris@912 257 </pre>
Chris@912 258
Chris@912 259 <ol>
Chris@912 260 <li>First Level Numbering</li>
Chris@912 261 <ul>
Chris@912 262 <li>Bullet inside numbering environment</li>
Chris@912 263 <li>Another Bullet inside numbering environment</li>
Chris@912 264 </ul>
Chris@912 265
Chris@912 266 <li>Back to 1st Level Numbering</li>
Chris@912 267 </ol>
Chris@912 268
Chris@912 269
Chris@912 270
Chris@912 271
Chris@912 272
Chris@912 273
Chris@912 274
Chris@909 275 <h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
Chris@909 276
Chris@909 277 <pre>
Chris@909 278 p>. right aligned
Chris@909 279 p=. centered
Chris@909 280 </pre>
Chris@909 281
Chris@909 282 <p style="text-align:center;">This is a centered paragraph.</p>
Chris@909 283
Chris@909 284
Chris@909 285 <h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
Chris@909 286
Chris@909 287 <p>Start the paragraph with <strong>bq.</strong></p>
Chris@909 288
Chris@909 289 <pre>
Chris@909 290 bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
Chris@909 291 To go live, all you need to add is a database and a web server.
Chris@909 292 </pre>
Chris@909 293
Chris@909 294 <p>Display:</p>
Chris@909 295
Chris@909 296 <blockquote>
Chris@909 297 <p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
Chris@909 298 </blockquote>
Chris@909 299
Chris@909 300
Chris@909 301 <h3><a name="11" class="wiki-page"></a>Table of content</h3>
Chris@909 302
Chris@909 303 <pre>
Chris@909 304 {{toc}} => left aligned toc
Chris@909 305 {{>toc}} => right aligned toc
Chris@909 306 </pre>
Chris@909 307
Chris@909 308 <h2><a name="12" class="wiki-page"></a>Macros</h2>
Chris@909 309
Chris@909 310 <p>Redmine has the following builtin macros:</p>
Chris@909 311
Chris@909 312 <p><dl><dt><code>hello_world</code></dt><dd><p>Sample macro.</p></dd><dt><code>include</code></dt><dd><p>Include a wiki page. Example:</p>
Chris@909 313
Chris@909 314 <pre><code>{{include(Foo)}}</code></pre></dd><dt><code>macro_list</code></dt><dd><p>Displays a list of all available macros, including description if available.</p></dd></dl></p>
Chris@909 315
Chris@909 316
Chris@909 317 <h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
Chris@909 318
Chris@909 319 <p>Default code highlightment relies on <a href="http://coderay.rubychan.de/" class="external">CodeRay</a>, a fast syntax highlighting library written completely in Ruby. It currently supports c, cpp, css, delphi, groovy, html, java, javascript, json, php, python, rhtml, ruby, scheme, sql, xml and yaml languages.</p>
Chris@909 320
Chris@909 321 <p>You can highlight code in your wiki page using this syntax:</p>
Chris@909 322
Chris@909 323 <pre>
Chris@909 324 &lt;pre&gt;&lt;code class="ruby"&gt;
Chris@909 325 Place you code here.
Chris@909 326 &lt;/code&gt;&lt;/pre&gt;
Chris@909 327 </pre>
Chris@909 328
Chris@909 329 <p>Example:</p>
Chris@909 330
Chris@909 331 <pre><code class="ruby syntaxhl"><span class="line-numbers"> 1</span> <span class="comment"># The Greeter class</span>
Chris@909 332 <span class="line-numbers"> 2</span> <span class="reserved">class</span> <span class="class">Greeter</span>
Chris@909 333 <span class="line-numbers"> 3</span> <span class="reserved">def</span> <span class="function">initialize</span>(name)
Chris@909 334 <span class="line-numbers"> 4</span> <span class="instance-variable">@name</span> = name.capitalize
Chris@909 335 <span class="line-numbers"> 5</span> <span class="reserved">end</span>
Chris@909 336 <span class="line-numbers"> 6</span>
Chris@909 337 <span class="line-numbers"> 7</span> <span class="reserved">def</span> <span class="function">salute</span>
Chris@909 338 <span class="line-numbers"> 8</span> puts <span class="string"><span class="delimiter">"</span><span class="content">Hello </span><span class="inline"><span class="inline-delimiter">#{</span><span class="instance-variable">@name</span><span class="inline-delimiter">}</span></span><span class="content">!</span><span class="delimiter">"</span></span>
Chris@909 339 <span class="line-numbers"> 9</span> <span class="reserved">end</span>
Chris@909 340 <span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
Chris@909 341 </pre>
Chris@909 342 </body>
Chris@909 343 </html>