##// END OF EJS Templates
Merged r14994 from trunk to 3.1-stable (#21456, #21650)...
Toshi MARUYAMA -
r14618:822c30beb569
parent child
Show More
@@ -1,333 +1,333
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3 3 <head>
4 4 <title>RedmineWikiFormatting</title>
5 5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6 6 <style type="text/css">
7 7 body { font:80% Verdana,Tahoma,Arial,sans-serif; }
8 8 h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; }
9 9 pre, code { font-size:120%; }
10 10 pre code { font-size:100%; }
11 11 pre {
12 12 margin: 1em 1em 1em 1.6em;
13 13 padding: 2px;
14 14 background-color: #fafafa;
15 15 border: 1px solid #dadada;
16 16 width:95%;
17 17 overflow-x: auto;
18 18 }
19 19 a.new { color: #b73535; }
20 20
21 21 .syntaxhl .line-numbers { padding: 2px 4px 2px 4px; background-color: #eee; margin:0 }
22 22 .syntaxhl .comment { color:#666; }
23 23
24 24 .syntaxhl .class { color:#B06; font-weight:bold }
25 25 .syntaxhl .delimiter { color:black }
26 26 .syntaxhl .function { color:#06B; font-weight:bold }
27 27
28 28 .syntaxhl .inline { background: #eee }
29 29 .syntaxhl .inline .inline-delimiter { font-weight: bold; color: #888 }
30 30
31 31 .syntaxhl .instance-variable { color:#33B }
32 32 .syntaxhl .reserved { color:#080; font-weight:bold }
33 33
34 34 .syntaxhl .string { background-color:#fff0f0; color: #D20; }
35 35 .syntaxhl .string .delimiter { color:#710 }
36 36
37 37 </style>
38 38 </head>
39 39
40 40 <body>
41 41 <h1><a name="1" class="wiki-page"></a>Wiki 文本格式</h1>
42 42
43 43 <h2><a name="2" class="wiki-page"></a>链接</h2>
44 44
45 45 <h3><a name="3" class="wiki-page"></a>Redmine 链接</h3>
46 46
47 47 <p>在任何使用文本格式的地方,Redmine都允许在资源(问题、变更、wiki页面...)间建立超链接。</p>
48 48 <ul>
49 49 <li>链接至一个问题: <strong>#124</strong> (显示 <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>,若该问题已结束则会用删除线来表示)</li>
50 50 <li>链接至一个问题的说明: <strong>#124-6</strong>, 或者 <strong>#124#note-6</strong></li>
51 51 </ul>
52 52
53 53 <p>Wiki链接</p>
54 54
55 55 <ul>
56 56 <li><strong>[[Guide]]</strong> 显示一个页面名为'Guide'的链接: <a href="#" class="wiki-page">Guide</a></li>
57 57 <li><strong>[[Guide#further-reading]]</strong> 链接到页面内的"further-reading"标签. 每个标题都会自动绑定一个标签,方便您进行链接: <a href="#" class="wiki-page">Guide</a></li>
58 58 <li><strong>[[Guide|User manual]]</strong> 使用不同的文字来显示一个页面名称为'Guide'的链接: <a href="#" class="wiki-page">User manual</a></li>
59 59 </ul>
60 60
61 61 <p>您也可以链接到其他项目的Wiki页面(使用项目标识):</p>
62 62
63 63 <ul>
64 64 <li><strong>[[sandbox:some page]]</strong> 显示Sandbox项目wiki页面的一个名为'Some page'的链接</li>
65 65 <li><strong>[[sandbox:]]</strong> 显示Sandbox项目wiki首页的链接</li>
66 66 </ul>
67 67
68 68 <p>当页面不存在的时候,Wiki链接会以红色来显示,例如: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
69 69
70 70 <p>链接至其他资源:</p>
71 71
72 72 <ul>
73 73 <li>文档:
74 74 <ul>
75 75 <li><strong>document#17</strong> (链接到id为17的文档)</li>
76 76 <li><strong>document:Greetings</strong> (链接到标题为“Greeting”的文档)</li>
77 77 <li><strong>document:"Some document"</strong> (文档标题包含空格时使用双引号来表示)</li>
78 78 <li><strong>sandbox:document:"Some document"</strong> (链接至sandbox项目中标题为“Some document”的文档)</li>
79 79 </ul></li>
80 80 </ul>
81 81
82 82 <ul>
83 83 <li>版本:
84 84 <ul>
85 85 <li><strong>version#3</strong> (链接至id为3的版本)</li>
86 86 <li><strong>version:1.0.0</strong> (链接到名称为“1.0.0”的版本)</li>
87 87 <li><strong>version:"1.0 beta 2"</strong>(版本名称包含空格时使用双引号来表示)</li>
88 88 <li><strong>sandbox:version:1.0.0</strong> (连接至sandbox项目中的“1.0.0”版本)</li>
89 89 </ul></li>
90 90 </ul>
91 91
92 92 <ul>
93 93 <li>附件:
94 94 <ul>
95 95 <li><strong>attachment:file.zip</strong> (链接至当前页面下名为file.zip的附件)</li>
96 96 <li>目前,只有当前页面下的附件能够被引用(如果您在一个问题中,则仅可以引用此问题下的附件)</li>
97 97 </ul></li>
98 98 </ul>
99 99
100 100 <ul>
101 101 <li>变更集:
102 102 <ul>
103 103 <li><strong>r758</strong> (链接至一个变更集)</li>
104 104 <li><strong>commit:c6f4d0fd</strong> (链接至一个非数字哈希的变更集)</li>
105 105 <li><strong>svn1|r758</strong> (链接至指定版本库中的变更集,用于使用多个版本库的项目)</li>
106 106 <li><strong>commit:hg|c6f4d0fd</strong> (链接至指定版本库中,使用非数字哈希的变更集,此例子中是"hg"版本库下的哈希变更集)</li>
107 107 <li><strong>sandbox:r758</strong> (链接至其他项目的变更集)</li>
108 108 <li><strong>sandbox:commit:c6f4d0fd</strong> (链接至其他项目中,使用非数字哈希的变更集)</li>
109 109 </ul></li>
110 110 </ul>
111 111
112 112 <ul>
113 113 <li>版本库文件:
114 114 <ul>
115 115 <li><strong>source:some/file</strong> (链接至项目版本库中位于/some/file的文件)</li>
116 116 <li><strong>source:some/file@52</strong> (链接至此文件的第52版)</li>
117 117 <li><strong>source:some/file#L120</strong> (链接至此文件的第120行)</li>
118 118 <li><strong>source:some/file@52#L120</strong> (链接至此文件的第52版的第120行)</li>
119 119 <li><strong>source:"some file@52#L120"</strong> (当URL中包含空格时使用双引号来表示)</li>
120 120 <li><strong>export:some/file</strong> (强制下载此文件,而不是在页面上查看)</li>
121 121 <li><strong>source:svn1|some/file</strong> (链接至指定版本库中的文件, 用于使用多个版本库的项目)</li>
122 122 <li><strong>sandbox:source:some/file</strong> (链接至"sandbox"项目的版本库中位于/some/file的文件)</li>
123 123 <li><strong>sandbox:export:some/file</strong> (强制下载"sandbox"项目的版本库中位于/some/file的文件,而不是在页面上查看)</li>
124 124 </ul></li>
125 125 </ul>
126 126
127 127 <ul>
128 128 <li>Forums:
129 129 <ul>
130 130 <li><strong>forum#1</strong> (link to forum with id 1</li>
131 131 <li><strong>forum:Support</strong> (link to forum named Support)</li>
132 132 <li><strong>forum:"Technical Support"</strong> (use double quotes if forum name contains spaces)</li>
133 133 </ul></li>
134 134 </ul>
135 135
136 136 <ul>
137 137 <li>论坛消息:
138 138 <ul>
139 139 <li><strong>message#1218</strong> (链接至id为1218的论坛消息)</li>
140 140 </ul></li>
141 141 </ul>
142 142
143 143 <ul>
144 144 <li>项目:
145 145 <ul>
146 146 <li><strong>project#3</strong> (链接至id为3的项目)</li>
147 <li><strong>project:some-project</strong> (link to project with name or slug of "some-project")</li>
147 <li><strong>project:someproject</strong> (链接至名称为"someproject"的项目)</li>
148 148 <li><strong>project:"Some Project"</strong> (use double quotes for project name containing spaces)</li>
149 149 </ul></li>
150 150 </ul>
151 151
152 152 <ul>
153 153 <li>News:
154 154 <ul>
155 155 <li><strong>news#2</strong> (link to news item with id 2)</li>
156 156 <li><strong>news:Greetings</strong> (link to news item named "Greetings")</li>
157 157 <li><strong>news:"First Release"</strong> (use double quotes if news item name contains spaces)</li>
158 158 </ul></li>
159 159 </ul>
160 160
161 161 <p>转义字符:</p>
162 162
163 163 <ul>
164 164 <li>您可以在文本的前面加上感叹号(!)来避免该文本被解析成Redmine链接</li>
165 165 </ul>
166 166
167 167
168 168 <h3><a name="4" class="wiki-page"></a>外部链接</h3>
169 169
170 170 <p>HTTP链接和Email地址可以被自动转换成可点击的链接: </p>
171 171
172 172 <pre>
173 173 http://www.redmine.org, someone@foo.bar
174 174 </pre>
175 175
176 176 <p>显示为: <a class="external" href="http://www.redmine.org">http://www.redmine.org</a>, <a href="mailto:someone@foo.bar" class="email">someone@foo.bar</a></p>
177 177
178 178 <p>如果您想要显示指定的文本而不是链接,您可以通过下列标准的 textile 语法:</p>
179 179
180 180 <pre>
181 181 "Redmine 官网":http://www.redmine.org
182 182 </pre>
183 183
184 184 <p>显示为: <a href="http://www.redmine.org" class="external">Redmine 官网</a></p>
185 185
186 186
187 187 <h2><a name="5" class="wiki-page"></a>字体格式</h2>
188 188
189 189
190 190 <p>对于像是标题、粗体、表格、列表等文字格式, Redmine 支持使用 <a class="external" href="http://en.wikipedia.org/wiki/Textile_%28markup_language%29">http://en.wikipedia.org/wiki/Textile_(markup_language)</a> 查找关于使用这些特性的信息。下面将展示其中的一些常用的语法。</p>
191 191
192 192 <h3><a name="6" class="wiki-page"></a>字体风格</h3>
193 193
194 194 <pre>
195 195 * *粗体*
196 196 * _斜体_
197 197 * _*粗体 斜体*_
198 198 * +下划线+
199 199 * -中划线-
200 200 </pre>
201 201
202 202 <p>显示为:</p>
203 203
204 204 <ul>
205 205 <li><strong>粗体</strong></li>
206 206 <li><em>斜体</em></li>
207 207 <li><em><strong>粗体 斜体</strong></em></li>
208 208 <li><ins>下划线</ins></li>
209 209 <li><del>中划线</del></li>
210 210 </ul>
211 211
212 212 <h3><a name="7" class="wiki-page"></a>内嵌图片</h3>
213 213
214 214 <ul>
215 215 <li><strong>!image_url!</strong> displays an image located at image_url (textile syntax)</li>
216 216 <li><strong>!&gt;image_url!</strong> right floating image</li>
217 217 <li>你可以上传图片附件到 wiki 页面,然后使用它的文件名作为路径: <strong>!已上传的图片.png!</strong></li>
218 218 </ul>
219 219
220 220 <h3><a name="8" class="wiki-page"></a>标题</h3>
221 221
222 222 <pre>
223 223 h1. 一级标题
224 224 h2. 二级标题
225 225 h3. 三级标题
226 226 </pre>
227 227
228 228 <p>你可以使用“#一级标题”、“#二级标题”等等来链接到这些标题</p>
229 229
230 230
231 231 <h3><a name="9" class="wiki-page"></a>段落</h3>
232 232
233 233 <pre>
234 234 p&gt;. 向右对齐
235 235 p=. 居中
236 236 </pre>
237 237
238 238 <p style="text-align:center;">这是一个居中对齐的段落</p>
239 239
240 240
241 241 <h3><a name="10" class="wiki-page"></a>引用文字</h3>
242 242
243 243 <p>在段落前加上 <strong>bq.</strong></p>
244 244
245 245 <pre>
246 246 bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
247 247 To go live, all you need to add is a database and a web server.
248 248 </pre>
249 249
250 250 <p>显示为:</p>
251 251
252 252 <blockquote>
253 253 <p>Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.<br />To go live, all you need to add is a database and a web server.</p>
254 254 </blockquote>
255 255
256 256
257 257 <h3><a name="11" class="wiki-page"></a>目录</h3>
258 258
259 259 <pre>
260 260 {{toc}} =&gt; 靠左对齐目录
261 261 {{&gt;toc}} =&gt; 靠右对齐目录
262 262 </pre>
263 263
264 264 <h3><a name="14" class="wiki-page"></a>水平线</h3>
265 265
266 266 <pre>
267 267 ---
268 268 </pre>
269 269
270 270 <h2><a name="12" class="wiki-page"></a></h2>
271 271
272 272 <p>Redmine内建了以下宏:</p>
273 273
274 274 <p>
275 275 <dl>
276 276 <dt><code>hello_world</code></dt>
277 277 <dd><p>宏示例.</p></dd>
278 278
279 279 <dt><code>macro_list</code></dt>
280 280 <dd><p>显示所有可用的宏列表,如果该宏有提供说明也会一并显示。</p></dd>
281 281
282 282 <dt><code>child_pages</code></dt>
283 283 <dd><p>显示一个子页面列表。默认显示当前Wiki页面的所有子页面。 示例:</p>
284 284 <pre><code>{{child_pages}} -- 只能在Wiki页面调用
285 285 {{child_pages(depth=2)}} -- 显示两级子页面</code></pre></dd>
286 286
287 287 <dt><code>include</code></dt>
288 288 <dd><p>引用一个Wiki页面。示例:</p>
289 289 <pre><code>{{include(Foo)}}</code></pre>
290 290 <p>或者引用一个指定项目的Wiki页面:</p>
291 291 <pre><code>{{include(projectname:Foo)}}</code></pre></dd>
292 292
293 293 <dt><code>collapse</code></dt>
294 294 <dd><p>插入一个折叠文本块。示例:</p>
295 295 <pre><code>{{collapse(View details...)
296 296 这是一个默认折叠的文本块。
297 297 点击链接后将会展开此文本块.
298 298 }}</code></pre></dd>
299 299
300 300 <dt><code>thumbnail</code></dt>
301 301 <dd><p>显示一个图像附件的可点击缩略图。示例:</p>
302 302 <pre>{{thumbnail(image.png)}}
303 303 {{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
304 304 </dl>
305 305 </p>
306 306
307 307 <h2><a name="13" class="wiki-page"></a>代码高亮</h2>
308 308
309 309 <p>Default code highlightment relies on <a href="http://coderay.rubychan.de/" class="external">CodeRay</a>, a fast syntax highlighting library written completely in Ruby. It currently supports c, cpp, css, delphi, groovy, html, java, javascript, json, php, python, rhtml, ruby, scheme, sql, xml and yaml languages.</p>
310 310
311 311 <p>You can highlight code in your wiki page using this syntax:</p>
312 312
313 313 <pre>
314 314 &lt;pre&gt;&lt;code class="ruby"&gt;
315 315 这里写 Ruby 代码
316 316 &lt;/code&gt;&lt;/pre&gt;
317 317 </pre>
318 318
319 319 <p>示例:</p>
320 320
321 321 <pre><code class="ruby syntaxhl"><span class="line-numbers"> 1</span> <span class="comment"># The Greeter class</span>
322 322 <span class="line-numbers"> 2</span> <span class="reserved">class</span> <span class="class">Greeter</span>
323 323 <span class="line-numbers"> 3</span> <span class="reserved">def</span> <span class="function">initialize</span>(name)
324 324 <span class="line-numbers"> 4</span> <span class="instance-variable">@name</span> = name.capitalize
325 325 <span class="line-numbers"> 5</span> <span class="reserved">end</span>
326 326 <span class="line-numbers"> 6</span>
327 327 <span class="line-numbers"> 7</span> <span class="reserved">def</span> <span class="function">salute</span>
328 328 <span class="line-numbers"> 8</span> puts <span class="string"><span class="delimiter">"</span><span class="content">Hello </span><span class="inline"><span class="inline-delimiter">#{</span><span class="instance-variable">@name</span><span class="inline-delimiter">}</span></span><span class="content">!</span><span class="delimiter">"</span></span>
329 329 <span class="line-numbers"> 9</span> <span class="reserved">end</span>
330 330 <span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
331 331 </pre>
332 332 </body>
333 333 </html>
General Comments 0
You need to be logged in to leave comments. Login now