##// END OF EJS Templates
Merged r14994 from trunk to 2.6-stable (#21456, #21650)...
Toshi MARUYAMA -
r14621:82b0bf32996d
parent child
Show More
@@ -1,315 +1,315
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>论坛消息:
129 129 <ul>
130 130 <li><strong>message#1218</strong> (链接至id为1218的论坛消息)</li>
131 131 </ul></li>
132 132 </ul>
133 133
134 134 <ul>
135 135 <li>项目:
136 136 <ul>
137 137 <li><strong>project#3</strong> (链接至id为3的项目)</li>
138 <li><strong>project:someproject</strong> (link to project named "someproject")</li>
138 <li><strong>project:someproject</strong> (链接至名称为"someproject"的项目)</li>
139 139 </ul></li>
140 140 </ul>
141 141
142 142
143 143 <p>转义字符:</p>
144 144
145 145 <ul>
146 146 <li>您可以在文本的前面加上感叹号(!)来避免该文本被解析成Redmine链接</li>
147 147 </ul>
148 148
149 149
150 150 <h3><a name="4" class="wiki-page"></a>外部链接</h3>
151 151
152 152 <p>HTTP链接和Email地址可以被自动转换成可点击的链接: </p>
153 153
154 154 <pre>
155 155 http://www.redmine.org, someone@foo.bar
156 156 </pre>
157 157
158 158 <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>
159 159
160 160 <p>如果您想要显示指定的文本而不是链接,您可以通过下列标准的 textile 语法:</p>
161 161
162 162 <pre>
163 163 "Redmine 官网":http://www.redmine.org
164 164 </pre>
165 165
166 166 <p>显示为: <a href="http://www.redmine.org" class="external">Redmine 官网</a></p>
167 167
168 168
169 169 <h2><a name="5" class="wiki-page"></a>字体格式</h2>
170 170
171 171
172 172 <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>
173 173
174 174 <h3><a name="6" class="wiki-page"></a>字体风格</h3>
175 175
176 176 <pre>
177 177 * *粗体*
178 178 * _斜体_
179 179 * _*粗体 斜体*_
180 180 * +下划线+
181 181 * -中划线-
182 182 </pre>
183 183
184 184 <p>显示为:</p>
185 185
186 186 <ul>
187 187 <li><strong>粗体</strong></li>
188 188 <li><em>斜体</em></li>
189 189 <li><em><strong>粗体 斜体</strong></em></li>
190 190 <li><ins>下划线</ins></li>
191 191 <li><del>中划线</del></li>
192 192 </ul>
193 193
194 194 <h3><a name="7" class="wiki-page"></a>内嵌图片</h3>
195 195
196 196 <ul>
197 197 <li><strong>!image_url!</strong> displays an image located at image_url (textile syntax)</li>
198 198 <li><strong>!&gt;image_url!</strong> right floating image</li>
199 199 <li>你可以上传图片附件到 wiki 页面,然后使用它的文件名作为路径: <strong>!已上传的图片.png!</strong></li>
200 200 </ul>
201 201
202 202 <h3><a name="8" class="wiki-page"></a>标题</h3>
203 203
204 204 <pre>
205 205 h1. 一级标题
206 206 h2. 二级标题
207 207 h3. 三级标题
208 208 </pre>
209 209
210 210 <p>你可以使用“#一级标题”、“#二级标题”等等来链接到这些标题</p>
211 211
212 212
213 213 <h3><a name="9" class="wiki-page"></a>段落</h3>
214 214
215 215 <pre>
216 216 p&gt;. 向右对齐
217 217 p=. 居中
218 218 </pre>
219 219
220 220 <p style="text-align:center;">这是一个居中对齐的段落</p>
221 221
222 222
223 223 <h3><a name="10" class="wiki-page"></a>引用文字</h3>
224 224
225 225 <p>在段落前加上 <strong>bq.</strong></p>
226 226
227 227 <pre>
228 228 bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
229 229 To go live, all you need to add is a database and a web server.
230 230 </pre>
231 231
232 232 <p>显示为:</p>
233 233
234 234 <blockquote>
235 235 <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>
236 236 </blockquote>
237 237
238 238
239 239 <h3><a name="11" class="wiki-page"></a>目录</h3>
240 240
241 241 <pre>
242 242 {{toc}} =&gt; 靠左对齐目录
243 243 {{&gt;toc}} =&gt; 靠右对齐目录
244 244 </pre>
245 245
246 246 <h3><a name="14" class="wiki-page"></a>水平线</h3>
247 247
248 248 <pre>
249 249 ---
250 250 </pre>
251 251
252 252 <h2><a name="12" class="wiki-page"></a></h2>
253 253
254 254 <p>Redmine内建了以下宏:</p>
255 255
256 256 <p>
257 257 <dl>
258 258 <dt><code>hello_world</code></dt>
259 259 <dd><p>宏示例.</p></dd>
260 260
261 261 <dt><code>macro_list</code></dt>
262 262 <dd><p>显示所有可用的宏列表,如果该宏有提供说明也会一并显示。</p></dd>
263 263
264 264 <dt><code>child_pages</code></dt>
265 265 <dd><p>显示一个子页面列表。默认显示当前Wiki页面的所有子页面。 示例:</p>
266 266 <pre><code>{{child_pages}} -- 只能在Wiki页面调用
267 267 {{child_pages(depth=2)}} -- 显示两级子页面</code></pre></dd>
268 268
269 269 <dt><code>include</code></dt>
270 270 <dd><p>引用一个Wiki页面。示例:</p>
271 271 <pre><code>{{include(Foo)}}</code></pre>
272 272 <p>或者引用一个指定项目的Wiki页面:</p>
273 273 <pre><code>{{include(projectname:Foo)}}</code></pre></dd>
274 274
275 275 <dt><code>collapse</code></dt>
276 276 <dd><p>插入一个折叠文本块。示例:</p>
277 277 <pre><code>{{collapse(View details...)
278 278 这是一个默认折叠的文本块。
279 279 点击链接后将会展开此文本块.
280 280 }}</code></pre></dd>
281 281
282 282 <dt><code>thumbnail</code></dt>
283 283 <dd><p>显示一个图像附件的可点击缩略图。示例:</p>
284 284 <pre>{{thumbnail(image.png)}}
285 285 {{thumbnail(image.png, size=300, title=Thumbnail)}}</pre></dd>
286 286 </dl>
287 287 </p>
288 288
289 289 <h2><a name="13" class="wiki-page"></a>代码高亮</h2>
290 290
291 291 <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>
292 292
293 293 <p>You can highlight code in your wiki page using this syntax:</p>
294 294
295 295 <pre>
296 296 &lt;pre&gt;&lt;code class="ruby"&gt;
297 297 这里写 Ruby 代码
298 298 &lt;/code&gt;&lt;/pre&gt;
299 299 </pre>
300 300
301 301 <p>示例:</p>
302 302
303 303 <pre><code class="ruby syntaxhl"><span class="line-numbers"> 1</span> <span class="comment"># The Greeter class</span>
304 304 <span class="line-numbers"> 2</span> <span class="reserved">class</span> <span class="class">Greeter</span>
305 305 <span class="line-numbers"> 3</span> <span class="reserved">def</span> <span class="function">initialize</span>(name)
306 306 <span class="line-numbers"> 4</span> <span class="instance-variable">@name</span> = name.capitalize
307 307 <span class="line-numbers"> 5</span> <span class="reserved">end</span>
308 308 <span class="line-numbers"> 6</span>
309 309 <span class="line-numbers"> 7</span> <span class="reserved">def</span> <span class="function">salute</span>
310 310 <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>
311 311 <span class="line-numbers"> 9</span> <span class="reserved">end</span>
312 312 <span class="line-numbers"><strong>10</strong></span> <span class="reserved">end</span></code>
313 313 </pre>
314 314 </body>
315 315 </html>
General Comments 0
You need to be logged in to leave comments. Login now