RedmineTextFormatting » History » Version 4

Jean-Philippe Lang, 2007-12-07 21:32

1 1 Jean-Philippe Lang
h1. Wiki formatting
2 1 Jean-Philippe Lang
3 1 Jean-Philippe Lang
{{>TOC}}
4 1 Jean-Philippe Lang
5 1 Jean-Philippe Lang
Redmine supports "Textile":http://hobix.com/textile/ syntax for wikis and almost anything that has a text description (issues, news, messages, changesets...).
6 1 Jean-Philippe Lang
7 1 Jean-Philippe Lang
h2. Links
8 1 Jean-Philippe Lang
9 1 Jean-Philippe Lang
Redmine allows hyperlinking between issues, changesets and wiki pages from anywhere wiki formatting is used.
10 1 Jean-Philippe Lang
11 1 Jean-Philippe Lang
h3. Links to issues and changesets
12 1 Jean-Philippe Lang
13 1 Jean-Philippe Lang
* Link to an issue: #1
14 1 Jean-Philippe Lang
* Link to a changeset: r5
15 1 Jean-Philippe Lang
16 1 Jean-Philippe Lang
h3. Wiki links
17 1 Jean-Philippe Lang
18 1 Jean-Philippe Lang
* *[[Guide]]* displays a link to the page named 'Guide': [[Guide]]
19 3 Jean-Philippe Lang
* *[[Guide|User manual]]* displays a link to the same page but with a different text: [[Guide|User manual]]
20 1 Jean-Philippe Lang
21 1 Jean-Philippe Lang
You can also link to pages of an other project wiki:
22 1 Jean-Philippe Lang
23 3 Jean-Philippe Lang
* *[[sandbox:some page]]* displays a link to the page named 'Some page' of the Sandbox wiki
24 1 Jean-Philippe Lang
* *[[sandbox:]]* displays a link to the Sandbox wiki main page
25 1 Jean-Philippe Lang
26 3 Jean-Philippe Lang
Wiki links are displayed in red if the page doesn't exist yet, eg: [[Nonexistent page]].
27 1 Jean-Philippe Lang
28 1 Jean-Philippe Lang
h3. Links to an external URL
29 1 Jean-Philippe Lang
30 1 Jean-Philippe Lang
HTTP URLs and email addresses are automatically turned into clickable links: http://www.redmine.org, someone@foo.bar
31 1 Jean-Philippe Lang
32 1 Jean-Philippe Lang
h2. Text formatting
33 1 Jean-Philippe Lang
34 1 Jean-Philippe Lang
h3. Font style
35 1 Jean-Philippe Lang
36 1 Jean-Philippe Lang
<pre><code>* *bold*
37 1 Jean-Philippe Lang
* _italic_
38 1 Jean-Philippe Lang
* _*bold italic*_
39 1 Jean-Philippe Lang
* +underline+
40 1 Jean-Philippe Lang
* -strike-through-
41 1 Jean-Philippe Lang
</code></pre>
42 1 Jean-Philippe Lang
43 1 Jean-Philippe Lang
Display:
44 1 Jean-Philippe Lang
45 1 Jean-Philippe Lang
 * *bold*
46 1 Jean-Philippe Lang
 * _italic_
47 1 Jean-Philippe Lang
 * _*bold italic*_
48 1 Jean-Philippe Lang
 * +underline+
49 1 Jean-Philippe Lang
 * -strike-through-
50 1 Jean-Philippe Lang
51 1 Jean-Philippe Lang
h2. Inline images
52 1 Jean-Philippe Lang
53 1 Jean-Philippe Lang
* *&#33;image_url&#33;* displays an image located at image_url (textile syntax)
54 1 Jean-Philippe Lang
* *&#33;>image_url&#33;* right floating image
55 1 Jean-Philippe Lang
* If you have an image attached to your wiki page, it can be displayed inline using its filename: *&#33;attached_image.png&#33;*
56 1 Jean-Philippe Lang
57 1 Jean-Philippe Lang
58 1 Jean-Philippe Lang
h3. Headings
59 1 Jean-Philippe Lang
60 1 Jean-Philippe Lang
<pre><code>h1. Heading
61 1 Jean-Philippe Lang
h2. Subheading
62 1 Jean-Philippe Lang
h3. Subheading
63 1 Jean-Philippe Lang
</code></pre>
64 1 Jean-Philippe Lang
65 1 Jean-Philippe Lang
h3. Paragraphs
66 1 Jean-Philippe Lang
67 1 Jean-Philippe Lang
<pre><code>p>. right aligned
68 1 Jean-Philippe Lang
p=. centered
69 1 Jean-Philippe Lang
</code></pre>
70 1 Jean-Philippe Lang
71 2 Jean-Philippe Lang
p=. This is centered paragraph.
72 1 Jean-Philippe Lang
73 1 Jean-Philippe Lang
h3. Blockquotes
74 1 Jean-Philippe Lang
75 1 Jean-Philippe Lang
Start the paragraph with *bq.*
76 1 Jean-Philippe Lang
77 1 Jean-Philippe Lang
<pre><code>bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
78 1 Jean-Philippe Lang
To go live, all you need to add is a database and a web server.
79 1 Jean-Philippe Lang
</code></pre>
80 1 Jean-Philippe Lang
81 1 Jean-Philippe Lang
Display:
82 1 Jean-Philippe Lang
83 1 Jean-Philippe Lang
bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
84 1 Jean-Philippe Lang
To go live, all you need to add is a database and a web server.
85 1 Jean-Philippe Lang
86 1 Jean-Philippe Lang
h3. Table of content
87 1 Jean-Philippe Lang
88 1 Jean-Philippe Lang
<pre><code>{{toc}} => left aligned toc
89 1 Jean-Philippe Lang
{{>toc}} => right aligned toc
90 1 Jean-Philippe Lang
</code></pre>
91 1 Jean-Philippe Lang
92 1 Jean-Philippe Lang
h2. Code highlighting
93 1 Jean-Philippe Lang
94 4 Jean-Philippe Lang
Code highlightment relies on "CodeRay":http://coderay.rubychan.de/, a fast syntax highlighting library written completely in Ruby. It currently supports c, html, javascript, rhtml, ruby, scheme, xml languages.
95 1 Jean-Philippe Lang
96 1 Jean-Philippe Lang
You can highlight code in your wiki page using this syntax:
97 1 Jean-Philippe Lang
98 1 Jean-Philippe Lang
<pre><code><pre><code class="ruby">
99 1 Jean-Philippe Lang
  Place you code here.
100 1 Jean-Philippe Lang
</code></pre>
101 1 Jean-Philippe Lang
</pre></code>
102 1 Jean-Philippe Lang
103 1 Jean-Philippe Lang
Example:
104 1 Jean-Philippe Lang
105 1 Jean-Philippe Lang
<pre><code class="ruby">
106 1 Jean-Philippe Lang
# The Greeter class
107 1 Jean-Philippe Lang
class Greeter
108 1 Jean-Philippe Lang
  def initialize(name)
109 1 Jean-Philippe Lang
    @name = name.capitalize
110 1 Jean-Philippe Lang
  end
111 1 Jean-Philippe Lang
 
112 1 Jean-Philippe Lang
  def salute
113 1 Jean-Philippe Lang
    puts "Hello #{@name}!"
114 1 Jean-Philippe Lang
  end
115 1 Jean-Philippe Lang
end
116 1 Jean-Philippe Lang
</pre></code>