RedmineTextFormatting » History » Version 88
Olivier Pinette, 2013-02-19 16:39
fixing "project:someproject" formating
1 | 68 | Jean-Philippe Lang | h1. Text formatting |
---|---|---|---|
2 | 1 | Jean-Philippe Lang | |
3 | {{>TOC}} |
||
4 | |||
5 | h2. Links |
||
6 | |||
7 | 6 | Jean-Philippe Lang | h3. Redmine links |
8 | |||
9 | 68 | Jean-Philippe Lang | Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere text formatting is used. |
10 | 1 | Jean-Philippe Lang | |
11 | 8 | Jean-Philippe Lang | * Link to an issue: *!#124* (displays #124, link is striked-through if the issue is closed) |
12 | 87 | Olivier Pinette | * Link to an issue note: *!#124-6*, or *!#124!#note-6* |
13 | 6 | Jean-Philippe Lang | * Link to a changeset: *!r758* (displays r758) |
14 | 68 | Jean-Philippe Lang | * Link to a changeset with a non-numeric hash: *commit:c6f4d0fd* (displays c6f4d0fd). |
15 | 1 | Jean-Philippe Lang | |
16 | 6 | Jean-Philippe Lang | Wiki links: |
17 | 1 | Jean-Philippe Lang | |
18 | 3 | Jean-Philippe Lang | * *[[Guide]]* displays a link to the page named 'Guide': [[Guide]] |
19 | 51 | Graham King | * *[[Guide|User manual]]* displays a link to the same page but with different text: [[Guide|User manual]] |
20 | * *[[Guide#User-guide|User guide]]* displays a link to the header on the same page with different text: [[Guide#User-guide|User guide]] |
||
21 | 1 | Jean-Philippe Lang | |
22 | 51 | Graham King | You can also link to pages of another project's wiki: |
23 | 3 | Jean-Philippe Lang | |
24 | 1 | Jean-Philippe Lang | * *[[sandbox:some page]]* displays a link to the page named 'Some page' of the Sandbox wiki |
25 | * *[[sandbox:]]* displays a link to the Sandbox wiki main page |
||
26 | |||
27 | Wiki links are displayed in red if the page doesn't exist yet, eg: [[Nonexistent page]]. |
||
28 | |||
29 | 32 | Jean-Philippe Lang | Links to others resources: |
30 | 6 | Jean-Philippe Lang | |
31 | * Documents: |
||
32 | |||
33 | * *!document#17* (link to document with id 17) |
||
34 | * *!document:Greetings* (link to the document with title "Greetings") |
||
35 | 1 | Jean-Philippe Lang | * *!document:"Some document"* (double quotes can be used when document title contains spaces) |
36 | 87 | Olivier Pinette | * *!sandbox:document:"Some document"* (link to a document with title "Some document" in other project "sandbox") |
37 | 6 | Jean-Philippe Lang | |
38 | * Versions: |
||
39 | |||
40 | * *!version#3* (link to version with id 3) |
||
41 | * *!version:1.0.0* (link to version named "1.0.0") |
||
42 | 1 | Jean-Philippe Lang | * *!version:"1.0 beta 2"* |
43 | 87 | Olivier Pinette | * *!sandbox:version:1.0.0* (link to version "1.0.0" in the project "sandbox") |
44 | 1 | Jean-Philippe Lang | |
45 | 44 | Anh Tu Sam | * Attachments: |
46 | 1 | Jean-Philippe Lang | |
47 | * *!attachment:file.zip* (link to the attachment of the current object named file.zip) |
||
48 | * *!attachment:"file.zip"* (double quotes can be used when the filename contains non word characters) |
||
49 | * For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only) |
||
50 | |||
51 | 87 | Olivier Pinette | * Changesets: |
52 | 1 | Jean-Philippe Lang | |
53 | 87 | Olivier Pinette | * *!r758* (link to a changeset) |
54 | * *!commit:c6f4d0fd* (link to a changeset with a non-numeric hash) |
||
55 | * *!svn1|r758* (link to a changeset of a specific repository, for projects with multiple repositories) |
||
56 | * *!commit:hg|c6f4d0fd* (link to a changeset with a non-numeric hash of a specific repository) |
||
57 | * *!sandbox:r758* (link to a changeset of another project) |
||
58 | * *!sandbox:commit:c6f4d0fd* (link to a changeset with a non-numeric hash of another project) |
||
59 | |||
60 | * Repository files: |
||
61 | |||
62 | 39 | Yuki Kita | * *!source:some/file* -- Link to the file located at /some/file in the project's repository |
63 | 1 | Jean-Philippe Lang | * *!source:some/file@52* -- Link to the file's revision 52 |
64 | 39 | Yuki Kita | * *!source:some/file#L120* -- Link to line 120 of the file |
65 | 1 | Jean-Philippe Lang | * *!source:some/file@52#L120* -- Link to line 120 of the file's revision 52 |
66 | * *!source:"some file@52#L120"* -- Double quotes can be used when the URL contains spaces |
||
67 | * *!source:repo_identifier|some/file* -- Link to a file in a repository other than the project default repository. |
||
68 | * *!source:"repo_identifier|some file"* -- Link to a file in a repository other than the project default repository, with spaces in the path. |
||
69 | * *!export:some/file* -- Force the download of the file |
||
70 | |||
71 | 87 | Olivier Pinette | * Forum messages: |
72 | 39 | Yuki Kita | |
73 | 87 | Olivier Pinette | * *!message#1218* (link to message with id 1218) |
74 | |||
75 | * Projects: |
||
76 | |||
77 | * *project#<id>* (link to project with id, eg. *project#3* link to project with id 3) |
||
78 | 88 | Olivier Pinette | * *!project:<name>* (link to project with name, eg. *project:someproject* link to project named "someproject") |
79 | 87 | Olivier Pinette | |
80 | 32 | Jean-Philippe Lang | Escaping: |
81 | 6 | Jean-Philippe Lang | |
82 | * You can prevent Redmine links from being parsed by preceding them with an exclamation mark: ! |
||
83 | |||
84 | 42 | Andrew Quach Huynh | h3. External links |
85 | 5 | Jean-Philippe Lang | |
86 | 83 | Jean-Philippe Lang | HTTP URLs are automatically turned into clickable links: |
87 | 47 | Ian Epperson | * *http://www.redmine.org* -- External link to the redmine website: http://www.redmine.org |
88 | * *someone@foo.bar* -- Link to an email address: someone@foo.bar |
||
89 | 5 | Jean-Philippe Lang | |
90 | 83 | Jean-Philippe Lang | HTTP URLs can also use different text than the link itself: |
91 | 47 | Ian Epperson | * *"Redmine web site":http://www.redmine.org* -- External link with different text: "Redmine web site":http://www.redmine.org |
92 | 70 | Jean-Philippe Lang | * *!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: |
93 | 1 | Jean-Philippe Lang | |
94 | p=. !http://www.redmine.org/attachments/7069/Redmine_logo.png(Redmine web site)!:http://www.redmine.org |
||
95 | 83 | Jean-Philippe Lang | |
96 | h3. Email addresses |
||
97 | |||
98 | Email addresses are automatically turned into clickable links: |
||
99 | 70 | Jean-Philippe Lang | |
100 | 47 | Ian Epperson | * *"Email someone":mailto:someone@foo.bar* -- Email link with different text: "Email someone":mailto:someone@foo.bar |
101 | 1 | Jean-Philippe Lang | |
102 | 48 | Ian Epperson | 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. |
103 | * *"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 |
||
104 | * *"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 |
||
105 | * *"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 |
||
106 | |||
107 | 1 | Jean-Philippe Lang | h2. Text formatting |
108 | 10 | John Goerzen | |
109 | 67 | Jean-Philippe Lang | 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. |
110 | 1 | Jean-Philippe Lang | |
111 | 38 | ha thach | h3. Acronym |
112 | |||
113 | <pre> |
||
114 | JPL(Jean-Philippe Lang) |
||
115 | </pre> |
||
116 | |||
117 | Display: |
||
118 | |||
119 | JPL(Jean-Philippe Lang) |
||
120 | |||
121 | 1 | Jean-Philippe Lang | h3. Font style |
122 | |||
123 | <pre><code>* *bold* |
||
124 | * _italic_ |
||
125 | 19 | Pavel Schichko | * *_bold italic_* |
126 | 1 | Jean-Philippe Lang | * +underline+ |
127 | * -strike-through- |
||
128 | 45 | Ian Epperson | * Plain ^superscript^ |
129 | * Plain ~subscript~ |
||
130 | 63 | Colin Sullivan | * @inline monospace@ |
131 | 1 | Jean-Philippe Lang | </code></pre> |
132 | |||
133 | Display: |
||
134 | |||
135 | * *bold* |
||
136 | * _italic_ |
||
137 | 19 | Pavel Schichko | * *_bold italic_* |
138 | 1 | Jean-Philippe Lang | * +underline+ |
139 | * -strike-through- |
||
140 | 45 | Ian Epperson | * Plain ^superscript^ |
141 | * Plain ~subscript~ |
||
142 | 63 | Colin Sullivan | * @inline monospace@ |
143 | 1 | Jean-Philippe Lang | |
144 | h3. Inline images |
||
145 | 9 | Jean-Philippe Lang | |
146 | 1 | Jean-Philippe Lang | * *!image_url!* displays an image located at image_url (textile syntax) |
147 | * *!>image_url!* right floating image |
||
148 | 66 | Jean-Philippe Lang | * *!image_url(Image title)!* displays an image with an alt/title attribute |
149 | 73 | Dieter Egert | * *!image_url!:URL* displays an image located at image_url with link URL added |
150 | 18 | samir djouadi | |
151 | 15 | Jean-Philippe Lang | If you have an image attached to your wiki page, it can be displayed inline using its filename: *!attached_image.png!* |
152 | 1 | Jean-Philippe Lang | |
153 | 80 | Caio Cunha | 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. |
154 | |||
155 | 1 | Jean-Philippe Lang | h3. Headings |
156 | |||
157 | <pre><code>h1. Heading |
||
158 | |||
159 | h2. Subheading |
||
160 | 66 | Jean-Philippe Lang | |
161 | 1 | Jean-Philippe Lang | h3. Subheading |
162 | 66 | Jean-Philippe Lang | </code></pre> |
163 | 87 | Olivier Pinette | |
164 | Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth. |
||
165 | 1 | Jean-Philippe Lang | |
166 | h3. Paragraphs |
||
167 | |||
168 | 58 | Dieter Egert | <pre><code>p. left aligned |
169 | |||
170 | 60 | Dieter Egert | p(. left ident 1em |
171 | 58 | Dieter Egert | |
172 | 60 | Dieter Egert | p((. left ident 2em |
173 | as well as for following lines |
||
174 | 58 | Dieter Egert | |
175 | 60 | Dieter Egert | p>. right aligned |
176 | 58 | Dieter Egert | |
177 | 60 | Dieter Egert | p)))>. right ident 3em |
178 | 58 | Dieter Egert | |
179 | 60 | Dieter Egert | p=. This is centered paragraph. |
180 | 1 | Jean-Philippe Lang | </code></pre> |
181 | |||
182 | h3. Predefined |
||
183 | |||
184 | To escape wiki syntax |
||
185 | 58 | Dieter Egert | <pre> <pre> *Your text won't become bold* </pre> </pre> |
186 | 36 | ha thach | Display: |
187 | 37 | ha thach | |
188 | 1 | Jean-Philippe Lang | <pre> *Your text won't become bold* </pre> |
189 | 38 | ha thach | |
190 | h3. Blockquotes |
||
191 | 37 | ha thach | |
192 | 84 | Jean-Philippe Lang | Start the paragraph with *bq.*: |
193 | 1 | Jean-Philippe Lang | |
194 | <pre><code>bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
195 | To go live, all you need to add is a database and a web server. |
||
196 | </code></pre> |
||
197 | |||
198 | 84 | Jean-Philippe Lang | Displays: |
199 | 1 | Jean-Philippe Lang | |
200 | bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
201 | To go live, all you need to add is a database and a web server. |
||
202 | |||
203 | 84 | Jean-Philippe Lang | You can also use > at the beginning of each line and stack them for nested quotes: |
204 | |||
205 | <pre> |
||
206 | 1 | Jean-Philippe Lang | >> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
207 | 84 | Jean-Philippe Lang | >> To go live, all you need to add is a database and a web server. |
208 | > Great! |
||
209 | </pre> |
||
210 | |||
211 | Displays: |
||
212 | |||
213 | >> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. |
||
214 | >> To go live, all you need to add is a database and a web server. |
||
215 | > Great! |
||
216 | 60 | Dieter Egert | |
217 | 28 | Jean-Philippe Lang | h3. Unordered lists |
218 | |||
219 | <pre> |
||
220 | * Item 1 |
||
221 | * Item 2 |
||
222 | 29 | Eric Gallimore | ** Item 21 |
223 | ** Item 22 |
||
224 | 28 | Jean-Philippe Lang | * Item 3 |
225 | </pre> |
||
226 | |||
227 | displays: |
||
228 | 1 | Jean-Philippe Lang | |
229 | 28 | Jean-Philippe Lang | * Item 1 |
230 | * Item 2 |
||
231 | 29 | Eric Gallimore | ** Item 21 |
232 | 28 | Jean-Philippe Lang | ** Item 22 |
233 | * Item 3 |
||
234 | 1 | Jean-Philippe Lang | |
235 | h3. Ordered lists |
||
236 | |||
237 | 28 | Jean-Philippe Lang | <pre> |
238 | # Item 1 |
||
239 | # Item 2 |
||
240 | # Item 3 |
||
241 | ## Item 3.1 |
||
242 | ## Item 3.2 |
||
243 | 1 | Jean-Philippe Lang | </pre> |
244 | 29 | Eric Gallimore | |
245 | displays: |
||
246 | 1 | Jean-Philippe Lang | |
247 | 20 | Kirill Ponomarev | # Item 1 |
248 | # Item 2 |
||
249 | # Item 3 |
||
250 | 21 | Andrew Chaika | ## Item 3.1 |
251 | ## Item 3.2 |
||
252 | |||
253 | 1 | Jean-Philippe Lang | h3. Tables |
254 | |||
255 | <pre> |
||
256 | 71 | Dieter Egert | |_.UserID |_.Name|_.Group|_. attribute list | |
257 | 72 | Dieter Egert | |Starting with| a | simple|row | |
258 | 60 | Dieter Egert | |\3=.IT |<. align left| |
259 | |1|Artur Pirozhkov |/2.Users |>. align right| |
||
260 | |2|Vasya Rogov |=. center | |
||
261 | 58 | Dieter Egert | |3|John Smith |Admin |
262 | (root)|^. valign top | |
||
263 | |4|- |Nobody |
||
264 | (anonymous)|~. valign bottom| |
||
265 | 20 | Kirill Ponomarev | </pre> |
266 | 21 | Andrew Chaika | |
267 | 1 | Jean-Philippe Lang | displays (all multiple spaces are replaced by 1 space): |
268 | |||
269 | 71 | Dieter Egert | |_.UserID |_.Name|_.Group|_. attribute list | |
270 | 72 | Dieter Egert | |Starting with| a | simple|row | |
271 | 60 | Dieter Egert | |\3=.IT |<. align left| |
272 | |1|Artur Pirozhkov |/2.Users |>. align right| |
||
273 | |2|Vasya Rogov |=. center | |
||
274 | 58 | Dieter Egert | |3|John Smith |Admin |
275 | (root)|^. valign top | |
||
276 | |4|- |Nobody |
||
277 | (anonymous)|~. valign bottom| |
||
278 | 1 | Jean-Philippe Lang | |
279 | 78 | Thomas Themel | If you want to include pipe characters inside your table (e.g. for Wiki links), you need to prevent textile from interpreting them: |
280 | |||
281 | |_.Input |_. Output| |
||
282 | |*<notextile><notextile>|</notextile></notextile>*|<notextile>|</notextile>| |
||
283 | |||
284 | 1 | Jean-Philippe Lang | h3. Table of content |
285 | |||
286 | <pre><code>{{toc}} => left aligned toc |
||
287 | {{>toc}} => right aligned toc |
||
288 | </code></pre> |
||
289 | 7 | Jean-Philippe Lang | |
290 | 79 | Mike Bison | Please keep in mind, that the toc-tag needs an empty line above and underneath it and no other text before and after it. |
291 | |||
292 | Example: |
||
293 | |||
294 | <pre><code> |
||
295 | h1. headLineOne |
||
296 | |||
297 | h2. something |
||
298 | |||
299 | {{toc}} |
||
300 | |||
301 | h2. something more |
||
302 | </code></pre> |
||
303 | |||
304 | 7 | Jean-Philippe Lang | h2. Macros |
305 | |||
306 | 82 | Jean-Philippe Lang | 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 alse includes a few builtin macros: |
307 | 7 | Jean-Philippe Lang | |
308 | {{macro_list}} |
||
309 | 1 | Jean-Philippe Lang | |
310 | 4 | Jean-Philippe Lang | h2. Code highlighting |
311 | 51 | Graham King | |
312 | 1 | Jean-Philippe Lang | 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. |
313 | |||
314 | You can highlight code in your wiki page using this syntax: |
||
315 | |||
316 | 49 | Dave Clements | <pre><code><pre><code class="ruby"> |
317 | 1 | Jean-Philippe Lang | Place your code here. |
318 | 40 | Mischa The Evil | </code></pre> |
319 | 1 | Jean-Philippe Lang | </code></pre> |
320 | |||
321 | Example: |
||
322 | |||
323 | <pre><code class="ruby"> |
||
324 | # The Greeter class |
||
325 | class Greeter |
||
326 | def initialize(name) |
||
327 | @name = name.capitalize |
||
328 | end |
||
329 | |||
330 | def salute |
||
331 | puts "Hello #{@name}!" |
||
332 | end |
||
333 | 40 | Mischa The Evil | end |
334 | 52 | Vladimir Vasilkin | </code></pre> |
335 | |||
336 | h2. Translation |
||
337 | 1 | Jean-Philippe Lang | |
338 | 75 | Caille Rotie | Note that the following translations may not be up to date. Please refer to the original english documentation if needed. |
339 | 52 | Vladimir Vasilkin | |
340 | 75 | Caille Rotie | * [[RusRedmineTextFormatting|Перевод на русский]] |
341 | * [[FrRedmineWikiFormatting|French]] |