annotate public/help/wiki_syntax_detailed.html @ 1465:ab8bd24eeb65 bug_635

Close obsolete branch bug_635
author Chris Cannam
date Fri, 19 Jul 2013 12:13:20 +0100
parents 0a574315af3e
children
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@1115 47 <p>Redmine allows hyperlinking between resources (issues, changesets, 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@1115 50 <li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
Chris@909 51 </ul>
Chris@909 52
Chris@909 53 <p>Wiki links:</p>
Chris@909 54
Chris@909 55 <ul>
Chris@909 56 <li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
Chris@909 57 <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 58 <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 59 </ul>
Chris@909 60
Chris@909 61 <p>You can also link to pages of an other project wiki:</p>
Chris@909 62
Chris@909 63 <ul>
Chris@909 64 <li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
Chris@909 65 <li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
Chris@909 66 </ul>
Chris@909 67
Chris@909 68 <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 69
chris@37 70 <p>Links to other resources:</p>
Chris@909 71
Chris@909 72 <ul>
Chris@909 73 <li>Documents:
Chris@909 74 <ul>
Chris@909 75 <li><strong>document#17</strong> (link to document with id 17)</li>
Chris@909 76 <li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
Chris@909 77 <li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
Chris@210 78 <li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
Chris@909 79 </ul></li>
Chris@909 80 </ul>
Chris@909 81
Chris@909 82 <ul>
Chris@909 83 <li>Versions:
Chris@909 84 <ul>
Chris@909 85 <li><strong>version#3</strong> (link to version with id 3)</li>
Chris@909 86 <li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
Chris@909 87 <li><strong>version:"1.0 beta 2"</strong></li>
Chris@909 88 <li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
Chris@909 89 </ul></li>
Chris@909 90 </ul>
Chris@909 91
Chris@909 92 <ul>
Chris@909 93 <li>Attachments:
Chris@909 94 <ul>
Chris@909 95 <li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
Chris@909 96 <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 97 </ul></li>
Chris@909 98 </ul>
Chris@909 99
Chris@909 100 <ul>
Chris@1115 101 <li>Changesets:
Chris@1115 102 <ul>
Chris@1115 103 <li><strong>r758</strong> (link to a changeset)</li>
Chris@1115 104 <li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
Chris@1115 105 <li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
Chris@1115 106 <li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
Chris@1115 107 <li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
Chris@1115 108 <li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
Chris@1115 109 </ul></li>
Chris@1115 110 </ul>
Chris@1115 111
Chris@1115 112 <ul>
chris@37 113 <li>Repository files:
Chris@909 114 <ul>
chris@37 115 <li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
chris@37 116 <li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
chris@37 117 <li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
chris@37 118 <li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
chris@37 119 <li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
Chris@909 120 <li><strong>export:some/file</strong> (force the download of the file)</li>
Chris@1115 121 <li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
Chris@909 122 <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 123 <li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
chris@37 124 </ul></li>
Chris@909 125 </ul>
Chris@909 126
Chris@909 127 <ul>
chris@37 128 <li>Forum messages:
chris@37 129 <ul>
chris@37 130 <li><strong>message#1218</strong> (link to message with id 1218)</li>
chris@37 131 </ul></li>
chris@37 132 </ul>
chris@37 133
chris@37 134 <ul>
chris@37 135 <li>Projects:
chris@37 136 <ul>
chris@37 137 <li><strong>project#3</strong> (link to project with id 3)</li>
chris@37 138 <li><strong>project:someproject</strong> (link to project named "someproject")</li>
chris@37 139 </ul></li>
chris@37 140 </ul>
chris@37 141
chris@37 142
chris@37 143 <p>Escaping:</p>
chris@37 144
chris@37 145 <ul>
Chris@909 146 <li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
Chris@909 147 </ul>
Chris@909 148
Chris@909 149
Chris@909 150 <h3><a name="4" class="wiki-page"></a>External links</h3>
Chris@909 151
Chris@909 152 <p>HTTP URLs and email addresses are automatically turned into clickable links:</p>
Chris@909 153
Chris@909 154 <pre>
Chris@909 155 http://www.redmine.org, someone@foo.bar
Chris@909 156 </pre>
Chris@909 157
Chris@909 158 <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 159
Chris@909 160 <p>If you want to display a specific text instead of the URL, you can use the standard textile syntax:</p>
Chris@909 161
Chris@909 162 <pre>
Chris@909 163 "Redmine web site":http://www.redmine.org
Chris@909 164 </pre>
Chris@909 165
Chris@909 166 <p>displays: <a href="http://www.redmine.org" class="external">Redmine web site</a></p>
Chris@909 167
Chris@909 168
Chris@909 169 <h2><a name="5" class="wiki-page"></a>Text formatting</h2>
Chris@909 170
Chris@909 171
Chris@1294 172 <p>For things such as headlines, bold, tables, lists, Redmine supports Textile syntax. See <a class="external" href="http://en.wikipedia.org/wiki/Textile_%28markup_language%29">http://en.wikipedia.org/wiki/Textile_(markup_language)</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 173
Chris@909 174 <h3><a name="6" class="wiki-page"></a>Font style</h3>
Chris@909 175
Chris@909 176 <pre>
Chris@909 177 * *bold*
Chris@909 178 * _italic_
Chris@909 179 * _*bold italic*_
Chris@909 180 * +underline+
Chris@909 181 * -strike-through-
Chris@909 182 </pre>
Chris@909 183
Chris@909 184 <p>Display:</p>
Chris@909 185
Chris@909 186 <ul>
Chris@909 187 <li><strong>bold</strong></li>
Chris@909 188 <li><em>italic</em></li>
Chris@909 189 <li><em>*bold italic*</em></li>
Chris@909 190 <li><ins>underline</ins></li>
Chris@909 191 <li><del>strike-through</del></li>
Chris@909 192 </ul>
Chris@909 193
Chris@909 194 <h3><a name="7" class="wiki-page"></a>Inline images</h3>
Chris@909 195
Chris@909 196 <ul>
Chris@909 197 <li><strong>!image_url!</strong> displays an image located at image_url (textile syntax)</li>
Chris@909 198 <li><strong>!>image_url!</strong> right floating image</li>
Chris@909 199 <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 200 </ul>
Chris@909 201
Chris@909 202 <h3><a name="8" class="wiki-page"></a>Headings</h3>
Chris@909 203
Chris@909 204 <pre>
Chris@909 205 h1. Heading
Chris@909 206 h2. Subheading
Chris@909 207 h3. Subsubheading
Chris@909 208 </pre>
Chris@909 209
Chris@909 210 <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 211
Chris@909 212
Chris@912 213
Chris@912 214
Chris@912 215 <h3><a name="9" class="wiki-page"></a>Bullets and Numbering</h3>
Chris@912 216
Chris@912 217 <pre>
Chris@912 218 * First Level Bullet
Chris@912 219 ** Second Level Bullet
Chris@912 220 ** Another Second Level Bullet
Chris@912 221 *** Third Level Bullet
Chris@912 222 ** Back to 2nd Level Bullet
Chris@912 223 * Back to 1st Level Bullet
Chris@912 224 </pre>
Chris@912 225
Chris@912 226 <ul>
Chris@912 227 <li>First Level Bullet</li>
Chris@912 228 <ul>
Chris@912 229 <li>Second Level Bullet</li>
Chris@912 230 <li>Another Second Level Bullet</li>
Chris@912 231 <ul>
Chris@912 232 <li>Third Level Bullet</li>
Chris@912 233 </ul>
Chris@912 234 <li>Back to 2nd Level Bullet</li>
Chris@912 235 </ul>
Chris@912 236
Chris@912 237 <li>Back to 1st Level Bullet</li>
Chris@912 238 </ul>
Chris@912 239
Chris@912 240 <pre>
Chris@912 241 # First Level Numbering
Chris@912 242 ## Second Level Numbering
Chris@912 243 ## Another Second Level Numbering
Chris@912 244 ### Third Level Numbering
Chris@912 245 ## Back to 2nd Level Numbering
Chris@912 246 # Back to 1st Level Numbering
Chris@912 247 </pre>
Chris@912 248
Chris@912 249 <ol>
Chris@912 250 <li>First Level Numbering</li>
Chris@912 251 <ol>
Chris@912 252 <li>Second Level Numbering</li>
Chris@912 253 <li>Another Second Level Numbering</li>
Chris@912 254 <ol>
Chris@912 255 <li>Third Level Numbering</li>
Chris@912 256 </ol>
Chris@912 257 <li>Back to 2nd Level Numbering</li>
Chris@912 258 </ol>
Chris@912 259 <li>Back to 1st Level Numbering</li>
Chris@912 260 </ol>
Chris@912 261
Chris@912 262 <pre>
Chris@912 263 # First Level Numbering
Chris@912 264 #* Bullet inside numbering environment
Chris@912 265 #* Another Bullet inside numbering environment
Chris@912 266 # Back to 1st Level Numbering
Chris@912 267 </pre>
Chris@912 268
Chris@912 269 <ol>
Chris@912 270 <li>First Level Numbering</li>
Chris@912 271 <ul>
Chris@912 272 <li>Bullet inside numbering environment</li>
Chris@912 273 <li>Another Bullet inside numbering environment</li>
Chris@912 274 </ul>
Chris@912 275
Chris@912 276 <li>Back to 1st Level Numbering</li>
Chris@912 277 </ol>
Chris@912 278
Chris@912 279
Chris@912 280
Chris@912 281
Chris@912 282
Chris@912 283
Chris@912 284
Chris@909 285 <h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
Chris@909 286
Chris@909 287 <pre>
Chris@909 288 p>. right aligned
Chris@909 289 p=. centered
Chris@909 290 </pre>
Chris@909 291
Chris@909 292 <p style="text-align:center;">This is a centered paragraph.</p>
Chris@909 293
Chris@909 294
Chris@909 295 <h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
Chris@909 296
Chris@909 297 <p>Start the paragraph with <strong>bq.</strong></p>
Chris@909 298
Chris@909 299 <pre>
Chris@909 300 bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
Chris@909 301 To go live, all you need to add is a database and a web server.
Chris@909 302 </pre>
Chris@909 303
Chris@909 304 <p>Display:</p>
Chris@909 305
Chris@909 306 <blockquote>
Chris@909 307 <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 308 </blockquote>
Chris@909 309
Chris@909 310
Chris@909 311 <h3><a name="11" class="wiki-page"></a>Table of content</h3>
Chris@909 312
Chris@909 313 <pre>
Chris@909 314 {{toc}} => left aligned toc
Chris@909 315 {{>toc}} => right aligned toc
Chris@909 316 </pre>
Chris@909 317
Chris@909 318 <h2><a name="12" class="wiki-page"></a>Macros</h2>
Chris@909 319
Chris@909 320 <p>Redmine has the following builtin macros:</p>
Chris@909 321
Chris@909 322 <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 323
Chris@909 324 <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 325
Chris@909 326
Chris@909 327 <h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
Chris@909 328
Chris@909 329 <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 330
Chris@909 331 <p>You can highlight code in your wiki page using this syntax:</p>
Chris@909 332
Chris@909 333 <pre>
Chris@909 334 &lt;pre&gt;&lt;code class="ruby"&gt;
Chris@909 335 Place you code here.
Chris@909 336 &lt;/code&gt;&lt;/pre&gt;
Chris@909 337 </pre>
Chris@909 338
Chris@909 339 <p>Example:</p>
Chris@909 340
Chris@909 341 <pre><code class="ruby syntaxhl"><span class="line-numbers"> 1</span> <span class="comment"># The Greeter class</span>
Chris@909 342 <span class="line-numbers"> 2</span> <span class="reserved">class</span> <span class="class">Greeter</span>
Chris@909 343 <span class="line-numbers"> 3</span> <span class="reserved">def</span> <span class="function">initialize</span>(name)
Chris@909 344 <span class="line-numbers"> 4</span> <span class="instance-variable">@name</span> = name.capitalize
Chris@909 345 <span class="line-numbers"> 5</span> <span class="reserved">end</span>
Chris@909 346 <span class="line-numbers"> 6</span>
Chris@909 347 <span class="line-numbers"> 7</span> <span class="reserved">def</span> <span class="function">salute</span>
Chris@909 348 <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 349 <span class="line-numbers"> 9</span> <span class="reserved">end</span>
Chris@909 350 <span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
Chris@909 351 </pre>
Chris@909 352 </body>
Chris@909 353 </html>