annotate public/help/wiki_syntax_detailed.html @ 929:5f33065ddc4b redmine-1.3

Update to Redmine SVN rev 9414 on 1.3-stable branch
author Chris Cannam
date Wed, 27 Jun 2012 14:54:18 +0100
parents cbb26bc654de
children 5e80956cc792 433d4f72a19b
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@909 203 <h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
Chris@909 204
Chris@909 205 <pre>
Chris@909 206 p>. right aligned
Chris@909 207 p=. centered
Chris@909 208 </pre>
Chris@909 209
Chris@909 210 <p style="text-align:center;">This is a centered paragraph.</p>
Chris@909 211
Chris@909 212
Chris@909 213 <h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
Chris@909 214
Chris@909 215 <p>Start the paragraph with <strong>bq.</strong></p>
Chris@909 216
Chris@909 217 <pre>
Chris@909 218 bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
Chris@909 219 To go live, all you need to add is a database and a web server.
Chris@909 220 </pre>
Chris@909 221
Chris@909 222 <p>Display:</p>
Chris@909 223
Chris@909 224 <blockquote>
Chris@909 225 <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 226 </blockquote>
Chris@909 227
Chris@909 228
Chris@909 229 <h3><a name="11" class="wiki-page"></a>Table of content</h3>
Chris@909 230
Chris@909 231 <pre>
Chris@909 232 {{toc}} => left aligned toc
Chris@909 233 {{>toc}} => right aligned toc
Chris@909 234 </pre>
Chris@909 235
Chris@909 236 <h2><a name="12" class="wiki-page"></a>Macros</h2>
Chris@909 237
Chris@909 238 <p>Redmine has the following builtin macros:</p>
Chris@909 239
Chris@909 240 <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 241
Chris@909 242 <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 243
Chris@909 244
Chris@909 245 <h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
Chris@909 246
Chris@909 247 <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 248
Chris@909 249 <p>You can highlight code in your wiki page using this syntax:</p>
Chris@909 250
Chris@909 251 <pre>
Chris@909 252 &lt;pre&gt;&lt;code class="ruby"&gt;
Chris@909 253 Place you code here.
Chris@909 254 &lt;/code&gt;&lt;/pre&gt;
Chris@909 255 </pre>
Chris@909 256
Chris@909 257 <p>Example:</p>
Chris@909 258
Chris@909 259 <pre><code class="ruby syntaxhl"><span class="line-numbers"> 1</span> <span class="comment"># The Greeter class</span>
Chris@909 260 <span class="line-numbers"> 2</span> <span class="reserved">class</span> <span class="class">Greeter</span>
Chris@909 261 <span class="line-numbers"> 3</span> <span class="reserved">def</span> <span class="function">initialize</span>(name)
Chris@909 262 <span class="line-numbers"> 4</span> <span class="instance-variable">@name</span> = name.capitalize
Chris@909 263 <span class="line-numbers"> 5</span> <span class="reserved">end</span>
Chris@909 264 <span class="line-numbers"> 6</span>
Chris@909 265 <span class="line-numbers"> 7</span> <span class="reserved">def</span> <span class="function">salute</span>
Chris@909 266 <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 267 <span class="line-numbers"> 9</span> <span class="reserved">end</span>
Chris@909 268 <span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
Chris@909 269 </pre>
Chris@909 270 </body>
Chris@909 271 </html>