RedmineTextFormattingTextile » History » Version 4

Hiroo Hayashi, 2016-07-23 06:09
move the section "Redmine links" to [[RedmineTextFormattingRedmineLinks]] to share with [[RedmineTextFormattingMarkdown]]. refs #16373

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