RedmineTextFormattingMarkdown » History » Version 8
  Hans Ginzel, 2015-12-07 15:39 
  Unordered lists converted to Markdown
| 1 | 1 | Hans Ginzel | h1. Markdown formatting  | 
|---|---|---|---|
| 2 | |||
| 3 | Below is copy of *Textile* formatting that needs to be updated to *Markdown* formatting. Please help.  | 
||
| 4 | For *Markdown* formatting see #15520 and #16373.  | 
||
| 5 | |||
| 6 | {{>TOC}} | 
||
| 7 | |||
| 8 | h2. Links  | 
||
| 9 | |||
| 10 | h3. Redmine links  | 
||
| 11 | |||
| 12 | Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere text formatting is used.  | 
||
| 13 | |||
| 14 | * Link to an issue: *!#124* (displays #124, link is striked-through if the issue is closed)  | 
||
| 15 | * Link to an issue note: *!#124-6*, or *!#124!#note-6*  | 
||
| 16 | * Link to a changeset: *!r758* (displays r758)  | 
||
| 17 | * Link to a changeset with a non-numeric hash: *commit:c6f4d0fd* (displays c6f4d0fd).  | 
||
| 18 | |||
| 19 | Wiki links:  | 
||
| 20 | |||
| 21 | * *[[Guide]]* displays a link to the page named 'Guide': [[Guide]]  | 
||
| 22 | * *[[Guide|User manual]]* displays a link to the same page but with different text: [[Guide|User manual]]  | 
||
| 23 | * *[[Guide#User-guide|User guide]]* displays a link to the header on the same page with different text: [[Guide#User-guide|User guide]]  | 
||
| 24 | |||
| 25 | You can also link to pages of another project's wiki (using the project identifier):  | 
||
| 26 | |||
| 27 | * *[[sandbox:some page]]* displays a link to the page named 'Some page' of the Sandbox wiki  | 
||
| 28 | * *[[sandbox:]]* displays a link to the Sandbox wiki main page  | 
||
| 29 | |||
| 30 | Wiki links are displayed in red if the page doesn't exist yet, eg: [[Nonexistent page]].  | 
||
| 31 | |||
| 32 | Links to others resources:  | 
||
| 33 | |||
| 34 | * Documents:  | 
||
| 35 | |||
| 36 | * *!document#17* (link to document with id 17)  | 
||
| 37 | * *!document:Greetings* (link to the document with title "Greetings")  | 
||
| 38 | * *!document:"Some document"* (double quotes can be used when document title contains spaces)  | 
||
| 39 | * *!sandbox:document:"Some document"* (link to a document with title "Some document" in project identifier "sandbox")  | 
||
| 40 | |||
| 41 | * Versions:  | 
||
| 42 | |||
| 43 | * *!version#3* (link to version with id 3)  | 
||
| 44 | * *!version:1.0.0* (link to version named "1.0.0")  | 
||
| 45 | * *!version:"1.0 beta 2"* (double quotes can be used when version name contains spaces)  | 
||
| 46 | * *!sandbox:version:1.0.0* (link to version "1.0.0" in the project identifier "sandbox")  | 
||
| 47 | |||
| 48 | * Attachments:  | 
||
| 49 | |||
| 50 | * *!attachment:file.zip* (link to the attachment of the current object named file.zip)  | 
||
| 51 | * *!attachment:"file.zip"* (double quotes can be used when the filename contains non word characters)  | 
||
| 52 | * 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)  | 
||
| 53 | |||
| 54 | * Changesets:  | 
||
| 55 | |||
| 56 | * *!r758* (link to a changeset)  | 
||
| 57 | * *!commit:c6f4d0fd* (link to a changeset with a non-numeric hash)  | 
||
| 58 | * *!svn1|r758* (link to a changeset of a specific repository, for projects with multiple repositories)  | 
||
| 59 | * *!commit:hg|c6f4d0fd* (link to a changeset with a non-numeric hash of a specific repository)  | 
||
| 60 | * *!sandbox:r758* (link to a changeset of another project)  | 
||
| 61 | * *!sandbox:commit:c6f4d0fd* (link to a changeset with a non-numeric hash of another project identifier)  | 
||
| 62 | |||
| 63 | * Repository files:  | 
||
| 64 | |||
| 65 | * *!source:some/file* -- Link to the file located at /some/file in the project's repository  | 
||
| 66 | * *!source:some/file@52* -- Link to the file's revision 52  | 
||
| 67 | * *!source:some/file#L120* -- Link to line 120 of the file  | 
||
| 68 | * *!source:some/file@52#L120* -- Link to line 120 of the file's revision 52  | 
||
| 69 | * *!source:"some file@52#L120"* -- Double quotes can be used when the URL contains spaces  | 
||
| 70 | * *!source:repo_identifier|some/file* -- Link to a file in a repository other than the project default repository.  | 
||
| 71 | * *!source:"repo_identifier|some file"* -- Link to a file in a repository other than the project default repository, with spaces in the path.  | 
||
| 72 | * *!export:some/file* -- Force the download of the file  | 
||
| 73 | |||
| 74 | * Forums:  | 
||
| 75 | |||
| 76 | * *!forum#2* (link to forum with id 2)  | 
||
| 77 | * *!forum:Discussion* (link to forum with name "Discussion")  | 
||
| 78 | * *!forum:"Help and more"* (double quotes can be used when forum name contains spaces)  | 
||
| 79 | |||
| 80 | * Forum messages:  | 
||
| 81 | |||
| 82 | * *!message#1218* (link to message with id 1218)  | 
||
| 83 | |||
| 84 | * News items  | 
||
| 85 | |||
| 86 | * *!news#1* (link to news item with id 1)  | 
||
| 87 | * *!news:Greetings* (link to news item with name "Greetings")  | 
||
| 88 | * *!news:"eCookbook first release !"* (double quotes can be used when news item name contains spaces)  | 
||
| 89 | |||
| 90 | * Projects:  | 
||
| 91 | |||
| 92 | * *!project#3* (link to project with id 3)  | 
||
| 93 | * *!project:someproject* (link to project with name "someproject")  | 
||
| 94 | * *!project:"Multiple words project"* (double quotes can be used when project name contains spaces)  | 
||
| 95 | |||
| 96 | Escaping:  | 
||
| 97 | |||
| 98 | * You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !  | 
||
| 99 | |||
| 100 | h3. External links  | 
||
| 101 | |||
| 102 | HTTP URLs are automatically turned into clickable links:  | 
||
| 103 | * *http://www.redmine.org* -- External link to the redmine website: http://www.redmine.org  | 
||
| 104 | * *someone@foo.bar* -- Link to an email address: someone@foo.bar  | 
||
| 105 | |||
| 106 | HTTP URLs can also use different text than the link itself:  | 
||
| 107 | 2 | Hans Ginzel | * *[Redmine web site](http://www.redmine.org)* -- External link with different text: "Redmine web site":http://www.redmine.org  | 
| 108 | * *[](http://www.redmine.org)* -- External image with a title that links to an URL:  | 
||
| 109 | 1 | Hans Ginzel | |
| 110 | p=. !http://www.redmine.org/attachments/7069/Redmine_logo.png(Redmine web site)!:http://www.redmine.org  | 
||
| 111 | |||
| 112 | h3. Email addresses  | 
||
| 113 | |||
| 114 | Email addresses are automatically turned into clickable links:  | 
||
| 115 | |||
| 116 | 3 | Hans Ginzel | * *[Email someone](mailto:someone@foo.bar)* -- Email link with different text: "Email someone":mailto:someone@foo.bar  | 
| 117 | 1 | Hans Ginzel | |
| 118 | More complex email instructions can be added to an email link. A default subject, default body and CC information can be defined. Note that spaces in any of these fields need to be replaced with the code %20.  | 
||
| 119 | 3 | Hans Ginzel | * *[Email webmaster and admin](mailto:webmaster@foo.bar?cc=admin@foo.bar)* -- Email to webmaster, CC admin: "Email webmaster and admin":mailto:webmaster@foo.bar?cc=admin@foo.bar  | 
| 120 | * *[Email someone for help](mailto:someone@foo.bar?subject=Website%20Help)* -- Email link with the subject "Website Help": "Email someone for help":mailto:someone@foo.bar?subject=Website%20Help  | 
||
| 121 | * *[Email someone for help](mailto:someone@foo.bar?subject=Website%20Help&body=My%20problem%20is%20)* -- Email link with the subject "Website Help" and a default body: "Email someone for help":mailto:someone@foo.bar?subject=Website%20Help&body=My%20problem%20is%20  | 
||
| 122 | 1 | Hans Ginzel | |
| 123 | h2. Text formatting  | 
||
| 124 | |||
| 125 | 4 | Hans Ginzel | For things such as headlines, bold, tables, lists, Redmine supports "Markdown syntax":http://en.wikipedia.org/wiki/Markdown. See http://daringfireball.net/projects/markdown/syntax, http://agea.github.io/tutorial.md/, http://stackoverflow.com/editing-help for information on using any of these features. A few samples are included below, but the engine is capable of much more of that. For conversions see "Pandoc":http://pandoc.org. The "Redcarpet formatter":https://github.com/alminium/redmine_redcarpet_formatter is used.  | 
| 126 | 1 | Hans Ginzel | |
| 127 | h3. Acronym  | 
||
| 128 | 4 | Hans Ginzel | |
| 129 | ?? in Markdown  | 
||
| 130 | 1 | Hans Ginzel | |
| 131 | <pre>  | 
||
| 132 | JPL(Jean-Philippe Lang)  | 
||
| 133 | </pre>  | 
||
| 134 | |||
| 135 | Display:  | 
||
| 136 | |||
| 137 | JPL(Jean-Philippe Lang)  | 
||
| 138 | |||
| 139 | h3. Font style  | 
||
| 140 | |||
| 141 | 5 | Hans Ginzel | <pre><code>* **bold** __bold__  | 
| 142 | * *italic* _italic_  | 
||
| 143 | * ***bold italic*** ___bold italic___  | 
||
| 144 | * <ins>underline</ins>  | 
||
| 145 | * <del>strike through</del>  | 
||
| 146 | * Plain <sup>superscript</sup>  | 
||
| 147 | * Plain <sub>subscript</sub>  | 
||
| 148 | * `inline monospace`  | 
||
| 149 | * normal **bold** _italic_ normal;E=mc<sup>2</sup>  | 
||
| 150 | 1 | Hans Ginzel | * <notextile>normal<notextile></notextile>*bold*<notextile></notextile>_italic_<notextile></notextile>normal;E=mc<notextile></notextile>^2^</notextile>  | 
| 151 | * <notextile>Escaping: <notextile>*bold* _italic_ @inlinemono@</notextile>       Alternative using HTML-codes: *bold* _italic_ @inlinemono@</notextile>  | 
||
| 152 | * <notextile><pre>*some lines* some "link":http://www.redmine.org</pre></notextile>  | 
||
| 153 | * <notextile><pre><notextile></notextile>*some lines* some "link":http://www.redmine.org</pre></notextile>  | 
||
| 154 | </code></pre>  | 
||
| 155 | |||
| 156 | Display:  | 
||
| 157 | |||
| 158 | 5 | Hans Ginzel | * *bold* *bold*  | 
| 159 | * _italic_ _italic_  | 
||
| 160 | * *_bold italic_* *_bold italic_*  | 
||
| 161 | 1 | Hans Ginzel | * +underline+  | 
| 162 | * -strike-through-  | 
||
| 163 | * Plain ^superscript^  | 
||
| 164 | * Plain ~subscript~  | 
||
| 165 | * @inline monospace@  | 
||
| 166 | * normal *bold* _italic_ normal;E=mc ^2^  | 
||
| 167 | * normal<notextile></notextile>*bold*<notextile></notextile>_italic_<notextile></notextile>normal;E=mc<notextile></notextile>^2^  | 
||
| 168 | * Escaping: <notextile>*bold* _italic_ @inlinemono@</notextile>       Alternative using HTML-codes: *bold* _italic_ @inlinemono@  | 
||
| 169 | * <pre>*some lines* some "link":http://www.redmine.org</pre>  | 
||
| 170 | * <pre><notextile></notextile>*some lines* some "link":http://www.redmine.org</pre>  | 
||
| 171 | |||
| 172 | h3. Colour  | 
||
| 173 | |||
| 174 | <pre><code><notextile>* %{color:red}red% %{color:green}green% %{color:yellow}yellow% %{color:#82B6E1}blue'ish% | 
||
| 175 | * %{color:red}red%<notextile></notextile>%{color:green}green%<notextile></notextile>%{color:yellow}yellow%<notextile></notextile>%{color:#82B6E1}blue'ish% | 
||
| 176 | * %{background:lightgreen}Lightgreen Background% %{background:yellow}Yellow Background% | 
||
| 177 | * %{background:lightgreen}Lightgreen Background%<notextile></notextile>%{background:yellow}Yellow Background% | 
||
| 178 | </notextile></code></pre>  | 
||
| 179 | |||
| 180 | Display:  | 
||
| 181 | |||
| 182 |  * %{color:red}red% %{color:green}green% %{color:yellow}yellow% %{color:#82B6E1}blue'ish% | 
||
| 183 |  * %{color:red}red%<notextile></notextile>%{color:green}green%<notextile></notextile>%{color:yellow}yellow%<notextile></notextile>%{color:#82B6E1}blue'ish% | 
||
| 184 |  * %{background:lightgreen}Lightgreen Background% %{background:yellow}Yellow Background% | 
||
| 185 |  * %{background:lightgreen}Lightgreen Background%<notextile></notextile>%{background:yellow}Yellow Background% | 
||
| 186 | |||
| 187 | h3. Inline images  | 
||
| 188 | |||
| 189 | 6 | Hans Ginzel | * ** displays an image located at image_url (textile syntax)  | 
| 190 | * ** right floating image, see http://stackoverflow.com/questions/255170/markdown-and-image-alignment  | 
||
| 191 | * ** displays an image with an alt/title attribute  | 
||
| 192 | 1 | Hans Ginzel | * *!image_url!:URL* displays an image located at image_url with link URL added  | 
| 193 | |||
| 194 | If you have an image attached to your wiki page, it can be displayed inline using its filename: *!attached_image.png!*  | 
||
| 195 | |||
| 196 | You can also apply a CSS style to the image in the same ways as styling SPANs. The code *!{width: 100%}attached_image.png!* will make the image adjusts to the parent's width. | 
||
| 197 | |||
| 198 | h3. Headings  | 
||
| 199 | |||
| 200 | 7 | Hans Ginzel | <pre><code># Heading  | 
| 201 | 1 | Hans Ginzel | |
| 202 | 7 | Hans Ginzel | ## Subheading  | 
| 203 | 1 | Hans Ginzel | |
| 204 | 7 | Hans Ginzel | ### Subheading  | 
| 205 | |||
| 206 | or  | 
||
| 207 | |||
| 208 | Heading  | 
||
| 209 | =======  | 
||
| 210 | |||
| 211 | Subheading  | 
||
| 212 | ----------  | 
||
| 213 | 1 | Hans Ginzel | </code></pre>  | 
| 214 | |||
| 215 | Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.  | 
||
| 216 | |||
| 217 | h3. Paragraphs  | 
||
| 218 | |||
| 219 | <pre><code>p. left aligned  | 
||
| 220 | |||
| 221 | p(. left ident 1em  | 
||
| 222 | |||
| 223 | p((. left ident 2em  | 
||
| 224 | as well as for following lines  | 
||
| 225 | |||
| 226 | p>. right aligned  | 
||
| 227 | |||
| 228 | p)))>. right ident 3em  | 
||
| 229 | |||
| 230 | p=. This is centered paragraph.  | 
||
| 231 | </code></pre>  | 
||
| 232 | |||
| 233 | h3. Horizontal rule  | 
||
| 234 | |||
| 235 | @----@  | 
||
| 236 | Display:  | 
||
| 237 | |||
| 238 | ----  | 
||
| 239 | |||
| 240 | |||
| 241 | h3. Predefined  | 
||
| 242 | |||
| 243 | To escape wiki syntax  | 
||
| 244 | <pre> <pre> *Your text won't become bold* </pre> </pre>  | 
||
| 245 | Display:  | 
||
| 246 | |||
| 247 | <pre> *Your text won't become bold* </pre>  | 
||
| 248 | |||
| 249 | h3. Blockquotes  | 
||
| 250 | |||
| 251 | Start the paragraph with *bq.*:  | 
||
| 252 | |||
| 253 | <pre><code>bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.  | 
||
| 254 | To go live, all you need to add is a database and a web server.  | 
||
| 255 | </code></pre>  | 
||
| 256 | |||
| 257 | Displays:  | 
||
| 258 | |||
| 259 | bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.  | 
||
| 260 | To go live, all you need to add is a database and a web server.  | 
||
| 261 | |||
| 262 | You can also use > at the beginning of each line and stack them for nested quotes:  | 
||
| 263 | |||
| 264 | <pre>  | 
||
| 265 | >> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.  | 
||
| 266 | >> To go live, all you need to add is a database and a web server.  | 
||
| 267 | > Great!  | 
||
| 268 | </pre>  | 
||
| 269 | |||
| 270 | Displays:  | 
||
| 271 | |||
| 272 | >> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.  | 
||
| 273 | >> To go live, all you need to add is a database and a web server.  | 
||
| 274 | > Great!  | 
||
| 275 | |||
| 276 | h3. Unordered lists  | 
||
| 277 | |||
| 278 | <pre>  | 
||
| 279 | * Item 1  | 
||
| 280 | * Item 2  | 
||
| 281 | 8 | Hans Ginzel | * Item 21 (two spaces indentation)  | 
| 282 | * Item 22  | 
||
| 283 | 1 | Hans Ginzel | * Item 3  | 
| 284 | </pre>  | 
||
| 285 | |||
| 286 | displays:  | 
||
| 287 | |||
| 288 | * Item 1  | 
||
| 289 | * Item 2  | 
||
| 290 | ** Item 21  | 
||
| 291 | ** Item 22  | 
||
| 292 | * Item 3  | 
||
| 293 | |||
| 294 | h3. Ordered lists  | 
||
| 295 | |||
| 296 | <pre>  | 
||
| 297 | # Item 1  | 
||
| 298 | # Item 2  | 
||
| 299 | # Item 3  | 
||
| 300 | ## Item 3.1  | 
||
| 301 | ## Item 3.2  | 
||
| 302 | </pre>  | 
||
| 303 | |||
| 304 | displays:  | 
||
| 305 | |||
| 306 | # Item 1  | 
||
| 307 | # Item 2  | 
||
| 308 | # Item 3  | 
||
| 309 | ## Item 3.1  | 
||
| 310 | ## Item 3.2  | 
||
| 311 | |||
| 312 | h3. Tables  | 
||
| 313 | |||
| 314 | <pre>  | 
||
| 315 | |_.UserID |_.Name |_.Group |_. attribute list |  | 
||
| 316 | |Starting with | a | simple |row |  | 
||
| 317 | |\3=.IT |<. align left |  | 
||
| 318 | |1 |Artur Pirozhkov |/2.Users |>. align right |  | 
||
| 319 | |2 |Vasya Rogov |=. center |  | 
||
| 320 | |3 |John Smith |Admin  | 
||
| 321 | (root) |^. valign top |  | 
||
| 322 | |4 |- |Nobody  | 
||
| 323 | (anonymous) |~. valign bottom |  | 
||
| 324 | </pre>  | 
||
| 325 | |||
| 326 | displays (all multiple spaces are replaced by 1 space):  | 
||
| 327 | |||
| 328 | |_.UserID |_.Name |_.Group |_. attribute list |  | 
||
| 329 | |Starting with | a | simple |row |  | 
||
| 330 | |\3=.IT |<. align left |  | 
||
| 331 | |1 |Artur Pirozhkov |/2.Users |>. align right |  | 
||
| 332 | |2 |Vasya Rogov |=. center |  | 
||
| 333 | |3 |John Smith |Admin  | 
||
| 334 | (root) |^. valign top |  | 
||
| 335 | |4 |- |Nobody  | 
||
| 336 | (anonymous) |~. valign bottom |  | 
||
| 337 | |||
| 338 | If you want to include pipe characters inside your table (e.g. for Wiki links), you need to prevent textile from interpreting them:  | 
||
| 339 | |||
| 340 | |_.Input |_. Output|  | 
||
| 341 | |*<notextile><notextile>|</notextile></notextile>*|<notextile>|</notextile>|  | 
||
| 342 | |||
| 343 | h3. Table of content  | 
||
| 344 | |||
| 345 | <pre><code>{{toc}} => left aligned toc | 
||
| 346 | {{>toc}} => right aligned toc | 
||
| 347 | </code></pre>  | 
||
| 348 | |||
| 349 | Please keep in mind, that the toc-tag needs an empty line above and underneath it and no other text before and after it.  | 
||
| 350 | |||
| 351 | Example:  | 
||
| 352 | |||
| 353 | <pre><code>  | 
||
| 354 | h1. headLineOne  | 
||
| 355 | |||
| 356 | h2. something  | 
||
| 357 | |||
| 358 | {{toc}} | 
||
| 359 | |||
| 360 | h2. something more  | 
||
| 361 | </code></pre>  | 
||
| 362 | |||
| 363 | h2. Macros  | 
||
| 364 | |||
| 365 | Redmine includes a macros system that lets you add custom functions to insert dynamic content in formatted text. You can learn about writing your own macros in [[RedmineMacros]]. Redmine also includes a few builtin macros:  | 
||
| 366 | |||
| 367 | {{macro_list}} | 
||
| 368 | |||
| 369 | h2. Code highlighting  | 
||
| 370 | |||
| 371 | Code highlighting relies on "CodeRay":http://coderay.rubychan.de/, a fast syntax highlighting library written completely in Ruby. It currently supports C, C++, CSS, Delphi, Diff, Groovy, HTML, Java, Javascript, JSON, Nitro-XHTML, PHP, Python, RHTML, Ruby, Scheme, SQL, XML and YAML code.  | 
||
| 372 | |||
| 373 | You can highlight code in your wiki page using this syntax:  | 
||
| 374 | |||
| 375 | <pre><code><pre><code class="ruby">  | 
||
| 376 | Place your code here.  | 
||
| 377 | </code></pre>  | 
||
| 378 | </code></pre>  | 
||
| 379 | |||
| 380 | Example:  | 
||
| 381 | |||
| 382 | <pre><code class="ruby">  | 
||
| 383 | # The Greeter class  | 
||
| 384 | class Greeter  | 
||
| 385 | def initialize(name)  | 
||
| 386 | @name = name.capitalize  | 
||
| 387 | end  | 
||
| 388 | |||
| 389 | def salute  | 
||
| 390 |     puts "Hello #{@name}!" | 
||
| 391 | end  | 
||
| 392 | end  | 
||
| 393 | </code></pre>  | 
||
| 394 | |||
| 395 | h2. Textile formatting  | 
||
| 396 | |||
| 397 | Redmine supports textile formatting. For details see "Textile syntax":http://en.wikipedia.org/wiki/Textile_%28markup_language%29  | 
||
| 398 | |||
| 399 | Additional supported textiles:  | 
||
| 400 | * *<notextile>%</notextile>{background:lightgreen}Green Background%* displays %{background:lightgreen}Green Background% | 
||
| 401 | |||
| 402 | h2. Translation  | 
||
| 403 | |||
| 404 | Note that the following translations may not be up to date. Please refer to the original english documentation if needed.  | 
||
| 405 | |||
| 406 | * [[BrRedmineWikiFormatting|Português Brasileiro]]  | 
||
| 407 | * [[RusRedmineTextFormatting|Русский]]  | 
||
| 408 | * [[FrRedmineWikiFormatting|French]]  | 
||
| 409 | * [[KoreanWikiFormatting|Korean]]  | 
||
| 410 | * [[TurkishWikiFormatting|Türkçe]]  | 
||
| 411 | * [[TraditionalChineseWikiFormatting|繁體中文]]  | 
||
| 412 | * [[SimplifiedChineseWikiFormatting|简体中文]]  |