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