RedmineTextFormattingMarkdown » History » Version 27

Version 26 (Tuan-Tu Tran, 2020-04-16 17:25) → Version 27/31 (Go MAEDA, 2021-01-01 08:40)

h1. Markdown formatting

Below is *Markdown* formatting. For *Textile* formatting see [[RedmineTextFormattingTextile|Textile formatting]].
Currently HTML tags are not allowed by default. See #15520 and #20497 for details. For other limitations of the current *Markdown* formatting see #16373 and #21443.


h2. Links

h3. Redmine links


h3. External links

URLs (http, https, ftp and ftps) are automatically turned into clickable links:

* ** -- External link to the redmine website:

URLs can also use different text than the link itself:

* *[Redmine web site](* -- External link with different text: "Redmine web site":
* *[![Redmine web site](](* -- External image with a title that links to an URL:

p=. ! web site)!:

h3. Email addresses

Email addresses are automatically turned into clickable links:

* ** -- Link to an email address:
* *[Email someone](* -- Email link with different text: "Email someone"

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.
* *[Email webmaster and admin](* -- Email to webmaster, CC admin: "Email webmaster and admin"
* *[Email someone for help](* -- Email link with the subject "Website Help": "Email someone for help"
* *[Email someone for help](* -- Email link with the subject "Website Help" and a default body: "Email someone for help"

h2. Text formatting

For things such as headlines, bold, tables, lists, Redmine supports "Markdown syntax": See,, 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": The "Redcarpet formatter": is used.

h3. Acronym

Not supported by Markdown

h3. Font style

<pre><code>* **bold** __bold__
* *italic* _italic_
* ***bold italic*** ___bold italic___
* <ins>underline</ins>
* <del>strike through</del>
* Plain <sup>superscript</sup>
* Plain <sub>subscript</sub>
* `inline monospace`
* normal **bold** _italic_ normal;E=mc<sup>2</sup>
* normal<strong>bold</strong><em>italic</em>normal;E=mc<sup>2</sup>
* Escaping: \*\*bold\*\* \_italic\_ \`inlinemono\`
* <notextile><pre>**some lines** some [link](</pre></notextile>
* <notextile><pre>\*\*some lines\*\* some \[link](http\://www\.redmine\.org)</pre></notextile>


* *bold* *bold*
* _italic_ _italic_
* *_bold italic_* *_bold italic_*
* +underline+
* -strike-through-
* Plain ^superscript^
* Plain ~subscript~
* @inline monospace@
* normal *bold* _italic_ normal;E=mc<notextile></notextile>^2^
* normal<notextile></notextile>*bold*<notextile></notextile>_italic_<notextile></notextile>normal;E=mc<notextile></notextile>^2^
* Escaping: <notextile>**bold** _italic_ `inlinemono`</notextile>
* <pre><notextile></notextile>*some lines* some "link":</pre>
* <pre>**some lines** some [link](</pre>

**Note:** HTML tags need to be allowed to use the HTML tags (<strong>, <em>, <ins>, <del>, <sup>, <sub>). See #15520-16 and #15520-17 for details.

h3. Color

<pre><code><notextile>* <span style="color:red">red</span> <span style="color:green">green</span> <span style="color:yellow">yellow</span> <span style="color:#82B6E1">blue'ish</span>
* <span style="color:red">red</span><span style="color:green">green</span><span style="color:yellow">yellow</span><span style="color:#82B6E1">blue'ish</span>
* <span style="background-color:lightgreen">Lightgreen Background</span> <span style="background-color:yellow">Yellow Background</span>
* <span style="background-color:lightgreen">Lightgreen Background</span><span style="background-color:yellow">Yellow Background</span>


* %{color:red}red% %{color:green}green% %{color:yellow}yellow% %{color:#82B6E1}blue'ish%
* %{color:red}red%<notextile></notextile>%{color:green}green%<notextile></notextile>%{color:yellow}yellow%<notextile></notextile>%{color:#82B6E1}blue'ish%
* %{background:lightgreen}Lightgreen Background% %{background:yellow}Yellow Background%
* %{background:lightgreen}Lightgreen Background%<notextile></notextile>%{background:yellow}Yellow Background%

**Note:** HTML tags need to be allowed to use the HTML tag (<span>). See #15520-16 and #15520-17 for details.
More explicitly, you need to patch redmine, as explained in this "post":

h3. Inline images

* *![](image_url)* displays an image located at image_url (textile syntax)
* *![alt text](image_url "optional title")* displays an image with an alt/title attribute
* *[![](image_url)](URL)* displays an image located at image_url with link URL added

If you have an image attached to your wiki page, it can be displayed inline using its filename: *![](attached_image.png)*.

As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can use regular HTML <img> tags.

* <img style="float:right" src="URL"/>
* <img style="width:100%" src="attached_image.png"/>

**Note:** HTML tags need to be allowed to use the HTML tag (<img>). See #15520-16 and #15520-17 for details.

h3. Headings

<pre><code># Heading

## Subheading

### Subheading




Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.

h3. Paragraphs

Markdown does not support alignment of a paragraph. Use &lt;div> tags if you need it.

<pre><code>left aligned
<div style="padding-left:1em;">
left ident 1em

<div style="padding-left:2em;">
left ident 2em
as well as for following lines

<div style="text-align:right;">
right aligned

<div style="padding-right:3em;text-align:right;">
right ident 3em

<div style="text-align:center;">
This is centered paragraph.


p. left aligned

p(. left ident 1em

p((. left ident 2em
as well as for following lines

p>. right aligned

p)))>. right ident 3em

p=. This is centered paragraph.

**Note:** HTML tags need to be allowed to use the HTML tags (<div>). See #15520-16 and #15520-17 for details.

h3. Horizontal rule




h3. Preformatted Text

<pre> <pre>**Your text won't become bold**</pre> </pre>


<pre>**Your text won't become bold**</pre>

h3. Blockquotes

You can use > at the beginning of each line and stack them for nested quotes:

>> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
>> To go live, all you need to add is a database and a web server.
> Great!


>> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
>> To go live, all you need to add is a database and a web server.
> Great!

h3. Unordered lists

Unordered lists use asterisks (@*@), pluses (@+@), and hyphens (@-@) as list markers

* Item 1
* Item 2
* Item 21 (two spaces indentation)
* Item 22
* Item 3


* Item 1
* Item 2
** Item 21
** Item 22
* Item 3

h3. Ordered lists

Ordered lists use numbers followed by periods.

1. Item 1
3. Item 2
2. Item 3
1. Item 3.1 (two spaces)
1. Item 3.2


# Item 1
# Item 2
# Item 3
## Item 3.1
## Item 3.2

Note that the actual numbers you use to mark the list have no effect on the output.

h3. Tables

<pre> Markdown does not have syntax for a table. Use an HTML table to write a table.

&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;strong&gt;UserID&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;strong&gt;Group&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;strong&gt;attribute list&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Starting with&lt;/td&gt;&lt;td&gt;a&lt;/td&gt;&lt;td&gt;simple&lt;/td&gt;&lt;td&gt;row&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot; colspan=&quot;3&quot;&gt;IT&lt;/td&gt;&lt;td&gt;align left&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Artur Pirozhkov&lt;/td&gt;&lt;td rowspan=&quot;2&quot;&gt;Users&lt;/td&gt;&lt;td style=&quot;text-align:right;&quot;&gt;align right&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;Vasya Rogov&lt;/td&gt;&lt;td style=&quot;text-align:center;&quot;&gt;center&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td rowspan=&quot;2&quot;&gt;3&lt;/td&gt;&lt;td rowspan=&quot;2&quot;&gt;John Smith&lt;/td&gt;&lt;td&gt;Admin&lt;/td&gt;&lt;td style=&quot;vertical-align:top;&quot; rowspan=&quot;2&quot;&gt;valign top&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td rowspan=&quot;2&quot;&gt;4&lt;/td&gt;&lt;td rowspan=&quot;2&quot;&gt;-&lt;/td&gt;&lt;td&gt;Nobody&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;&quot; rowspan=&quot;2&quot;&gt;valign bottom&lt;/td&gt;&lt;/tr&gt;

|UserID (align right)|Name (align left)|Group (align center)| &lt;/table&gt;
|2 |John Smith


|=. *UserID* |=. *Name*
|=. *Group* |=. *attribute list* |
|Starting with
|3 |Dave Lopper |A Team
a | simple |row |
|4 |Robert Hill |B Team |\3=.IT |&lt;. align left |

displays (all multiple spaces are replaced by 1 space):

|_>. UserID (align right)|_<. Name (align left)|_=. Group (align center)|
|1 |Artur Pirozhkov |/2.Users |>. 2 |<. John Smith align right |
|2 |Vasya Rogov |=. center
|>. 3 |<. Dave Lopper |3 |John Smith |Admin
(root) |^. valign top
|_=. A Team |
|>. 4 |<. Robert Hill |_=. B Team |4 |- |Nobody
(anonymous) |~. valign bottom

**Note:** HTML tags need to be allowed to use the HTML tags (&lt;table&gt;, &lt;tr&gt;, &lt;td&gt;). See #15520-16 and #15520-17 for details.

h3. Table of content

<pre><code>{{toc}} => left aligned toc
{{>toc}} => right aligned toc

Please keep in mind, that the toc-tag needs an empty line above and underneath it and no other text before and after it.


<pre><code>h1. headLineOne

h2. something


h2. something more

h3. Footnotes

A footnote works very much like a reference-style link: it consists of a marker next to the text, e.g. <pre>This is a sentence.[^1]</pre> and a footnote definition on its own line anywhere within the document, e.g. <pre>[^1]: This is a footnote.</pre>

h2. Macros

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:


h2. Code highlighting

Default code highlightment relies on "Rouge":, a syntax highlighting library written in pure Ruby. It supports many commonly used languages such as *c*, *cpp* (c++), *csharp* (c#, cs), *css*, *diff* (patch, udiff), *go* (golang), *groovy*, *html*, *java*, *javascript* (js), *kotlin*, *objective_c* (objc), *perl* (pl), *php*, *python* (py), *r*, *ruby* (rb), *sass*, *scala*, *shell* (bash, zsh, ksh, sh), *sql*, *swift*, *xml* and *yaml* (yml) languages, where the names inside parentheses are aliases. Please refer to [[RedmineCodeHighlightingLanguages]] for the full list of supported languages.

You can highlight code in your wiki page using this syntax:

<pre><code>``` ruby
Place your code here.


<pre><code class="ruby">
# The Greeter class
class Greeter
def initialize(name)
@name = name.capitalize

def salute
puts "Hello #{@name}!"

h2. Translation

Note that the following translations may not be up to date. Please refer to the original english documentation if needed.

* [[BrRedmineWikiFormatting|Português Brasileiro]]
* [[RusRedmineTextFormatting|Русский]]
* [[FrRedmineWikiFormatting|French]]
* [[KoreanWikiFormatting|Korean]]
* [[TurkishWikiFormatting|Türkçe]]
* [[TraditionalChineseWikiFormatting|繁體中文]]
* [[SimplifiedChineseWikiFormatting|简体中文]]