RedmineTextFormattingMarkdown » History » Version 3

Hans Ginzel, 2015-12-07 13:49
Email addresses converted to Markdown

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