##// END OF EJS Templates
Merged r14993 from trunk to 2.6-stable (#21456, #21650)...
Toshi MARUYAMA -
r14620:edbc05c21d40
parent child
Show More
@@ -18,20 +18,20 table td h3 { font-size: 1.2em; text-align: left; }
18 18 </head>
19 19 <body>
20 20
21 <h1>Wiki Syntax Quick Reference</h1>
21 <h1>Wiki 语法快速参考</h1>
22 22
23 23 <table style="width:100%">
24 <tr><th colspan="3">Font Styles</th></tr>
25 <tr><th><img src="../../images/jstoolbar/bt_strong.png" style="border: 1px solid #bbb;" alt="Strong" /></th><td style="width:50%;">*Strong*</td><td style="width:50%;"><strong>Strong</strong></td></tr>
26 <tr><th><img src="../../images/jstoolbar/bt_em.png" style="border: 1px solid #bbb;" alt="Italic" /></th><td>_Italic_</td><td><em>Italic</em></td></tr>
27 <tr><th><img src="../../images/jstoolbar/bt_ins.png" style="border: 1px solid #bbb;" alt="Underline" /></th><td>+Underline+</td><td><ins>Underline</ins></td></tr>
28 <tr><th><img src="../../images/jstoolbar/bt_del.png" style="border: 1px solid #bbb;" alt="Deleted" /></th><td>-Deleted-</td><td><del>Deleted</del></td></tr>
29 <tr><th></th><td>??Quote??</td><td><cite>Quote</cite></td></tr>
30 <tr><th><img src="../../images/jstoolbar/bt_code.png" style="border: 1px solid #bbb;" alt="Inline Code" /></th><td>@Inline Code@</td><td><code>Inline Code</code></td></tr>
31 <tr><th><img src="../../images/jstoolbar/bt_pre.png" style="border: 1px solid #bbb;" alt="Preformatted text" /></th><td>&lt;pre&gt;<br />&nbsp;lines<br />&nbsp;of code<br />&lt;/pre&gt;</td><td>
24 <tr><th colspan="3">字体风格</th></tr>
25 <tr><th><img src="../../images/jstoolbar/bt_strong.png" style="border: 1px solid #bbb;" alt="粗体" /></th><td style="width:50%;">*粗体*</td><td style="width:50%;"><strong>粗体</strong></td></tr>
26 <tr><th><img src="../../images/jstoolbar/bt_em.png" style="border: 1px solid #bbb;" alt="斜体" /></th><td>_Italic_</td><td><em>斜体</em></td></tr>
27 <tr><th><img src="../../images/jstoolbar/bt_ins.png" style="border: 1px solid #bbb;" alt="下划线" /></th><td>+下划线+</td><td><ins>下划线</ins></td></tr>
28 <tr><th><img src="../../images/jstoolbar/bt_del.png" style="border: 1px solid #bbb;" alt="删除线" /></th><td>-删除线-</td><td><del>删除线</del></td></tr>
29 <tr><th></th><td>??引用??</td><td><cite>引用</cite></td></tr>
30 <tr><th><img src="../../images/jstoolbar/bt_code.png" style="border: 1px solid #bbb;" alt="内嵌程序代码" /></th><td>@内嵌程序代码@</td><td><code>内嵌程序代码</code></td></tr>
31 <tr><th><img src="../../images/jstoolbar/bt_pre.png" style="border: 1px solid #bbb;" alt="预先格式化的段落" /></th><td>&lt;pre&gt;<br />&nbsp;格式化<br />&nbsp;的段落<br />&lt;/pre&gt;</td><td>
32 32 <pre>
33 lines
34 of code
33 格式化
34 的段落
35 35 </pre>
36 36 </td></tr>
37 37
@@ -39,21 +39,21 table td h3 { font-size: 1.2em; text-align: left; }
39 39 <tr><th><img src="../../images/jstoolbar/bt_ul.png" style="border: 1px solid #bbb;" alt="Unordered list" /></th><td>* Item 1<br />* Item 2</td><td><ul><li>Item 1</li><li>Item 2</li></ul></td></tr>
40 40 <tr><th><img src="../../images/jstoolbar/bt_ol.png" style="border: 1px solid #bbb;" alt="Ordered list" /></th><td># Item 1<br /># Item 2</td><td><ol><li>Item 1</li><li>Item 2</li></ol></td></tr>
41 41
42 <tr><th colspan="3">Headings</th></tr>
43 <tr><th><img src="../../images/jstoolbar/bt_h1.png" style="border: 1px solid #bbb;" alt="Heading 1" /></th><td>h1. Title 1</td><td><h1>Title 1</h1></td></tr>
44 <tr><th><img src="../../images/jstoolbar/bt_h2.png" style="border: 1px solid #bbb;" alt="Heading 2" /></th><td>h2. Title 2</td><td><h2>Title 2</h2></td></tr>
45 <tr><th><img src="../../images/jstoolbar/bt_h3.png" style="border: 1px solid #bbb;" alt="Heading 3" /></th><td>h3. Title 3</td><td><h3>Title 3</h3></td></tr>
42 <tr><th colspan="3">标题</th></tr>
43 <tr><th><img src="../../images/jstoolbar/bt_h1.png" style="border: 1px solid #bbb;" alt="标题 1" /></th><td>h1. 标题 1</td><td><h1>标题 1</h1></td></tr>
44 <tr><th><img src="../../images/jstoolbar/bt_h2.png" style="border: 1px solid #bbb;" alt="标题 2" /></th><td>h2. 标题 2</td><td><h2>标题 2</h2></td></tr>
45 <tr><th><img src="../../images/jstoolbar/bt_h3.png" style="border: 1px solid #bbb;" alt="标题 3" /></th><td>h3. 标题 3</td><td><h3>标题 3</h3></td></tr>
46 46
47 <tr><th colspan="3">Links</th></tr>
47 <tr><th colspan="3">链接</th></tr>
48 48 <tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr>
49 49 <tr><th></th><td>"Foo":http://foo.bar</td><td><a href="#">Foo</a></td></tr>
50 50
51 <tr><th colspan="3">Redmine links</th></tr>
52 <tr><th><img src="../../images/jstoolbar/bt_link.png" style="border: 1px solid #bbb;" alt="Link to a Wiki page" /></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr>
53 <tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr>
54 <tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr>
55 <tr><th></th><td>commit:f30e13e43</td><td><a href="#">f30e13e4</a></td></tr>
56 <tr><th></th><td>source:some/file</td><td><a href="#">source:some/file</a></td></tr>
51 <tr><th colspan="3">Redmine 链接</th></tr>
52 <tr><th><img src="../../images/jstoolbar/bt_link.png" style="border: 1px solid #bbb;" alt="链接到一个Wiki 页面" /></th><td>[[Wiki 页面]]</td><td><a href="#">Wiki 页面</a></td></tr>
53 <tr><th></th><td>问题 #12</td><td>问题 <a href="#">#12</a></td></tr>
54 <tr><th></th><td>修订 r43</td><td>修订 <a href="#">r43</a></td></tr>
55 <tr><th></th><td>commit:f30e13e43</td><td>提交: <a href="#">f30e13e4</a></td></tr>
56 <tr><th></th><td>source:some/file</td><td>代码:<a href="#">source:some/file</a></td></tr>
57 57
58 58 <tr><th colspan="3">Inline images</th></tr>
59 59 <tr><th><img src="../../images/jstoolbar/bt_img.png" style="border: 1px solid #bbb;" alt="Image" /></th><td>!<em>image_url</em>!</td><td></td></tr>
@@ -38,255 +38,255
38 38 </head>
39 39
40 40 <body>
41 <h1><a name="1" class="wiki-page"></a>Wiki formatting</h1>
41 <h1><a name="1" class="wiki-page"></a>Wiki 文本格式</h1>
42 42
43 <h2><a name="2" class="wiki-page"></a>Links</h2>
43 <h2><a name="2" class="wiki-page"></a>链接</h2>
44 44
45 <h3><a name="3" class="wiki-page"></a>Redmine links</h3>
45 <h3><a name="3" class="wiki-page"></a>Redmine 链接</h3>
46 46
47 <p>Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.</p>
47 <p>在任何使用文本格式的地方,Redmine都允许在资源(问题、变更、wiki页面...)间建立超链接。</p>
48 48 <ul>
49 <li>Link to an issue: <strong>#124</strong> (displays <del><a href="#" class="issue" title="bulk edit doesn't change the category or fixed version properties (Closed)">#124</a></del>, link is striked-through if the issue is closed)</li>
50 <li>Link to an issue note: <strong>#124-6</strong>, or <strong>#124#note-6</strong></li>
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 <li>链接至一个问题的说明: <strong>#124-6</strong>, 或者 <strong>#124#note-6</strong></li>
51 51 </ul>
52 52
53 <p>Wiki links:</p>
53 <p>Wiki链接</p>
54 54
55 55 <ul>
56 <li><strong>[[Guide]]</strong> displays a link to the page named 'Guide': <a href="#" class="wiki-page">Guide</a></li>
57 <li><strong>[[Guide#further-reading]]</strong> takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: <a href="#" class="wiki-page">Guide</a></li>
58 <li><strong>[[Guide|User manual]]</strong> displays a link to the same page but with a different text: <a href="#" class="wiki-page">User manual</a></li>
56 <li><strong>[[Guide]]</strong> 显示一个页面名为'Guide'的链接: <a href="#" class="wiki-page">Guide</a></li>
57 <li><strong>[[Guide#further-reading]]</strong> 链接到页面内的"further-reading"标签. 每个标题都会自动绑定一个标签,方便您进行链接: <a href="#" class="wiki-page">Guide</a></li>
58 <li><strong>[[Guide|User manual]]</strong> 使用不同的文字来显示一个页面名称为'Guide'的链接: <a href="#" class="wiki-page">User manual</a></li>
59 59 </ul>
60 60
61 <p>You can also link to pages of an other project wiki:</p>
61 <p>您也可以链接到其他项目的Wiki页面(使用项目标识):</p>
62 62
63 63 <ul>
64 <li><strong>[[sandbox:some page]]</strong> displays a link to the page named 'Some page' of the Sandbox wiki</li>
65 <li><strong>[[sandbox:]]</strong> displays a link to the Sandbox wiki main page</li>
64 <li><strong>[[sandbox:some page]]</strong> 显示Sandbox项目wiki页面的一个名为'Some page'的链接</li>
65 <li><strong>[[sandbox:]]</strong> 显示Sandbox项目wiki首页的链接</li>
66 66 </ul>
67 67
68 <p>Wiki links are displayed in red if the page doesn't exist yet, eg: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
68 <p>当页面不存在的时候,Wiki链接会以红色来显示,例如: <a href="#" class="wiki-page new">Nonexistent page</a>.</p>
69 69
70 <p>Links to other resources:</p>
70 <p>链接至其他资源:</p>
71 71
72 72 <ul>
73 <li>Documents:
73 <li>文档:
74 74 <ul>
75 <li><strong>document#17</strong> (link to document with id 17)</li>
76 <li><strong>document:Greetings</strong> (link to the document with title "Greetings")</li>
77 <li><strong>document:"Some document"</strong> (double quotes can be used when document title contains spaces)</li>
78 <li><strong>sandbox:document:"Some document"</strong> (link to a document with title "Some document" in other project "sandbox")</li>
75 <li><strong>document#17</strong> (链接到id为17的文档)</li>
76 <li><strong>document:Greetings</strong> (链接到标题为“Greeting”的文档)</li>
77 <li><strong>document:"Some document"</strong> (文档标题包含空格时使用双引号来表示)</li>
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 <li>Versions:
83 <li>版本:
84 84 <ul>
85 <li><strong>version#3</strong> (link to version with id 3)</li>
86 <li><strong>version:1.0.0</strong> (link to version named "1.0.0")</li>
87 <li><strong>version:"1.0 beta 2"</strong></li>
88 <li><strong>sandbox:version:1.0.0</strong> (link to version "1.0.0" in the project "sandbox")</li>
85 <li><strong>version#3</strong> (链接至id为3的版本)</li>
86 <li><strong>version:1.0.0</strong> (链接到名称为“1.0.0”的版本)</li>
87 <li><strong>version:"1.0 beta 2"</strong>(版本名称包含空格时使用双引号来表示)</li>
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 <li>Attachments:
93 <li>附件:
94 94 <ul>
95 <li><strong>attachment:file.zip</strong> (link to the attachment of the current object named file.zip)</li>
96 <li>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)</li>
95 <li><strong>attachment:file.zip</strong> (链接至当前页面下名为file.zip的附件)</li>
96 <li>目前,只有当前页面下的附件能够被引用(如果您在一个问题中,则仅可以引用此问题下的附件)</li>
97 97 </ul></li>
98 98 </ul>
99 99
100 100 <ul>
101 <li>Changesets:
101 <li>变更集:
102 102 <ul>
103 <li><strong>r758</strong> (link to a changeset)</li>
104 <li><strong>commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash)</li>
105 <li><strong>svn1|r758</strong> (link to a changeset of a specific repository, for projects with multiple repositories)</li>
106 <li><strong>commit:hg|c6f4d0fd</strong> (link to a changeset with a non-numeric hash of a specific repository)</li>
107 <li><strong>sandbox:r758</strong> (link to a changeset of another project)</li>
108 <li><strong>sandbox:commit:c6f4d0fd</strong> (link to a changeset with a non-numeric hash of another project)</li>
103 <li><strong>r758</strong> (链接至一个变更集)</li>
104 <li><strong>commit:c6f4d0fd</strong> (链接至一个非数字哈希的变更集)</li>
105 <li><strong>svn1|r758</strong> (链接至指定版本库中的变更集,用于使用多个版本库的项目)</li>
106 <li><strong>commit:hg|c6f4d0fd</strong> (链接至指定版本库中,使用非数字哈希的变更集,此例子中是"hg"版本库下的哈希变更集)</li>
107 <li><strong>sandbox:r758</strong> (链接至其他项目的变更集)</li>
108 <li><strong>sandbox:commit:c6f4d0fd</strong> (链接至其他项目中,使用非数字哈希的变更集)</li>
109 109 </ul></li>
110 110 </ul>
111 111
112 112 <ul>
113 <li>Repository files:
113 <li>版本库文件:
114 114 <ul>
115 <li><strong>source:some/file</strong> (link to the file located at /some/file in the project's repository)</li>
116 <li><strong>source:some/file@52</strong> (link to the file's revision 52)</li>
117 <li><strong>source:some/file#L120</strong> (link to line 120 of the file)</li>
118 <li><strong>source:some/file@52#L120</strong> (link to line 120 of the file's revision 52)</li>
119 <li><strong>source:"some file@52#L120"</strong> (use double quotes when the URL contains spaces</li>
120 <li><strong>export:some/file</strong> (force the download of the file)</li>
121 <li><strong>source:svn1|some/file</strong> (link to a file of a specific repository, for projects with multiple repositories)</li>
122 <li><strong>sandbox:source:some/file</strong> (link to the file located at /some/file in the repository of the project "sandbox")</li>
123 <li><strong>sandbox:export:some/file</strong> (force the download of the file)</li>
115 <li><strong>source:some/file</strong> (链接至项目版本库中位于/some/file的文件)</li>
116 <li><strong>source:some/file@52</strong> (链接至此文件的第52版)</li>
117 <li><strong>source:some/file#L120</strong> (链接至此文件的第120行)</li>
118 <li><strong>source:some/file@52#L120</strong> (链接至此文件的第52版的第120行)</li>
119 <li><strong>source:"some file@52#L120"</strong> (当URL中包含空格时使用双引号来表示)</li>
120 <li><strong>export:some/file</strong> (强制下载此文件,而不是在页面上查看)</li>
121 <li><strong>source:svn1|some/file</strong> (链接至指定版本库中的文件, 用于使用多个版本库的项目)</li>
122 <li><strong>sandbox:source:some/file</strong> (链接至"sandbox"项目的版本库中位于/some/file的文件)</li>
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 <li>Forum messages:
128 <li>论坛消息:
129 129 <ul>
130 <li><strong>message#1218</strong> (link to message with id 1218)</li>
130 <li><strong>message#1218</strong> (链接至id为1218的论坛消息)</li>
131 131 </ul></li>
132 132 </ul>
133 133
134 134 <ul>
135 <li>Projects:
135 <li>项目:
136 136 <ul>
137 <li><strong>project#3</strong> (link to project with id 3)</li>
137 <li><strong>project#3</strong> (链接至id为3的项目)</li>
138 138 <li><strong>project:someproject</strong> (link to project named "someproject")</li>
139 139 </ul></li>
140 140 </ul>
141 141
142 142
143 <p>Escaping:</p>
143 <p>转义字符:</p>
144 144
145 145 <ul>
146 <li>You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !</li>
146 <li>您可以在文本的前面加上感叹号(!)来避免该文本被解析成Redmine链接</li>
147 147 </ul>
148 148
149 149
150 <h3><a name="4" class="wiki-page"></a>External links</h3>
150 <h3><a name="4" class="wiki-page"></a>外部链接</h3>
151 151
152 <p>HTTP URLs and email addresses are automatically turned into clickable links:</p>
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 <p>displays: <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>
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 <p>If you want to display a specific text instead of the URL, you can use the standard textile syntax:</p>
160 <p>如果您想要显示指定的文本而不是链接,您可以通过下列标准的 textile 语法:</p>
161 161
162 162 <pre>
163 "Redmine web site":http://www.redmine.org
163 "Redmine 官网":http://www.redmine.org
164 164 </pre>
165 165
166 <p>displays: <a href="http://www.redmine.org" class="external">Redmine web site</a></p>
166 <p>显示为: <a href="http://www.redmine.org" class="external">Redmine 官网</a></p>
167 167
168 168
169 <h2><a name="5" class="wiki-page"></a>Text formatting</h2>
169 <h2><a name="5" class="wiki-page"></a>字体格式</h2>
170 170
171 171
172 <p>For things such as headlines, bold, tables, lists, Redmine supports Textile syntax. See <a class="external" href="http://en.wikipedia.org/wiki/Textile_%28markup_language%29">http://en.wikipedia.org/wiki/Textile_(markup_language)</a> for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.</p>
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 <h3><a name="6" class="wiki-page"></a>Font style</h3>
174 <h3><a name="6" class="wiki-page"></a>字体风格</h3>
175 175
176 176 <pre>
177 * *bold*
178 * _italic_
179 * _*bold italic*_
180 * +underline+
181 * -strike-through-
177 * *粗体*
178 * _斜体_
179 * _*粗体 斜体*_
180 * +下划线+
181 * -中划线-
182 182 </pre>
183 183
184 <p>Display:</p>
184 <p>显示为:</p>
185 185
186 186 <ul>
187 <li><strong>bold</strong></li>
188 <li><em>italic</em></li>
189 <li><em><strong>bold italic</strong></em></li>
190 <li><ins>underline</ins></li>
191 <li><del>strike-through</del></li>
187 <li><strong>粗体</strong></li>
188 <li><em>斜体</em></li>
189 <li><em><strong>粗体 斜体</strong></em></li>
190 <li><ins>下划线</ins></li>
191 <li><del>中划线</del></li>
192 192 </ul>
193 193
194 <h3><a name="7" class="wiki-page"></a>Inline images</h3>
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 <li>If you have an image attached to your wiki page, it can be displayed inline using its filename: <strong>!attached_image.png!</strong></li>
199 <li>你可以上传图片附件到 wiki 页面,然后使用它的文件名作为路径: <strong>!已上传的图片.png!</strong></li>
200 200 </ul>
201 201
202 <h3><a name="8" class="wiki-page"></a>Headings</h3>
202 <h3><a name="8" class="wiki-page"></a>标题</h3>
203 203
204 204 <pre>
205 h1. Heading
206 h2. Subheading
207 h3. Subsubheading
205 h1. 一级标题
206 h2. 二级标题
207 h3. 三级标题
208 208 </pre>
209 209
210 <p>Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.</p>
210 <p>你可以使用“#一级标题”、“#二级标题”等等来链接到这些标题</p>
211 211
212 212
213 <h3><a name="9" class="wiki-page"></a>Paragraphs</h3>
213 <h3><a name="9" class="wiki-page"></a>段落</h3>
214 214
215 215 <pre>
216 p&gt;. right aligned
217 p=. centered
216 p&gt;. 向右对齐
217 p=. 居中
218 218 </pre>
219 219
220 <p style="text-align:center;">This is a centered paragraph.</p>
220 <p style="text-align:center;">这是一个居中对齐的段落</p>
221 221
222 222
223 <h3><a name="10" class="wiki-page"></a>Blockquotes</h3>
223 <h3><a name="10" class="wiki-page"></a>引用文字</h3>
224 224
225 <p>Start the paragraph with <strong>bq.</strong></p>
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 <p>Display:</p>
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 <h3><a name="11" class="wiki-page"></a>Table of content</h3>
239 <h3><a name="11" class="wiki-page"></a>目录</h3>
240 240
241 241 <pre>
242 {{toc}} =&gt; left aligned toc
243 {{&gt;toc}} =&gt; right aligned toc
242 {{toc}} =&gt; 靠左对齐目录
243 {{&gt;toc}} =&gt; 靠右对齐目录
244 244 </pre>
245 245
246 <h3><a name="14" class="wiki-page"></a>Horizontal Rule</h3>
246 <h3><a name="14" class="wiki-page"></a>水平线</h3>
247 247
248 248 <pre>
249 249 ---
250 250 </pre>
251 251
252 <h2><a name="12" class="wiki-page"></a>Macros</h2>
252 <h2><a name="12" class="wiki-page"></a></h2>
253 253
254 <p>Redmine has the following builtin macros:</p>
254 <p>Redmine内建了以下宏:</p>
255 255
256 256 <p>
257 257 <dl>
258 258 <dt><code>hello_world</code></dt>
259 <dd><p>Sample macro.</p></dd>
259 <dd><p>宏示例.</p></dd>
260 260
261 261 <dt><code>macro_list</code></dt>
262 <dd><p>Displays a list of all available macros, including description if available.</p></dd>
262 <dd><p>显示所有可用的宏列表,如果该宏有提供说明也会一并显示。</p></dd>
263 263
264 264 <dt><code>child_pages</code></dt>
265 <dd><p>Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:</p>
266 <pre><code>{{child_pages}} -- can be used from a wiki page only
267 {{child_pages(depth=2)}} -- display 2 levels nesting only</code></pre></dd>
265 <dd><p>显示一个子页面列表。默认显示当前Wiki页面的所有子页面。 示例:</p>
266 <pre><code>{{child_pages}} -- 只能在Wiki页面调用
267 {{child_pages(depth=2)}} -- 显示两级子页面</code></pre></dd>
268 268
269 269 <dt><code>include</code></dt>
270 <dd><p>Include a wiki page. Example:</p>
270 <dd><p>引用一个Wiki页面。示例:</p>
271 271 <pre><code>{{include(Foo)}}</code></pre>
272 <p>or to include a page of a specific project wiki:</p>
272 <p>或者引用一个指定项目的Wiki页面:</p>
273 273 <pre><code>{{include(projectname:Foo)}}</code></pre></dd>
274 274
275 275 <dt><code>collapse</code></dt>
276 <dd><p>Inserts of collapsed block of text. Example:</p>
276 <dd><p>插入一个折叠文本块。示例:</p>
277 277 <pre><code>{{collapse(View details...)
278 This is a block of text that is collapsed by default.
279 It can be expanded by clicking a link.
278 这是一个默认折叠的文本块。
279 点击链接后将会展开此文本块.
280 280 }}</code></pre></dd>
281 281
282 282 <dt><code>thumbnail</code></dt>
283 <dd><p>Displays a clickable thumbnail of an attached image. Examples:</p>
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 <h2><a name="13" class="wiki-page"></a>Code highlighting</h2>
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
@@ -294,11 +294,11 It can be expanded by clicking a link.
294 294
295 295 <pre>
296 296 &lt;pre&gt;&lt;code class="ruby"&gt;
297 Place your code here.
297 这里写 Ruby 代码
298 298 &lt;/code&gt;&lt;/pre&gt;
299 299 </pre>
300 300
301 <p>Example:</p>
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>
General Comments 0
You need to be logged in to leave comments. Login now