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 | |||
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 | p(. left ident 1em |
||
126 | |||
127 | p((. left ident 2em |
||
128 | as well as for following lines |
||
129 | |||
130 | p>. right aligned |
||
131 | |||
132 | p)))>. right ident 3em |
||
133 | |||
134 | p=. This is centered paragraph. |
||
135 | </code></pre> |
||
136 | |||
137 | h3. Horizontal rule |
||
138 | |||
139 | @----@ |
||
140 | |||
141 | 3 | Hiroo Hayashi | displays: |
142 | |||
143 | 1 | Hans Ginzel | ---- |
144 | |||
145 | |||
146 | h3. Predefined |
||
147 | |||
148 | To escape wiki syntax |
||
149 | <pre> <pre> *Your text won't become bold* </pre> </pre> |
||
150 | |||
151 | 3 | Hiroo Hayashi | displays: |
152 | |||
153 | 1 | Hans Ginzel | <pre> *Your text won't become bold* </pre> |
154 | |||
155 | h3. Blockquotes |
||
156 | |||
157 | Start the paragraph with *bq.*: |
||
158 | |||
159 | <pre><code>bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
160 | To go live, all you need to add is a database and a web server. |
||
161 | </code></pre> |
||
162 | |||
163 | 3 | Hiroo Hayashi | displays: |
164 | 1 | Hans Ginzel | |
165 | bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
166 | To go live, all you need to add is a database and a web server. |
||
167 | |||
168 | You can also use > at the beginning of each line and stack them for nested quotes: |
||
169 | |||
170 | <pre> |
||
171 | >> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
172 | >> To go live, all you need to add is a database and a web server. |
||
173 | > Great! |
||
174 | </pre> |
||
175 | |||
176 | 3 | Hiroo Hayashi | displays: |
177 | 1 | Hans Ginzel | |
178 | >> 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 | > Great! |
||
181 | |||
182 | h3. Unordered lists |
||
183 | |||
184 | <pre> |
||
185 | * Item 1 |
||
186 | * Item 2 |
||
187 | ** Item 21 |
||
188 | ** Item 22 |
||
189 | * Item 3 |
||
190 | </pre> |
||
191 | |||
192 | displays: |
||
193 | |||
194 | * Item 1 |
||
195 | * Item 2 |
||
196 | ** Item 21 |
||
197 | ** Item 22 |
||
198 | * Item 3 |
||
199 | |||
200 | h3. Ordered lists |
||
201 | |||
202 | <pre> |
||
203 | # Item 1 |
||
204 | # Item 2 |
||
205 | # Item 3 |
||
206 | ## Item 3.1 |
||
207 | ## Item 3.2 |
||
208 | </pre> |
||
209 | |||
210 | displays: |
||
211 | |||
212 | # Item 1 |
||
213 | # Item 2 |
||
214 | # Item 3 |
||
215 | ## Item 3.1 |
||
216 | ## Item 3.2 |
||
217 | |||
218 | h3. Tables |
||
219 | |||
220 | <pre> |
||
221 | |_.UserID |_.Name |_.Group |_. attribute list | |
||
222 | |Starting with | a | simple |row | |
||
223 | |\3=.IT |<. align left | |
||
224 | |1 |Artur Pirozhkov |/2.Users |>. align right | |
||
225 | |2 |Vasya Rogov |=. center | |
||
226 | |3 |John Smith |Admin |
||
227 | (root) |^. valign top | |
||
228 | |4 |- |Nobody |
||
229 | (anonymous) |~. valign bottom | |
||
230 | </pre> |
||
231 | |||
232 | displays (all multiple spaces are replaced by 1 space): |
||
233 | |||
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 | |||
244 | If you want to include pipe characters inside your table (e.g. for Wiki links), you need to prevent textile from interpreting them: |
||
245 | |||
246 | |_.Input |_. Output| |
||
247 | |*<notextile><notextile>|</notextile></notextile>*|<notextile>|</notextile>| |
||
248 | |||
249 | h3. Table of content |
||
250 | |||
251 | <pre><code>{{toc}} => left aligned toc |
||
252 | {{>toc}} => right aligned toc |
||
253 | </code></pre> |
||
254 | |||
255 | 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 | |||
257 | Example: |
||
258 | |||
259 | <pre><code> |
||
260 | h1. headLineOne |
||
261 | |||
262 | h2. something |
||
263 | |||
264 | {{toc}} |
||
265 | |||
266 | h2. something more |
||
267 | </code></pre> |
||
268 | |||
269 | h2. Macros |
||
270 | |||
271 | 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 | |||
273 | {{macro_list}} |
||
274 | |||
275 | h2. Code highlighting |
||
276 | |||
277 | 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 | |||
279 | You can highlight code in your wiki page using this syntax: |
||
280 | |||
281 | <pre><code><pre><code class="ruby"> |
||
282 | Place your code here. |
||
283 | </code></pre> |
||
284 | </code></pre> |
||
285 | |||
286 | Example: |
||
287 | |||
288 | <pre><code class="ruby"> |
||
289 | # The Greeter class |
||
290 | class Greeter |
||
291 | def initialize(name) |
||
292 | @name = name.capitalize |
||
293 | end |
||
294 | |||
295 | def salute |
||
296 | puts "Hello #{@name}!" |
||
297 | end |
||
298 | end |
||
299 | </code></pre> |
||
300 | |||
301 | h2. Translation |
||
302 | |||
303 | Note that the following translations may not be up to date. Please refer to the original english documentation if needed. |
||
304 | |||
305 | * [[BrRedmineWikiFormatting|Português Brasileiro]] |
||
306 | * [[RusRedmineTextFormatting|Русский]] |
||
307 | * [[FrRedmineWikiFormatting|French]] |
||
308 | * [[KoreanWikiFormatting|Korean]] |
||
309 | * [[TurkishWikiFormatting|Türkçe]] |
||
310 | * [[TraditionalChineseWikiFormatting|繁體中文]] |
||
311 | * [[SimplifiedChineseWikiFormatting|简体中文]] |