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 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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. <style type="text/css">
  7. body { font:80% Verdana,Tahoma,Arial,sans-serif; }
  8. h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; }
  9. pre, code { font-size:120%; }
  10. pre code { font-size:100%; }
  11. pre {
  12. margin: 1em 1em 1em 1.6em;
  13. padding: 2px;
  14. background-color: #fafafa;
  15. border: 1px solid #dadada;
  16. width:95%;
  17. overflow-x: auto;
  18. }
  19. a.new { color: #b73535; }
  20. .syntaxhl .line-numbers { padding: 2px 4px 2px 4px; background-color: #eee; margin:0 }
  21. .syntaxhl .comment { color:#666; }
  22. .syntaxhl .class { color:#B06; font-weight:bold }
  23. .syntaxhl .delimiter { color:black }
  24. .syntaxhl .function { color:#06B; font-weight:bold }
  25. .syntaxhl .inline { background: #eee }
  26. .syntaxhl .inline .inline-delimiter { font-weight: bold; color: #888 }
  27. .syntaxhl .instance-variable { color:#33B }
  28. .syntaxhl .reserved { color:#080; font-weight:bold }
  29. .syntaxhl .string { background-color:#fff0f0; color: #D20; }
  30. .syntaxhl .string .delimiter { color:#710 }
  31. </style>
  32. </head>
  33. <body>
  34. <h1><a name="1" class="wiki-page"></a>Wiki formatting</h1>
  35. <h2><a name="2" class="wiki-page"></a>Links</h2>
  36. <h3><a name="3" class="wiki-page"></a>Redmine links</h3>
  37. <p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
  38. <ul>
  39. <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>
  40. <li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
  41. </ul>
  42. <p>Wiki links:</p>
  43. <ul>
  44. <li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
  45. <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>
  46. <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>
  47. </ul>
  48. <p>You can also link to pages of an other project wiki:</p>
  49. <ul>
  50. <li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
  51. <li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
  52. </ul>
  53. <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>
  54. <p>Links to other resources:</p>
  55. <ul>
  56. <li>Documents:
  57. <ul>
  58. <li><strong>document#17</strong> (link to document with id 17)</li>
  59. <li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
  60. <li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
  61. <li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
  62. </ul></li>
  63. </ul>
  64. <ul>
  65. <li>Versions:
  66. <ul>
  67. <li><strong>version#3</strong> (link to version with id 3)</li>
  68. <li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
  69. <li><strong>version:"1.0 beta 2"</strong></li>
  70. <li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
  71. </ul></li>
  72. </ul>
  73. <ul>
  74. <li>Attachments:
  75. <ul>
  76. <li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
  77. <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>
  78. </ul></li>
  79. </ul>
  80. <ul>
  81. <li>Changesets:
  82. <ul>
  83. <li><strong>r758</strong> (link to a changeset)</li>
  84. <li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
  85. <li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
  86. <li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
  87. <li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
  88. <li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
  89. </ul></li>
  90. </ul>
  91. <ul>
  92. <li>Repository files:
  93. <ul>
  94. <li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
  95. <li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
  96. <li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
  97. <li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
  98. <li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
  99. <li><strong>export:some/file</strong> (force the download of the file)</li>
  100. <li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
  101. <li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
  102. <li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
  103. </ul></li>
  104. </ul>
  105. <ul>
  106. <li>Forums:
  107. <ul>
  108. <li><strong>forum#1</strong> (link to forum with id 1</li>
  109. <li><strong>forum:Support</strong> (link to forum named Support)</li>
  110. <li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
  111. </ul></li>
  112. </ul>
  113. <ul>
  114. <li>Forum messages:
  115. <ul>
  116. <li><strong>message#1218</strong> (link to message with id 1218)</li>
  117. </ul></li>
  118. </ul>
  119. <ul>
  120. <li>Projects:
  121. <ul>
  122. <li><strong>project#3</strong> (link to project with id 3)</li>
  123. <li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
  124. <li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
  125. </ul></li>
  126. </ul>
  127. <ul>
  128. <li>News:
  129. <ul>
  130. <li><strong>news#2</strong> (link to news item with id 2)</li>
  131. <li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
  132. <li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
  133. </ul></li>
  134. </ul>
  135. <p>Escaping:</p>
  136. <ul>
  137. <li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
  138. </ul>
  139. <h3><a name="4" class="wiki-page"></a>External links</h3>
  140. <p>HTTP URLs and email addresses are automatically turned into clickable links:</p>
  141. <pre>
  142. http://www.redmine.org, someone@foo.bar
  143. </pre>
  144. <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>
  145. <p>If you want to display a specific text instead of the URL, you can use the standard textile syntax:</p>
  146. <pre>
  147. "Redmine web site":http://www.redmine.org
  148. </pre>
  149. <p>displays: <a href="http://www.redmine.org" class="external">Redmine web site</a></p>
  150. <h2><a name="5" class="wiki-page"></a>Text formatting</h2>
  151. <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>
  152. <h3><a name="6" class="wiki-page"></a>Font style</h3>
  153. <pre>
  154. * *bold*
  155. * _italic_
  156. * _*bold italic*_
  157. * +underline+
  158. * -strike-through-
  159. </pre>
  160. <p>Display:</p>
  161. <ul>
  162. <li><strong>bold</strong></li>
  163. <li><em>italic</em></li>
  164. <li><em><strong>bold italic</strong></em></li>
  165. <li><ins>underline</ins></li>
  166. <li><del>strike-through</del></li>
  167. </ul>
  168. <h3><a name="7" class="wiki-page"></a>Inline images</h3>
  169. <ul>
  170. <li><strong>!image_url!</strong> displays an image located at image_url (textile syntax)</li>
  171. <li><strong>!&gt;image_url!</strong> right floating image</li>
  172. <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>
  173. </ul>
  174. <h3><a name="8" class="wiki-page"></a>Headings</h3>
  175. <pre>
  176. h1. Heading
  177. h2. Subheading
  178. h3. Subsubheading
  179. </pre>
  180. <p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
  181. <h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
  182. <pre>
  183. p&gt;. right aligned
  184. p=. centered
  185. </pre>
  186. <p style="text-align:center;">This is a centered paragraph.</p>
  187. <h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
  188. <p>Start the paragraph with <strong>bq.</strong></p>
  189. <pre>
  190. bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
  191. To go live, all you need to add is a database and a web server.
  192. </pre>
  193. <p>Display:</p>
  194. <blockquote>
  195. <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>
  196. </blockquote>
  197. <h3><a name="11" class="wiki-page"></a>Table of content</h3>
  198. <pre>
  199. {{toc}} =&gt; left aligned toc
  200. {{&gt;toc}} =&gt; right aligned toc
  201. </pre>
  202. <h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
  203. <pre>
  204. ---
  205. </pre>
  206. <h2><a name="12" class="wiki-page"></a>Macros</h2>
  207. <p>Redmine has the following builtin macros:</p>
  208. <p>
  209. <dl>
  210. <dt><code>hello_world</code></dt>
  211. <dd><p>Sample macro.</p></dd>
  212. <dt><code>macro_list</code></dt>
  213. <dd><p>Displays a list of all available macros, including description if available.</p></dd>
  214. <dt><code>child_pages</code></dt>
  215. <dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
  216. <pre><code>{{child_pages}} -- can be used from a wiki page only
  217. {{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
  218. <dt><code>include</code></dt>
  219. <dd><p>Include a wiki page. Example:</p>
  220. <pre><code>{{include(Foo)}}</code></pre>
  221. <p>or to include a page of a specific project wiki:</p>
  222. <pre><code>{{include(projectname:Foo)}}</code></pre></dd>
  223. <dt><code>collapse</code></dt>
  224. <dd><p>Inserts of collapsed block of text. Example:</p>
  225. <pre><code>{{collapse(View details...)
  226. This is a block of text that is collapsed by default.
  227. It can be expanded by clicking a link.
  228. }}</code></pre></dd>
  229. <dt><code>thumbnail</code></dt>
  230. <dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
  231. <pre>{{thumbnail(image.png)}}
  232. {{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
  233. </dl>
  234. </p>
  235. <h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
  236. <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>
  237. <p>You can highlight code in your wiki page using this syntax:</p>
  238. <pre>
  239. &lt;pre&gt;&lt;code class="ruby"&gt;
  240. Place your code here.
  241. &lt;/code&gt;&lt;/pre&gt;
  242. </pre>
  243. <p>Example:</p>
  244. <pre><code class="ruby syntaxhl"><span class="line-numbers"> 1</span> <span class="comment"># The Greeter class</span>
  245. <span class="line-numbers"> 2</span> <span class="reserved">class</span> <span class="class">Greeter</span>
  246. <span class="line-numbers"> 3</span> <span class="reserved">def</span> <span class="function">initialize</span>(name)
  247. <span class="line-numbers"> 4</span> <span class="instance-variable">@name</span> = name.capitalize
  248. <span class="line-numbers"> 5</span> <span class="reserved">end</span>
  249. <span class="line-numbers"> 6</span>
  250. <span class="line-numbers"> 7</span> <span class="reserved">def</span> <span class="function">salute</span>
  251. <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>
  252. <span class="line-numbers"> 9</span> <span class="reserved">end</span>
  253. <span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
  254. </pre>
  255. </body>
  256. </html>