RedmineTextFormattingTextile » History » Version 7

Go MAEDA, 2017-03-21 03:14

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