RedmineTextFormattingMarkdown » History » Version 16
Hiroo Hayashi, 2016-07-23 06:12
The section "Redmine links" includes [[RedmineTextFormattingRedmineLinks]]. refs #16373
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 | 9 | Hans Ginzel | For *Markdown* formatting see #15520, #16373 and #21443. |
5 | 1 | Hans Ginzel | |
6 | {{>TOC}} |
||
7 | |||
8 | h2. Links |
||
9 | |||
10 | h3. Redmine links |
||
11 | |||
12 | 16 | Hiroo Hayashi | {{include(RedmineTextFormattingRedmineLinks)}} |
13 | 1 | Hans Ginzel | |
14 | h3. External links |
||
15 | |||
16 | HTTP URLs are automatically turned into clickable links: |
||
17 | * *http://www.redmine.org* -- External link to the redmine website: http://www.redmine.org |
||
18 | * *someone@foo.bar* -- Link to an email address: someone@foo.bar |
||
19 | |||
20 | HTTP URLs can also use different text than the link itself: |
||
21 | 2 | Hans Ginzel | * *[Redmine web site](http://www.redmine.org)* -- External link with different text: "Redmine web site":http://www.redmine.org |
22 | * *[![Redmine web site](http://www.redmine.org/attachments/7069/Redmine_logo.png)](http://www.redmine.org)* -- External image with a title that links to an URL: |
||
23 | 1 | Hans Ginzel | |
24 | p=. !http://www.redmine.org/attachments/7069/Redmine_logo.png(Redmine web site)!:http://www.redmine.org |
||
25 | |||
26 | h3. Email addresses |
||
27 | |||
28 | Email addresses are automatically turned into clickable links: |
||
29 | |||
30 | 3 | Hans Ginzel | * *[Email someone](mailto:someone@foo.bar)* -- Email link with different text: "Email someone":mailto:someone@foo.bar |
31 | 1 | Hans Ginzel | |
32 | 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. |
||
33 | 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 |
34 | * *[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 |
||
35 | * *[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 |
||
36 | 1 | Hans Ginzel | |
37 | h2. Text formatting |
||
38 | |||
39 | 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. |
40 | 1 | Hans Ginzel | |
41 | h3. Acronym |
||
42 | 4 | Hans Ginzel | |
43 | ?? in Markdown |
||
44 | 1 | Hans Ginzel | |
45 | <pre> |
||
46 | JPL(Jean-Philippe Lang) |
||
47 | </pre> |
||
48 | |||
49 | Display: |
||
50 | |||
51 | JPL(Jean-Philippe Lang) |
||
52 | |||
53 | h3. Font style |
||
54 | |||
55 | 5 | Hans Ginzel | <pre><code>* **bold** __bold__ |
56 | * *italic* _italic_ |
||
57 | * ***bold italic*** ___bold italic___ |
||
58 | * <ins>underline</ins> |
||
59 | * <del>strike through</del> |
||
60 | * Plain <sup>superscript</sup> |
||
61 | * Plain <sub>subscript</sub> |
||
62 | * `inline monospace` |
||
63 | * normal **bold** _italic_ normal;E=mc<sup>2</sup> |
||
64 | 1 | Hans Ginzel | * <notextile>normal<notextile></notextile>*bold*<notextile></notextile>_italic_<notextile></notextile>normal;E=mc<notextile></notextile>^2^</notextile> |
65 | * <notextile>Escaping: <notextile>*bold* _italic_ @inlinemono@</notextile> Alternative using HTML-codes: *bold* _italic_ @inlinemono@</notextile> |
||
66 | * <notextile><pre>*some lines* some "link":http://www.redmine.org</pre></notextile> |
||
67 | * <notextile><pre><notextile></notextile>*some lines* some "link":http://www.redmine.org</pre></notextile> |
||
68 | </code></pre> |
||
69 | |||
70 | Display: |
||
71 | |||
72 | 5 | Hans Ginzel | * *bold* *bold* |
73 | * _italic_ _italic_ |
||
74 | * *_bold italic_* *_bold italic_* |
||
75 | 1 | Hans Ginzel | * +underline+ |
76 | * -strike-through- |
||
77 | * Plain ^superscript^ |
||
78 | * Plain ~subscript~ |
||
79 | * @inline monospace@ |
||
80 | * normal *bold* _italic_ normal;E=mc ^2^ |
||
81 | * normal<notextile></notextile>*bold*<notextile></notextile>_italic_<notextile></notextile>normal;E=mc<notextile></notextile>^2^ |
||
82 | * Escaping: <notextile>*bold* _italic_ @inlinemono@</notextile> Alternative using HTML-codes: *bold* _italic_ @inlinemono@ |
||
83 | * <pre>*some lines* some "link":http://www.redmine.org</pre> |
||
84 | * <pre><notextile></notextile>*some lines* some "link":http://www.redmine.org</pre> |
||
85 | |||
86 | h3. Colour |
||
87 | |||
88 | <pre><code><notextile>* %{color:red}red% %{color:green}green% %{color:yellow}yellow% %{color:#82B6E1}blue'ish% |
||
89 | * %{color:red}red%<notextile></notextile>%{color:green}green%<notextile></notextile>%{color:yellow}yellow%<notextile></notextile>%{color:#82B6E1}blue'ish% |
||
90 | * %{background:lightgreen}Lightgreen Background% %{background:yellow}Yellow Background% |
||
91 | * %{background:lightgreen}Lightgreen Background%<notextile></notextile>%{background:yellow}Yellow Background% |
||
92 | </notextile></code></pre> |
||
93 | |||
94 | Display: |
||
95 | |||
96 | * %{color:red}red% %{color:green}green% %{color:yellow}yellow% %{color:#82B6E1}blue'ish% |
||
97 | * %{color:red}red%<notextile></notextile>%{color:green}green%<notextile></notextile>%{color:yellow}yellow%<notextile></notextile>%{color:#82B6E1}blue'ish% |
||
98 | * %{background:lightgreen}Lightgreen Background% %{background:yellow}Yellow Background% |
||
99 | * %{background:lightgreen}Lightgreen Background%<notextile></notextile>%{background:yellow}Yellow Background% |
||
100 | |||
101 | h3. Inline images |
||
102 | |||
103 | 6 | Hans Ginzel | * *![](image_url)* displays an image located at image_url (textile syntax) |
104 | * *![](image_url)* right floating image, see http://stackoverflow.com/questions/255170/markdown-and-image-alignment |
||
105 | * *![Image title](image_url)* displays an image with an alt/title attribute |
||
106 | 1 | Hans Ginzel | * *!image_url!:URL* displays an image located at image_url with link URL added |
107 | |||
108 | If you have an image attached to your wiki page, it can be displayed inline using its filename: *!attached_image.png!* |
||
109 | |||
110 | 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. |
||
111 | |||
112 | h3. Headings |
||
113 | |||
114 | 7 | Hans Ginzel | <pre><code># Heading |
115 | 1 | Hans Ginzel | |
116 | 7 | Hans Ginzel | ## Subheading |
117 | 1 | Hans Ginzel | |
118 | 7 | Hans Ginzel | ### Subheading |
119 | |||
120 | or |
||
121 | |||
122 | Heading |
||
123 | ======= |
||
124 | |||
125 | Subheading |
||
126 | ---------- |
||
127 | 1 | Hans Ginzel | </code></pre> |
128 | |||
129 | Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth. |
||
130 | |||
131 | h3. Paragraphs |
||
132 | |||
133 | <pre><code>p. left aligned |
||
134 | |||
135 | p(. left ident 1em |
||
136 | |||
137 | p((. left ident 2em |
||
138 | as well as for following lines |
||
139 | |||
140 | p>. right aligned |
||
141 | |||
142 | p)))>. right ident 3em |
||
143 | |||
144 | p=. This is centered paragraph. |
||
145 | </code></pre> |
||
146 | |||
147 | h3. Horizontal rule |
||
148 | |||
149 | @----@ |
||
150 | Display: |
||
151 | |||
152 | ---- |
||
153 | |||
154 | |||
155 | h3. Predefined |
||
156 | |||
157 | To escape wiki syntax |
||
158 | <pre> <pre> *Your text won't become bold* </pre> </pre> |
||
159 | Display: |
||
160 | |||
161 | <pre> *Your text won't become bold* </pre> |
||
162 | |||
163 | h3. Blockquotes |
||
164 | |||
165 | Start the paragraph with *bq.*: |
||
166 | |||
167 | <pre><code>bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
168 | To go live, all you need to add is a database and a web server. |
||
169 | </code></pre> |
||
170 | |||
171 | Displays: |
||
172 | |||
173 | bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
174 | To go live, all you need to add is a database and a web server. |
||
175 | |||
176 | You can also use > at the beginning of each line and stack them for nested quotes: |
||
177 | |||
178 | <pre> |
||
179 | >> 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 | > Great! |
||
182 | </pre> |
||
183 | |||
184 | Displays: |
||
185 | |||
186 | >> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
187 | >> To go live, all you need to add is a database and a web server. |
||
188 | > Great! |
||
189 | |||
190 | h3. Unordered lists |
||
191 | |||
192 | <pre> |
||
193 | * Item 1 |
||
194 | * Item 2 |
||
195 | 8 | Hans Ginzel | * Item 21 (two spaces indentation) |
196 | * Item 22 |
||
197 | 1 | Hans Ginzel | * Item 3 |
198 | </pre> |
||
199 | |||
200 | displays: |
||
201 | |||
202 | * Item 1 |
||
203 | * Item 2 |
||
204 | ** Item 21 |
||
205 | ** Item 22 |
||
206 | * Item 3 |
||
207 | |||
208 | h3. Ordered lists |
||
209 | |||
210 | <pre> |
||
211 | # Item 1 |
||
212 | # Item 2 |
||
213 | # Item 3 |
||
214 | 10 | Hans Ginzel | # Item 3.1 (two spaces) |
215 | # Item 3.2 |
||
216 | 1 | Hans Ginzel | </pre> |
217 | |||
218 | displays: |
||
219 | |||
220 | # Item 1 |
||
221 | # Item 2 |
||
222 | # Item 3 |
||
223 | ## Item 3.1 |
||
224 | ## Item 3.2 |
||
225 | |||
226 | h3. Tables |
||
227 | |||
228 | <pre> |
||
229 | |_.UserID |_.Name |_.Group |_. attribute list | |
||
230 | |Starting with | a | simple |row | |
||
231 | |\3=.IT |<. align left | |
||
232 | |1 |Artur Pirozhkov |/2.Users |>. align right | |
||
233 | |2 |Vasya Rogov |=. center | |
||
234 | |3 |John Smith |Admin |
||
235 | (root) |^. valign top | |
||
236 | |4 |- |Nobody |
||
237 | (anonymous) |~. valign bottom | |
||
238 | </pre> |
||
239 | |||
240 | displays (all multiple spaces are replaced by 1 space): |
||
241 | |||
242 | |_.UserID |_.Name |_.Group |_. attribute list | |
||
243 | |Starting with | a | simple |row | |
||
244 | |\3=.IT |<. align left | |
||
245 | |1 |Artur Pirozhkov |/2.Users |>. align right | |
||
246 | |2 |Vasya Rogov |=. center | |
||
247 | |3 |John Smith |Admin |
||
248 | (root) |^. valign top | |
||
249 | |4 |- |Nobody |
||
250 | (anonymous) |~. valign bottom | |
||
251 | |||
252 | If you want to include pipe characters inside your table (e.g. for Wiki links), you need to prevent textile from interpreting them: |
||
253 | |||
254 | |_.Input |_. Output| |
||
255 | |*<notextile><notextile>|</notextile></notextile>*|<notextile>|</notextile>| |
||
256 | |||
257 | h3. Table of content |
||
258 | |||
259 | <pre><code>{{toc}} => left aligned toc |
||
260 | {{>toc}} => right aligned toc |
||
261 | </code></pre> |
||
262 | |||
263 | Please keep in mind, that the toc-tag needs an empty line above and underneath it and no other text before and after it. |
||
264 | |||
265 | Example: |
||
266 | |||
267 | <pre><code> |
||
268 | h1. headLineOne |
||
269 | |||
270 | h2. something |
||
271 | |||
272 | {{toc}} |
||
273 | |||
274 | h2. something more |
||
275 | </code></pre> |
||
276 | |||
277 | h2. Macros |
||
278 | |||
279 | 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: |
||
280 | |||
281 | {{macro_list}} |
||
282 | |||
283 | 15 | Hugues C. | h2. Code highlighting |
284 | 1 | Hans Ginzel | |
285 | 11 | Hans Ginzel | Code highlighting relies on "CodeRay":http://coderay.rubychan.de/, a |
286 | fast syntax highlighting library written completely in Ruby. It |
||
287 | currently supports C, C++, CSS, Delphi, Diff, Groovy, HTML, Java, |
||
288 | Javascript, JSON, Nitro-XHTML, PHP, Python, RHTML, Ruby, Scheme, SQL, |
||
289 | XML and YAML code. |
||
290 | 1 | Hans Ginzel | |
291 | You can highlight code in your wiki page using this syntax: |
||
292 | |||
293 | 11 | Hans Ginzel | <pre><code>``` ruby |
294 | Place your code here. |
||
295 | ```</code></pre> |
||
296 | 1 | Hans Ginzel | |
297 | Example: |
||
298 | |||
299 | <pre><code class="ruby"> |
||
300 | # The Greeter class |
||
301 | class Greeter |
||
302 | def initialize(name) |
||
303 | @name = name.capitalize |
||
304 | end |
||
305 | |||
306 | def salute |
||
307 | puts "Hello #{@name}!" |
||
308 | end |
||
309 | end |
||
310 | </code></pre> |
||
311 | |||
312 | h2. Textile formatting |
||
313 | |||
314 | Redmine supports textile formatting. For details see "Textile syntax":http://en.wikipedia.org/wiki/Textile_%28markup_language%29 |
||
315 | |||
316 | Additional supported textiles: |
||
317 | * *<notextile>%</notextile>{background:lightgreen}Green Background%* displays %{background:lightgreen}Green Background% |
||
318 | |||
319 | h2. Translation |
||
320 | |||
321 | Note that the following translations may not be up to date. Please refer to the original english documentation if needed. |
||
322 | |||
323 | * [[BrRedmineWikiFormatting|Português Brasileiro]] |
||
324 | * [[RusRedmineTextFormatting|Русский]] |
||
325 | * [[FrRedmineWikiFormatting|French]] |
||
326 | * [[KoreanWikiFormatting|Korean]] |
||
327 | * [[TurkishWikiFormatting|Türkçe]] |
||
328 | * [[TraditionalChineseWikiFormatting|繁體中文]] |
||
329 | * [[SimplifiedChineseWikiFormatting|简体中文]] |