You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wiki_syntax_detailed_textile.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  3. <head>
  4. <title>RedmineWikiFormatting</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <link rel="stylesheet" type="text/css" href="../wiki_syntax_detailed.css" />
  7. </head>
  8. <body>
  9. <h1><a name="1" class="wiki-page"></a>Wiki formatting</h1>
  10. <h2><a name="2" class="wiki-page"></a>Links</h2>
  11. <h3><a name="3" class="wiki-page"></a>Redmine links</h3>
  12. <p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
  13. <ul>
  14. <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>
  15. <li>Link to an issue including tracker name and subject: <strong>##124</strong> (displays <a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (New)">Bug #124</a>: bulk edit doesn't change the category or fixed version properties)</li>
  16. <li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
  17. <li>Link to an issue note within the same issue: <strong>#note-6</strong></li>
  18. </ul>
  19. <p>Wiki links:</p>
  20. <ul>
  21. <li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
  22. <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>
  23. <li><strong>[[#further-reading]]</strong> link to the anchor "further-reading" of the current page: <a href="#" class="wiki-page">#further-reading</a></li>
  24. <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>
  25. </ul>
  26. <p>You can also link to pages of an other project wiki:</p>
  27. <ul>
  28. <li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
  29. <li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
  30. </ul>
  31. <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>
  32. <p>Links to other resources:</p>
  33. <ul>
  34. <li>Documents:
  35. <ul>
  36. <li><strong>document#17</strong> (link to document with id 17)</li>
  37. <li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
  38. <li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
  39. <li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
  40. </ul></li>
  41. </ul>
  42. <ul>
  43. <li>Versions:
  44. <ul>
  45. <li><strong>version#3</strong> (link to version with id 3)</li>
  46. <li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
  47. <li><strong>version:"1.0 beta 2"</strong></li>
  48. <li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
  49. </ul></li>
  50. </ul>
  51. <ul>
  52. <li>Attachments:
  53. <ul>
  54. <li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
  55. <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>
  56. </ul></li>
  57. </ul>
  58. <ul>
  59. <li>Changesets:
  60. <ul>
  61. <li><strong>r758</strong> (link to a changeset)</li>
  62. <li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
  63. <li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
  64. <li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
  65. <li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
  66. <li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
  67. </ul></li>
  68. </ul>
  69. <ul>
  70. <li>Repository files:
  71. <ul>
  72. <li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
  73. <li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
  74. <li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
  75. <li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
  76. <li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
  77. <li><strong>export:some/file</strong> (force the download of the file)</li>
  78. <li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
  79. <li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
  80. <li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
  81. </ul></li>
  82. </ul>
  83. <ul>
  84. <li>Forums:
  85. <ul>
  86. <li><strong>forum#1</strong> (link to forum with id 1</li>
  87. <li><strong>forum:Support</strong> (link to forum named Support)</li>
  88. <li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
  89. </ul></li>
  90. </ul>
  91. <ul>
  92. <li>Forum messages:
  93. <ul>
  94. <li><strong>message#1218</strong> (link to message with id 1218)</li>
  95. </ul></li>
  96. </ul>
  97. <ul>
  98. <li>Projects:
  99. <ul>
  100. <li><strong>project#3</strong> (link to project with id 3)</li>
  101. <li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
  102. <li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
  103. </ul></li>
  104. </ul>
  105. <ul>
  106. <li>News:
  107. <ul>
  108. <li><strong>news#2</strong> (link to news item with id 2)</li>
  109. <li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
  110. <li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
  111. </ul></li>
  112. </ul>
  113. <ul>
  114. <li>Users:
  115. <ul>
  116. <li><strong>user#2</strong> (link to user with id 2)</li>
  117. <li><strong>user:jsmith</strong> (Link to user with login jsmith)</li>
  118. <li><strong>@jsmith</strong> (Link to user with login jsmith)</li>
  119. </ul>
  120. </li>
  121. </ul>
  122. <p>Escaping:</p>
  123. <ul>
  124. <li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
  125. </ul>
  126. <h3><a name="4" class="wiki-page"></a>External links</h3>
  127. <p>URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:</p>
  128. <pre>
  129. http://www.redmine.org, someone@foo.bar
  130. </pre>
  131. <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>
  132. <p>If you want to display a specific text instead of the URL, you can use the standard textile syntax:</p>
  133. <pre>
  134. "Redmine web site":http://www.redmine.org
  135. </pre>
  136. <p>displays: <a href="http://www.redmine.org" class="external">Redmine web site</a></p>
  137. <h2><a name="5" class="wiki-page"></a>Text formatting</h2>
  138. <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>
  139. <h3><a name="6" class="wiki-page"></a>Font style</h3>
  140. <pre>
  141. * *bold*
  142. * _italic_
  143. * _*bold italic*_
  144. * +underline+
  145. * -strike-through-
  146. </pre>
  147. <p>Display:</p>
  148. <ul>
  149. <li><strong>bold</strong></li>
  150. <li><em>italic</em></li>
  151. <li><em><strong>bold italic</strong></em></li>
  152. <li><ins>underline</ins></li>
  153. <li><del>strike-through</del></li>
  154. </ul>
  155. <h3><a name="7" class="wiki-page"></a>Inline images</h3>
  156. <ul>
  157. <li><strong>!image_url!</strong> displays an image located at image_url (textile syntax)</li>
  158. <li><strong>!&gt;image_url!</strong> right floating image</li>
  159. <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>
  160. <li>Images in your computer's clipboard can be pasted directly using Ctrl-v or Command-v.</li>
  161. <li>Image files can be dragged onto the text area in order to be uploaded and embedded.</li>
  162. </ul>
  163. <h3><a name="8" class="wiki-page"></a>Headings</h3>
  164. <pre>
  165. h1. Heading
  166. h2. Subheading
  167. h3. Subsubheading
  168. </pre>
  169. <p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
  170. <h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
  171. <pre>
  172. p&gt;. right aligned
  173. p=. centered
  174. </pre>
  175. <p style="text-align:center;">This is a centered paragraph.</p>
  176. <h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
  177. <p>Start the paragraph with <strong>bq.</strong></p>
  178. <pre>
  179. bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
  180. To go live, all you need to add is a database and a web server.
  181. </pre>
  182. <p>Display:</p>
  183. <blockquote>
  184. <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>
  185. </blockquote>
  186. <h3><a name="11" class="wiki-page"></a>Table of content</h3>
  187. <pre>
  188. {{toc}} =&gt; left aligned toc
  189. {{&gt;toc}} =&gt; right aligned toc
  190. </pre>
  191. <h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
  192. <pre>
  193. ---
  194. </pre>
  195. <h2><a name="12" class="wiki-page"></a>Macros</h2>
  196. <p>Redmine has the following builtin macros:</p>
  197. <p>
  198. <dl>
  199. <dt><code>hello_world</code></dt>
  200. <dd><p>Sample macro.</p></dd>
  201. <dt><code>macro_list</code></dt>
  202. <dd><p>Displays a list of all available macros, including description if available.</p></dd>
  203. <dt><code>child_pages</code></dt>
  204. <dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
  205. <pre><code>{{child_pages}} -- can be used from a wiki page only
  206. {{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
  207. <dt><code>include</code></dt>
  208. <dd><p>Include a wiki page. Example:</p>
  209. <pre><code>{{include(Foo)}}</code></pre>
  210. <p>or to include a page of a specific project wiki:</p>
  211. <pre><code>{{include(projectname:Foo)}}</code></pre></dd>
  212. <dt><code>collapse</code></dt>
  213. <dd><p>Inserts of collapsed block of text. Example:</p>
  214. <pre><code>{{collapse(View details...)
  215. This is a block of text that is collapsed by default.
  216. It can be expanded by clicking a link.
  217. }}</code></pre></dd>
  218. <dt><code>thumbnail</code></dt>
  219. <dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
  220. <pre>{{thumbnail(image.png)}}
  221. {{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
  222. <dt><code>issue</code></dt>
  223. <dd><p>Inserts a link to an issue with flexible text. Examples:</p>
  224. <pre>{{issue(123)}} -- Issue #123: Enhance macro capabilities
  225. {{issue(123, project=true)}} -- Andromeda - Issue #123:Enhance macro capabilities
  226. {{issue(123, tracker=false)}} -- #123: Enhance macro capabilities
  227. {{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123</pre></dd>
  228. </dl>
  229. </p>
  230. <h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
  231. <p>Default code highlightment relies on <a href="http://rouge.jneen.net/" class="external">Rouge</a>, a syntax highlighting library written in pure Ruby. It supports many commonly used languages such as <strong>c</strong>, <strong>cpp</strong> (c++), <strong>csharp</strong> (c#, cs), <strong>css</strong>, <strong>diff</strong> (patch, udiff), <strong>go</strong> (golang), <strong>groovy</strong>, <strong>html</strong>, <strong>java</strong>, <strong>javascript</strong> (js), <strong>kotlin</strong>, <strong>objective_c</strong> (objc), <strong>perl</strong> (pl), <strong>php</strong>, <strong>python</strong> (py), <strong>r</strong>, <strong>ruby</strong> (rb), <strong>sass</strong>, <strong>scala</strong>, <strong>shell</strong> (bash, zsh, ksh, sh), <strong>sql</strong>, <strong>swift</strong>, <strong>xml</strong> and <strong>yaml</strong> (yml) languages, where the names inside parentheses are aliases. Please refer to <a href="https://www.redmine.org/projects/redmine/wiki/RedmineCodeHighlightingLanguages" class="external">https://www.redmine.org/projects/redmine/wiki/RedmineCodeHighlightingLanguages</a> for the full list of supported languages.</p>
  232. <p>You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):</p>
  233. <pre>
  234. &lt;pre&gt;&lt;code class="ruby"&gt;
  235. Place your code here.
  236. &lt;/code&gt;&lt;/pre&gt;
  237. </pre>
  238. <p>Example:</p>
  239. <pre><code class="ruby syntaxhl"><span class="c1"># The Greeter class</span>
  240. <span class="k">class</span> <span class="nc">Greeter</span>
  241. <span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
  242. <span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span><span class="p">.</span><span class="nf">capitalize</span>
  243. <span class="k">end</span>
  244. <span class="k">def</span> <span class="nf">salute</span>
  245. <span class="nb">puts</span> <span class="s2">"Hello </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
  246. <span class="k">end</span>
  247. <span class="k">end</span>
  248. </code></pre>
  249. </body>
  250. </html>