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.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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. .CodeRay .af { color:#00C }
  21. .CodeRay .an { color:#007 }
  22. .CodeRay .av { color:#700 }
  23. .CodeRay .aw { color:#C00 }
  24. .CodeRay .bi { color:#509; font-weight:bold }
  25. .CodeRay .c { color:#666; }
  26. .CodeRay .ch { color:#04D }
  27. .CodeRay .ch .k { color:#04D }
  28. .CodeRay .ch .dl { color:#039 }
  29. .CodeRay .cl { color:#B06; font-weight:bold }
  30. .CodeRay .co { color:#036; font-weight:bold }
  31. .CodeRay .cr { color:#0A0 }
  32. .CodeRay .cv { color:#369 }
  33. .CodeRay .df { color:#099; font-weight:bold }
  34. .CodeRay .di { color:#088; font-weight:bold }
  35. .CodeRay .dl { color:black }
  36. .CodeRay .do { color:#970 }
  37. .CodeRay .ds { color:#D42; font-weight:bold }
  38. .CodeRay .e { color:#666; font-weight:bold }
  39. .CodeRay .en { color:#800; font-weight:bold }
  40. .CodeRay .er { color:#F00; background-color:#FAA }
  41. .CodeRay .ex { color:#F00; font-weight:bold }
  42. .CodeRay .fl { color:#60E; font-weight:bold }
  43. .CodeRay .fu { color:#06B; font-weight:bold }
  44. .CodeRay .gv { color:#d70; font-weight:bold }
  45. .CodeRay .hx { color:#058; font-weight:bold }
  46. .CodeRay .i { color:#00D; font-weight:bold }
  47. .CodeRay .ic { color:#B44; font-weight:bold }
  48. .CodeRay .il { background: #eee }
  49. .CodeRay .il .il { background: #ddd }
  50. .CodeRay .il .il .il { background: #ccc }
  51. .CodeRay .il .idl { font-weight: bold; color: #888 }
  52. .CodeRay .in { color:#B2B; font-weight:bold }
  53. .CodeRay .iv { color:#33B }
  54. .CodeRay .la { color:#970; font-weight:bold }
  55. .CodeRay .lv { color:#963 }
  56. .CodeRay .oc { color:#40E; font-weight:bold }
  57. .CodeRay .of { color:#000; font-weight:bold }
  58. .CodeRay .op { }
  59. .CodeRay .pc { color:#038; font-weight:bold }
  60. .CodeRay .pd { color:#369; font-weight:bold }
  61. .CodeRay .pp { color:#579 }
  62. .CodeRay .pt { color:#339; font-weight:bold }
  63. .CodeRay .r { color:#080; font-weight:bold }
  64. .CodeRay .rx { background-color:#fff0ff }
  65. .CodeRay .rx .k { color:#808 }
  66. .CodeRay .rx .dl { color:#404 }
  67. .CodeRay .rx .mod { color:#C2C }
  68. .CodeRay .rx .fu { color:#404; font-weight: bold }
  69. .CodeRay .s { background-color:#fff0f0 }
  70. .CodeRay .s .s { background-color:#ffe0e0 }
  71. .CodeRay .s .s .s { background-color:#ffd0d0 }
  72. .CodeRay .s .k { color:#D20 }
  73. .CodeRay .s .dl { color:#710 }
  74. .CodeRay .sh { background-color:#f0fff0 }
  75. .CodeRay .sh .k { color:#2B2 }
  76. .CodeRay .sh .dl { color:#161 }
  77. .CodeRay .sy { color:#A60 }
  78. .CodeRay .sy .k { color:#A60 }
  79. .CodeRay .sy .dl { color:#630 }
  80. .CodeRay .ta { color:#070 }
  81. .CodeRay .tf { color:#070; font-weight:bold }
  82. .CodeRay .ts { color:#D70; font-weight:bold }
  83. .CodeRay .ty { color:#339; font-weight:bold }
  84. .CodeRay .v { color:#036 }
  85. .CodeRay .xt { color:#444 }
  86. </style>
  87. </head>
  88. <body>
  89. <h1><a name="1" class="wiki-page"></a>Wiki formatting</h1>
  90. <h2><a name="2" class="wiki-page"></a>Links</h2>
  91. <h3><a name="3" class="wiki-page"></a>Redmine links</h3>
  92. <p>Redmine allows hyperlinking between issues, changesets and wiki pages from anywhere wiki formatting is used.</p>
  93. <ul>
  94. <li>Link to an issue: <strong>#124</strong> (displays <del><a href="/issues/show/124" 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>
  95. <li>Link to a changeset: <strong>r758</strong> (displays <a href="/repositories/revision/1?rev=758" class="changeset" title="Search engine now only searches objects the user is allowed to view.">r758</a>)</li>
  96. <li>Link to a changeset with a non-numeric hash: <strong>commit:"c6f4d0fd"</strong> (displays c6f4d0fd). Added in <a href="/repositories/revision/1?rev=1236" class="changeset" title="Merged Git support branch (r1200 to r1226).">r1236</a>.</li>
  97. </ul>
  98. <p>Wiki links:</p>
  99. <ul>
  100. <li><strong>&#91;&#91;Guide&#93;&#93;</strong> displays a link to the page named 'Guide': <a href="Guide.html" class="wiki-page">Guide</a></li>
  101. <li><strong>&#91;&#91;Guide|User manual&#93;&#93;</strong> displays a link to the same page but with a different text: <a href="Guide.html" class="wiki-page">User manual</a></li>
  102. </ul>
  103. <p>You can also link to pages of an other project wiki:</p>
  104. <ul>
  105. <li><strong>&#91;&#91;sandbox:some page&#93;&#93;</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
  106. <li><strong>&#91;&#91;sandbox:&#93;&#93;</strong> displays a link to the Sandbox wiki main page</li>
  107. </ul>
  108. <p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="Nonexistent_page.html" class="wiki-page new">Nonexistent page</a>.</p>
  109. <p>Links to others resources (0.7):</p>
  110. <ul>
  111. <li>Documents:
  112. <ul>
  113. <li><strong>document#17</strong> (link to document with id 17)</li>
  114. <li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
  115. <li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
  116. </ul></li>
  117. </ul>
  118. <ul>
  119. <li>Versions:
  120. <ul>
  121. <li><strong>version#3</strong> (link to version with id 3)</li>
  122. <li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
  123. <li><strong>version:"1.0 beta 2"</strong></li>
  124. </ul></li>
  125. </ul>
  126. <ul>
  127. <li>Attachments:
  128. <ul>
  129. <li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
  130. <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>
  131. </ul></li>
  132. </ul>
  133. <ul>
  134. <li>Repository files
  135. <ul>
  136. <li><strong>source:some/file</strong> -- Link to the file located at /some/file in the project's repository</li>
  137. <li><strong>source:some/file@52</strong> -- Link to the file's revision 52</li>
  138. <li><strong>source:some/file#L120</strong> -- Link to line 120 of the file</li>
  139. <li><strong>source:some/file@52#L120</strong> -- Link to line 120 of the file's revision 52</li>
  140. <li><strong>export:some/file</strong> -- Force the download of the file</li>
  141. </ul></li>
  142. </ul>
  143. <p>Escaping (0.7):</p>
  144. <ul>
  145. <li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
  146. </ul>
  147. <h3><a name="4" class="wiki-page"></a>External links</h3>
  148. <p>HTTP URLs and email addresses are automatically turned into clickable links:</p>
  149. <pre>
  150. http://www.redmine.org, someone@foo.bar
  151. </pre>
  152. <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>
  153. <p>If you want to display a specific text instead of the URL, you can use the standard textile syntax:</p>
  154. <pre>
  155. "Redmine web site":http://www.redmine.org
  156. </pre>
  157. <p>displays: <a href="http://www.redmine.org" class="external">Redmine web site</a></p>
  158. <h2><a name="5" class="wiki-page"></a>Text formatting</h2>
  159. <p>For things such as headlines, bold, tables, lists, Redmine supports Textile syntax. See <a class="external" href="http://hobix.com/textile/">http://hobix.com/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>
  160. <h3><a name="6" class="wiki-page"></a>Font style</h3>
  161. <pre>
  162. * *bold*
  163. * _italic_
  164. * _*bold italic*_
  165. * +underline+
  166. * -strike-through-
  167. </pre>
  168. <p>Display:</p>
  169. <ul>
  170. <li><strong>bold</strong></li>
  171. <li><em>italic</em></li>
  172. <li><em>*bold italic*</em></li>
  173. <li><ins>underline</ins></li>
  174. <li><del>strike-through</del></li>
  175. </ul>
  176. <h3><a name="7" class="wiki-page"></a>Inline images</h3>
  177. <ul>
  178. <li><strong>&#33;image_url&#33;</strong> displays an image located at image_url (textile syntax)</li>
  179. <li><strong>&#33;>image_url&#33;</strong> right floating image</li>
  180. <li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong>&#33;attached_image.png&#33;</strong></li>
  181. </ul>
  182. <h3><a name="8" class="wiki-page"></a>Headings</h3>
  183. <pre>
  184. h1. Heading
  185. h2. Subheading
  186. h3. Subheading
  187. </pre>
  188. <h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
  189. <pre>
  190. p&gt;. right aligned
  191. p=. centered
  192. </pre>
  193. <p style="text-align:center;">This is centered paragraph.</p>
  194. <h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
  195. <p>Start the paragraph with <strong>bq.</strong></p>
  196. <pre>
  197. bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
  198. To go live, all you need to add is a database and a web server.
  199. </pre>
  200. <p>Display:</p>
  201. <blockquote>
  202. <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>
  203. </blockquote>
  204. <h3><a name="11" class="wiki-page"></a>Table of content</h3>
  205. <pre>
  206. {{toc}} =&gt; left aligned toc
  207. {{&gt;toc}} =&gt; right aligned toc
  208. </pre>
  209. <h2><a name="12" class="wiki-page"></a>Macros</h2>
  210. <p>Redmine has the following builtin macros:</p>
  211. <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>
  212. <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>
  213. <h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
  214. <p>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, html, javascript, rhtml, ruby, scheme, xml languages.</p>
  215. <p>You can highlight code in your wiki page using this syntax:</p>
  216. <pre>
  217. &lt;pre&gt;&lt;code class="ruby"&gt;
  218. Place you code here.
  219. &lt;/code&gt;&lt;/pre&gt;
  220. </pre>
  221. <p>Example:</p>
  222. <pre><code class="ruby CodeRay"><span class="no"> 1</span> <span class="c"># The Greeter class</span>
  223. <span class="no"> 2</span> <span class="r">class</span> <span class="cl">Greeter</span>
  224. <span class="no"> 3</span> <span class="r">def</span> <span class="fu">initialize</span>(name)
  225. <span class="no"> 4</span> <span class="iv">@name</span> = name.capitalize
  226. <span class="no"> 5</span> <span class="r">end</span>
  227. <span class="no"> 6</span>
  228. <span class="no"> 7</span> <span class="r">def</span> <span class="fu">salute</span>
  229. <span class="no"> 8</span> puts <span class="s"><span class="dl">"</span><span class="k">Hello </span><span class="il"><span class="idl">#{</span><span class="iv">@name</span><span class="idl">}</span></span><span class="k">!</span><span class="dl">"</span></span>
  230. <span class="no"> 9</span> <span class="r">end</span>
  231. <span class="no"><strong>10</strong></span> <span class="r">end</span>
  232. </code>
  233. </pre>
  234. </body>
  235. </html>