Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
zh-cn:wiki:syntax [2012/04/16 18:48] – [表格] haobug | zh-cn:wiki:syntax [2012/04/16 19:54] – [语法插件] haobug | ||
---|---|---|---|
Line 306: | Line 306: | ||
注意:不支持垂直对齐方式。 | 注意:不支持垂直对齐方式。 | ||
- | ===== No Formatting | + | ===== 无格式化 |
- | If you need to display text exactly like it is typed (without any formatting), | + | 如果您需要文本完全显示为它键入的样子(没有任何格式化), 用 '' |
< | < | ||
- | This is some text which contains addresses like this: http:// | + | 这是一些包含像这样的地址文字:http:// |
</ | </ | ||
- | The same is true for %%//__this__ text// with a smiley ;-)%%. | + | |
+ | 对于带有表情符号的 | ||
< | < | ||
- | | + | |
</ | </ | ||
- | The same is true for %%// | ||
- | ===== Code Blocks | + | 对于带有表情符号的 %%; |
+ | |||
+ | ===== 代码块 | ||
- | You can include code blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags '' | + | 您可以将代码块包含到文档中,可以通过缩进两个空格(像前面例子中所用的那样) 或者使用标 |
- | | + | |
< | < | ||
- | This is preformatted code all spaces are preserved: like <-this | + | 这是预格式化的代码,所有空格都被保留:像 |
</ | </ | ||
< | < | ||
- | This is pretty much the same, but you could use it to show that you quoted a file. | + | 这非常相似,但您可以用它来表明您引用了一个文件。 |
</ | </ | ||
- | Those blocks were created by this source: | + | 这些区块由下面的源码创建: |
- | | + | |
< | < | ||
- | | + | |
</ | </ | ||
< | < | ||
- | | + | |
</ | </ | ||
- | ==== Syntax Highlighting | + | ==== 语法高亮 |
- | [[wiki: | + | [[wiki: |
<code java> | <code java> | ||
/** | /** | ||
- | | + | * HelloWorldApp |
- | * simply displays | + | |
*/ | */ | ||
class HelloWorldApp { | class HelloWorldApp { | ||
public static void main(String[] args) { | public static void main(String[] args) { | ||
- | System.out.println(" | + | System.out.println(" |
} | } | ||
} | } | ||
</ | </ | ||
- | The following language strings are currently recognized: | + | 下列字符串为当前可以识别语言://4cs, abap, actionscript-french, |
- | ==== Downloadable Code Blocks | + | ==== 可下载的代码块 |
- | When you use the '' | + | 当你使用上面的'' |
< | < | ||
Line 378: | Line 379: | ||
</ | </ | ||
- | If you don't want any highlighting but want a downloadable file, specify a dash ('' | + | 如果您不想要任何高亮,但想要一个可下载的文件,指定破折号('' |
+ | ===== 内嵌 HTML 和 PHP ===== | ||
+ | 您可以嵌入原始HTML或PHP代码到文件中,通过使用 '' | ||
- | ===== Embedding | + | HTML 例子: |
- | + | ||
- | You can embed raw HTML or PHP code into your documents by using the '' | + | |
- | + | ||
- | HTML example: | + | |
< | < | ||
< | < | ||
- | This is some <span style=" | + | 这是一些 |
</ | </ | ||
< | < | ||
- | <p style=" | + | <p style=" |
</ | </ | ||
</ | </ | ||
< | < | ||
- | This is some <span style=" | + | 这是一些 |
</ | </ | ||
< | < | ||
- | <p style=" | + | <p style=" |
</ | </ | ||
- | + | PHP 例子: | |
- | PHP example: | + | |
< | < | ||
<php> | <php> | ||
- | echo 'A logo generated by PHP:'; | + | echo ' |
echo '< | echo '< | ||
- | echo '(generated inline HTML)'; | + | echo '(生成内联 html)'; |
</ | </ | ||
<PHP> | <PHP> | ||
- | echo '< | + | echo '< |
echo '< | echo '< | ||
echo '</ | echo '</ | ||
Line 419: | Line 417: | ||
<php> | <php> | ||
- | echo 'A logo generated by PHP:'; | + | echo ' |
echo '< | echo '< | ||
- | echo '(inline HTML)'; | + | echo '(生成内联 html)'; |
</ | </ | ||
<PHP> | <PHP> | ||
- | echo '< | + | echo '< |
echo '< | echo '< | ||
echo '</ | echo '</ | ||
</ | </ | ||
- | **Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. | + | **注意**:HTML 和 PHP 在配置中默认是禁用的。如果禁用了,就会显示它们代码,而不会执行它们。 |
+ | |||
+ | ===== RSS/ATOM Feed 聚合 ===== | ||
+ | 所有的能够被SimplePie理解的格式都可以在DokuWiki中使用。您可以通过多个参数来改变渲染,参数之间用空格隔开: | ||
+ | |||
+ | |||
+ | [[DokuWiki]] 能够从外部的XML feed中聚合数据。用[[http:// | ||
- | ===== RSS/ATOM Feed Aggregation ===== | + | ^ 参数 |
- | [[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters: | + | | any number | 最多显示多少内容项;默认是8 | |
+ | | reverse | ||
+ | | author | ||
+ | | date | 显示条目日期 | | ||
+ | | description| 显示条目的描述;如果 | ||
+ | | //n//[dhm] | 刷新周期,其中,d=天,h=小时,m=分。例如,12h=12个小时。| | ||
- | ^ Parameter | + | 刷新周期默认是4小时。小于或者等于10分钟均视为10分钟。[[wiki:DokuWiki]] 通常会提供页面的缓存版,显然,这种做法不适用于包含动态外部内容的页面。上面的参数告诉 [[wiki: |
- | | any number | will be used as maximum number items to show, defaults to 8 | | + | |
- | | reverse | + | |
- | | author | + | |
- | | date | show item dates | | + | |
- | | description| show the item description. If [[doku> | + | |
- | | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | + | |
- | The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki: | ||
- | **Example:** | + | **举例:** |
{{rss> | {{rss> | ||
- | ===== Control Macros | + | ===== 控制宏 |
- | Some syntax influences how DokuWiki | + | 一些语法会影响DokuWiki对页面的解释,而自身不输出任何内容。可用的控制宏如下: |
- | ^ Macro ^ Description | + | ^ 宏 ^ 描述 |
- | | %%~~NOTOC~~%% | + | | %%~~NOTOC~~%% |
- | | %%~~NOCACHE~~%% | DokuWiki | + | | %%~~NOCACHE~~%% | DokuWiki |
- | ===== Syntax Plugins | + | ===== 语法插件 |
- | DokuWiki's syntax can be extended by [[doku> | + | DokuWiki |
~~INFO: | ~~INFO: | ||