使用者工具

網站工具


wiki:syntax

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
wiki:syntax [2019/01/06 17:18]
127.0.0.1 外部編輯
wiki:syntax [2019/04/13 05:07] (目前版本)
danny8376 update with dokuwiki.org/zh-tw:syntax rev:2017-06-18 15:57
行 1: 行 1:
-====== ​Formatting Syntax ​======+====== ​Wiki 語法 ​======
  
-[[doku>DokuWiki]] ​supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[playground:​playground|playground]] page. The simpler markup is easily accessible via [[doku>​toolbar|quickbuttons]], too.+[[DokuWiki]]支援簡單的語法,使文檔容易閱讀。本頁包含了您在編輯頁面時可以使用的語法。點選在頁面頂端或底端的「編輯本頁」按鈕,可觀看這一頁的原始檔。如要實驗,請移玉步至[[playground:​playground|遊樂場頁面]]。您可以用[[doku>zh-tw:toolbar|編輯按鈕]],讓編輯過程更方便。 
 +歡迎各位中文用戶把本頁的原始碼抄下,並貼至您wiki系統裏的[[wiki:​syntax]]頁面上,取代其英文說明。
  
-===== Basic Text Formatting ​=====+===== 基本文字格式 ​=====
  
-DokuWiki ​supports ​**bold**//italic//, __underlined__ and ''​monospaced'' ​texts. Of course you can **__//''​combine''//​__** ​all these.+DokuWiki支援**粗體**//斜體//、__底線__、''​英文等寬體(monospaced''​,並且可以**__//''​混合(combine)使用''//​__**。此外,DokuWiki亦支援<​sup>​上標</​sup>​、<​sub>​下標</​sub>​和<​del>​刪除線</​del>​。語法如下:
  
-  DokuWiki supports ​**bold**//italic//, __underlined__ and ''​monospaced'' ​texts. +^文字格式^原始寫法^輸出效果^ 
-  Of course you can **__//''​combine''//​__** all these.+|粗體|%%**粗體bold**%%|**粗體bold**| 
 +|斜體|%%//斜體italic//%%|//​斜體italic//​| 
 +|底線|%%__底線underlined__%%|__底線underlined__| 
 +|英文等寬體|%%''​monospaced''​%%|''​monospaced''​
 +|上標|%%y = x<​sup>​2<​/sup> + 1%%|y = x<​sup>​2<​/sup> + 1| 
 +|下標|%%H<​sub>​2</​sub>​O%%|H<​sub>​2</​sub>​O| 
 +|刪除線|%%<​del>​刪除線</​del>​%%|<​del>​刪除線</​del>​|
  
-You can use <​sub>​subscript</​sub>​ and <​sup>​superscript</​sup>,​ too.+DokuWiki使用**空行**來區分**段落**,段落與段落間會有明顯的空間以作分隔。
  
-  You can use <​sub>​subscript</​sub>​ and <​sup>​superscript</​sup>,​ too.+若您要**強制換行**而不開新段落,您可以使用兩個倒斜線,加一個空格或Enter作爲標記。請看示範:
  
-You can mark something as <​del>​deleted</​del>​ as well.+這是一些有換行標記的文字。\\ 請注意: 
 +兩個倒斜線只在Enter之前\\ 
 +或者接在\\ 一個空格之前,才會有效。\\而這樣就並不起作用。
  
-  ​You can mark something as <​del>​deleted</​del>​ as well.+  ​這是一些有換行標記的文字。\\ 請注意: 
 +  兩個倒斜線只在Enter之前\\ 
 +  或者接在\\ 一個空格之前,才會有效。\\而這樣就並不起作用。
  
-**Paragraphs** are created from blank lines. If you want to **force a newline** without a paragraph, you can use two backslashes followed by a whitespace or the end of line.+===== 連結 =====
  
-This is some text with some linebreaks\\ Note that the +DokuWiki__可使用多種型態的連結。__介紹如下:
-two backslashes are only recognized at the end of a line\\ +
-or followed by\\ a whitespace \\this happens without it.+
  
-  This is some text with some linebreaks\\ Note that the +==== 外部連結 ====
-  two backslashes are only recognized at the end of a line\\ +
-  or followed by\\ a whitespace \\this happens without it.+
  
-You should use forced newlines only if really needed.+DokuWiki會自動標別外部連結,例如http://​www.google.com或簡化式www.google.com。您也可把文本設定成連結:[[http://​www.google.com|例如這樣會連到Google]]。連電郵也可以用<​andi@splitbrain.org>​或[[andi@splitbrain.org|andi]]來表示。
  
-===== Links =====+  DokuWiki會自動標別外部連結,例如http://​www.google.com或簡化式www.google.com。 
 +  您也可把文本設定成連結:[[http://​www.google.com|例如這樣會連到Google]]。 
 +  連電郵也可以用<​andi@splitbrain.org>​或[[andi@splitbrain.org|andi]]來表示。
  
-DokuWiki supports multiple ways of creating links.+==== 內部連結 ====
  
-==== External ====+您可以用兩組方括號包裹要連結的頁面名稱,產生內部連結。可以直接括起[[頁面名稱]],或改爲顯示該連結的[[頁面名稱|說明文字]]。
  
-External links are recognized automagically:​ http://​www.google.com or simply www.google.com - You can set the link text as well: [[http://​www.google.com|This Link points to google]]. Email addresses like this one: <​andi@splitbrain.org>​ are recognized, too.+  您可以用兩個方括號包裹要連結的頁面名稱,產生內部連結。 
 +  可以直接括起[[頁面名稱]],或改爲顯示該連結的[[頁面名稱|說明文字]]
  
-  DokuWiki supports multiple ways of creating links. External links are recognized +頁面名稱裏的大寫英文字母會自動變成小寫字母,並且不支援特殊符號。
-  automagically:​ http://​www.google.com or simply www.google.com - You can set +
-  link text as well: [[http://​www.google.com|This Link points to google]]. Email +
-  addresses like this one: <​andi@splitbrain.org>​ are recognized, too.+
  
-==== Internal ====+您也可以使用半形冒號「:​」產生分類名稱,替頁面歸類。例如[[wiki:​syntax]]。
  
-Internal links are created by using square brackets. You can either just give a [[pagename]] or use an additional [[pagename|link text]].+  您也可以使用半形冒號「:​」產生分類名稱,替頁面歸類。例如[[wiki:syntax]]
  
-  Internal links are created by using square brackets. You can either just give +若想深入了解分類名稱(namespaces,或稱命名空間),請見[[doku>​zh-tw:​namespaces|這裏]]
-  a [[pagename]] or use an additional [[pagename|link text]].+
  
-[[doku>​pagename|Wiki pagenames]] are converted to lowercase automatically,​ special characters are not allowed.+您也可以直接連結某個頁面的某章節段落。就像HTML一樣,只要在該頁後面加上「#​某章節」即可。比如:
  
-You can use [[some:​namespaces]] by using a colon in the pagename.+這會連到[[syntax#​內部連結|這一節]]
  
-  ​You can use [[some:​namespaces]] by using a colon in the pagename.+  ​這會連到[[syntax#​內部連結|這一節]]
  
-For details about namespaces see [[doku>​namespaces]].+請注意:
  
-Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to [[syntax#internal|this Section]].+  * [[syntax|已存在的頁面]]與[[不存在的頁面]]會以不同方式呈現。具體呈現方式,則視乎您的style.css裏CSS之設定。 
 +  * DokuWiki不會自動替[[wp>​CamelCase|駝峰文字]]轉換成連結。若有需要,請在[[doku>​zh-tw:​config|設定選項]]裏開啟。 
 +    - 駝峰文字(CamelCase)簡言之就是「幾個英文單字之間緊接著而沒有空格」所組成的詞彙,但每個單字的首字大寫,狀如駝峰([[dict>​Camel]]),故得此名。 
 +    - 若在[[doku>​zh-tw:​config|設定選項]]裏開啟駝峰文字功能,那麼在文章內打出的駝峰文字(如:DokuWiki)就會自動成爲連結。 
 +  * 若章節所在的頁面標題改變了,其連結也會跟着改變。因此請別過度依賴章節連結功能。 
 +  * 此外,可參考[[doku>​zh-tw:​pagename|DokuWiki網站有關「頁面名稱」的說明]]。
  
-  This links to [[syntax#​internal|this Section]].+==== Wiki間的互連 ====
  
-Notes:+DokuWiki支援[[doku>​zh-tw:Interwiki|wiki間的互連]]。例如要連接到英文維基百科的「Wiki」頁,輸入[[wp>​Wiki]]即可。
  
-  ​* Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. +  ​DokuWiki支援[[doku>​zh-tw:​Interwiki|wiki間的互連]] 
-  ​* DokuWiki does not use [[wp>CamelCase]] to automatically create links by default, but this behavior can be enabled in the [[doku>​config]] file. Hint: If DokuWiki is a link, then it's enabled. +  ​例如要連接到英文維基百科的「Wiki」頁,輸入[[wp>Wiki]]即可。
-  * When a section'​s heading is changed, its bookmark changes, too. So don't rely on section linking too much.+
  
-==== Interwiki ====+此外還可運用:
  
-DokuWiki supports ​[[doku>Interwiki]] linksThese are quick links to other WikisFor example this is a link to Wikipedia'​s page about Wikis: ​[[wp>Wiki]].+^原始寫法^出現的結果^說明^ 
 +|%%[[%%google>Wiki%%]]%%|[[google>​Wiki]] |請 Google 搜尋大神幫您找有關 Wiki 的網頁| 
 +|%%[[%%wp>​Wiki%%]]%%|[[wp>​Wiki]] |連到 Wikipedia(維基百科)的 Wiki 頁| 
 +|%%[[Meatball>​MeatballWiki]]%%|[[Meatball>​MeatballWiki]] |連到 MeatBall Wiki 的 MeatballWiki 頁| 
 +|%%[[phpfn>​phpinfo]]%%|[[phpfn>​phpinfo]] |到 php 官網看 phpinfo function 的手冊說明| 
 +|%%[[JspWiki>​System.out.println]]%%|[[JspWiki>System.out.println]] |從 JSP Wiki 找 System.out.println 說明| 
 +|%%[[FreeBSDman>​uname]]%%|[[FreeBSDman>​uname]] |到 FreeBSD 官網找 uname 的線上說明| 
 +|%%[[man>​passwd]]%%|[[man>​passwd]] |到 Linux Qustion 查 passwd 的用法| 
 +|%%[[rfc>​2010]]%%|[[rfc>​2010]] |找 RFC #2010 文件| 
 +|%%[[amazon>​Bible]]%%|[[amazon>​Bible]] | 到亞馬遜書局找有關聖經(Bible)的書| 
 +|%%[[dict>​apple]]%%|[[dict>​apple]] |從雅虎奇摩字典查 apple 單字| 
 +|%%[[imdb>​Titanic]]%%|[[imdb>​Titanic]] |從 IMDB((IMDB->​Internet Movie Database))電影資料庫尋找有關 鐵達尼(Titanic) 的資料 | 
 +|%%[[GoogleGroups>​FireBird BBS]]%%|[[GoogleGroups>​FireBird BBS]] |用Google Newsgroup內找 FireBird BBS 文章(tw.bbs.*轉信文章亦可)| 
 +|%%[[bug>​4]]%%|[[bug>​4]] | 察看 DOKUWIKI 編號 4 的 bug 回報| 
 +備註:此外,還有多種變化,請自行參見下列有關''​conf/​interwiki.conf''​的說明。
  
-  ​DokuWiki ​supports ​[[doku>​Interwiki]] linksThese are quick links to other Wikis. +InterWiki可透過''​conf/​interwiki.conf''​檔來設定。DokuWiki內建包含了 ​[[http://​usemod.com/​intermap.txt]] 所列的每項 InterWiki,格式如下:
-  For example this is a link to Wikipedia'​s page about Wikis: [[wp>​Wiki]].+
  
-==== Windows Shares ====+^捷徑名稱{NAME}^網址{URL}^ 
 +|wp        |http://​en.wikipedia.org/​wiki/​| 
 +|wpzh      |http://​zh.wikipedia.org/​wiki/​| 
 +|wpjp      |http://​jp.wikipedia.org/​wiki/​| 
 +|wpde      |http://​de.wikipedia.org/​wiki/​|
  
-Windows shares like [[\\server\share|this]] are recognized, tooPlease note that these only make sense in a homogeneous user group like a corporate [[wp>​Intranet]].+若不想用預設的圖示,那麼可在''​interwiki''​目錄內放跟捷徑名稱相同的圖檔。比如捷徑名稱爲「wp」,那麼圖檔名稱應爲「wp.gif」或「wp.png」才行。這些圖檔必須是16x16像素的PNG或GIF格式檔案。
  
-  Windows Shares like [[\\server\share|this]] are recognized, too.+==== 網路芳鄰分享的連結 ====
  
-Notes:+微軟Windows主機使用SMB((Server Message Block))協定,或稱爲CIFS((CommonInternet File System))的協定。協定可讓Windows主機把另一Windows主機目錄檔案,當成是本機上的目錄檔案般使用。這就是網路芳鄰分享。這協定亦可用於互聯網。位於不同網段的Windows主機,若在傳送過程中未有其他的網路設備阻擋的話,也可使用此協定,進行目錄檔案的分享。其他作業系統,例如FreeBSD、Linux等,也可透過相關的Samba軟件,以使用這項功能。
  
-  ​For security reasons direct browsing of windows shares only works in Microsoft ​Internet Explorer ​per default (and only in the "local zone"​). +網芳資源可用[[\\server\share|這樣子]]來進行連結。 
-  * For Mozilla ​and Firefox ​it can be enabled through different workaround mentioned in the [[http://​kb.mozillazine.org/​Links_to_local_pages_do_not_work|Mozilla ​Knowledge Base]]. However, there will still be a JavaScript ​warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''​conf/lang/​en/​lang.php''​ (more details at [[doku>​localization#​changing_some_localized_texts_and_strings_in_your_installation|localization]]):​ <code - conf/​lang/​en/​lang.php>​ + 
-<?php +  網芳資源可用[[\\server\share|這樣子]]來進行連結。 
-/** + 
- * Customization of the english language file +另外可參考[[wp>​Intranet]]的說明。 
- * Copy only the strings that needs to be modified + 
- */ +千萬要注意:​ 
-$lang['​js'​]['​nosmblinks'​] = '';​ + 
-</​code>​+  ​爲了系統安全,直接瀏覽「網路芳鄰」的功能只適用於微軟Internet Explorer。 
 +  * 請注意相關安全問題:鑑於SMB協定具有相當的便利性,但設定不夠完善的Windows主機(如密碼設定不夠安全,或者未設定密碼)常讓外界使用者經此網路芳鄰分享,泄漏區域網路內相關檔案或系統上的機密資訊,甚至讓網路駭客完全控制該部主機。譬如2001年中的Nimda病毒,就是經由網路芳鄰的方式,散佈病毒至另一台保護不週的Windows主機上,造成感染病毒的速度加快。所以,經由開放網路芳鄰分享於外界使用者,來增加與其他單位(如所屬機關、外部辦公室或駐外機構)的聯繫方便時,亦可能形成安全上的漏洞,尤其是對保護不週的Windows主機而言。 
 +  * MozillaFirefox的使用者,可採用[[http://​kb.mozillazine.org/​Firefox_:​_Issues_:​_Links_to_Local_Pages_Don%27t_Work|Mozilla知識庫]]裏提及的不同解決方法,啟用此功能。唯在開啟網路芳鄰時,仍會彈出JavaScript警告。若要爲所有使用者去除這個警告,請把下列文字增加至”conf/userscript.js”中: 
 + 
 +  $lang['​js'​]['​nosmblinks'​] = '';​ 
 + 
 +==== 圖片連結 ==== 
 + 
 +您也可透過圖片來連到wiki內部的頁面,或者其他URL,比如:
  
-==== Image Links ====+  [[http://​www.php.net|{{wiki:​dokuwiki-128.png}}]]
  
-You can also use an image to link to another internal or external page by combining the syntax for links and [[#​images_and_other_files|images]] (see below) like this:+[[http://​www.php.net|{{wiki:​dokuwiki-128.png}}]]
  
-  ​[[http://​php.net|{{wiki:​dokuwiki-128.png}}]]+注意:在%%[[%%網址%%|%%連結名稱%%]]%%的「連結名稱」處,若使用「%%{{%%%%}}%%」的話,則只能輸入圖片檔案名稱。
  
-[[http://​php.net|{{wiki:​dokuwiki-128.png}}]]+DokuWiki支援完整的圖像和連結語法,包括圖像大小調整、內部和外部的圖像與連結,以及wiki內連結。
  
-Please note: The image formatting is the only formatting syntax accepted in link names.+===== 註解 =====
  
-The whole [[#​images_and_other_files|image]] and [[#​links|link]] syntax is supported ​(including image resizing, internal and external images and URLs and interwiki links).+您可以隨意增加註解((這是一個註解。))。只要用兩組圓括號括着註解文字即可。
  
-===== Footnotes =====+  您可以隨意增加註解((這是一個註解。))。只要用兩組圓括號括着註解文字即可。
  
-You can add footnotes ((This is a footnote)) by using double parentheses.+===== 目錄的層次結構 =====
  
-  You can add footnotes ((This is a footnote)) by using double parentheses.+層次分明的內容、有條不絮的說明文字,總是最能令人消化吸收的。
  
-===== Sectioning =====+我們可以透過設定最多五種不同層次的標題,來自動建構出目錄表。若該頁內有至少三個層次的標題,DokuWiki就會自動產生相對應的目錄表(table of contents,簡稱TOC)。若不想在該頁面顯示目錄表,只要在文章開頭輸入%%~~NOTOC~~%%即可。
  
-You can use up to five different levels of headlines to structure your content. If you have more than three headlines, a table of contents is generated automatically -- this can be disabled by including the string ''<​nowiki>​~~NOTOC~~</​nowiki>''​ in the document.+標題是在左右各以等號「=」標示,從兩個到六個等號,每增多一個等號,就代表更高層次的標題。有六個等號是「第一級標題層次」,而本節目前是%%===== 目錄的層次結構 =====%%,也就是「第二級標題層次」。請見示範:
  
-==== Headline Level 3 ==== +==== 第三級標題層次 ​==== 
-=== Headline Level 4 === +=== 第四級標題層次 ​=== 
-== Headline Level 5 ==+== 第五級標題層次 ​==
  
-  ==== Headline Level 3 ==== +  ==== 第三級標題層次 ​==== 
-  === Headline Level 4 === +  === 第四級標題層次 ​=== 
-  == Headline Level 5 ==+  == 第五級標題層次 ​==
  
-By using four or more dashes, you can make a horizontal line:+另外,使用連續四個短折號「-」,組成「%%----%%」,即可產生水平線。如:
  
 ---- ----
  
-===== Media Files =====+===== 內嵌圖片和其他檔案 ​=====
  
-You can include external and internal ​[[doku>​images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them.+您可以用兩組花括號「%%{{%% %%}}%%」,在頁面中加入外部或內部的[[doku>zh-tw:images|圖片]]。您還可以指定它們的大小。
  
-Real size:                        {{wiki:​dokuwiki-128.png}}+原始大小:                        {{wiki:​dokuwiki-128.png}}
  
-Resize to given width:            {{wiki:​dokuwiki-128.png?​50}}+縮放爲自訂的寬度(50 pixel):            {{wiki:​dokuwiki-128.png?​50}}
  
-Resize to given width and height((when the aspect ratio of the given width and height doesn'​t match that of the image, it will be cropped to the new ratio before resizing)): {{wiki:​dokuwiki-128.png?​200x50}}+縮放爲自訂的大小(200×50)((若指定的長寬比與圖片本身不一致,在調整圖片大小前,它將被裁剪到新的比例。)): {{wiki:​dokuwiki-128.png?​200x50}}
  
-Resized external image:           ​{{http://​php.net/​images/​php.gif?​200x50}}+縮放外部連結的影像(100×100):           ​{{http://​de3.php.net/​images/​php.gif?​100x100}}
  
-  ​Real size:                        {{wiki:​dokuwiki-128.png}} +  ​原始大小:                        {{wiki:​dokuwiki-128.png}} 
-  ​Resize to given width:            {{wiki:​dokuwiki-128.png?​50}} +  ​縮放爲自訂的寬度(50 pixel):            {{wiki:​dokuwiki-128.png?​50}} 
-  ​Resize to given width and height: {{wiki:​dokuwiki-128.png?​200x50}} +  ​縮放爲自訂的大小(200×50): {{wiki:​dokuwiki-128.png?​200x50}} 
-  ​Resized external image:           ​{{http://​php.net/​images/​php.gif?​200x50}}+  ​縮放外部連結的影像(100×100):           ​{{http://​de3.php.net/​images/​php.gif?​100x100}}
  
- +使用左空格或右空格,您可以選擇對齊方式。請看示範:
-By using left or right whitespaces you can choose the alignment.+
  
 {{ wiki:​dokuwiki-128.png}} {{ wiki:​dokuwiki-128.png}}
行 157: 行 191:
   {{ wiki:​dokuwiki-128.png }}   {{ wiki:​dokuwiki-128.png }}
  
-Of course, you can add a title (displayed as a tooltip by most browsers), too.+上方的示範中,第一行把圖片置右,第二行把圖片置左,第三行則把圖片置中。
  
-{{ wiki:​dokuwiki-128.png |This is the caption}}+還可在圖片上加上說明文字(在多數的瀏覽器上,滑鼠移到該圖上則會顯示)。
  
-  ​{{ wiki:​dokuwiki-128.png |This is the caption}}+{{ wiki:​dokuwiki-128.png |這是該圖的說明}}
  
-For linking an image to another page see [[#Image Links]] above.+  {{ wiki:​dokuwiki-128.png |這是該圖的說明}}
  
-==== Supported Media Formats ====+若您所指定的檔案(無論是內部或外部連結)並不是圖片(即非GIF、JPEG、PNG這三種格式類型),那麼「這是該圖的說明」那段文字會被當作連結顯示出來,效果等同HTML中的%%<​img alt=“這是該圖的說明”>​%%。
  
-DokuWiki can embed the following media formats directly.+要把圖片連至其他頁面,參看上方[[syntax#​圖片連結|圖片連結]]段落。
  
-| Image | ''​gif'',​ ''​jpg'',​ ''​png'' ​ | +===== 項目表 =====
-| Video | ''​webm'',​ ''​ogv'',​ ''​mp4''​ | +
-| Audio | ''​ogg'',​ ''​mp3'',​ ''​wav'' ​ | +
-| Flash | ''​swf'' ​                   |+
  
-If you specify a filename that is not a supported media format, then it will be displayed as a link instead.+DokuWiki可使用項目表有兩種型態:數字及符號表。要建立項目表的話,在該行前面先空出兩格,然後加上「%%*%%」即可產生符號項目表。若用「%%-%%」則會產生數字項目表。
  
-By adding ''?​linkonly''​ you provide a link to the media without displaying it inline+  *這是項目表 
 +    * 然而 
 +      * 也可以用不同層次的項目表來表達 
 +        * 其他
  
-  ​{{wiki:​dokuwiki-128.png?​linkonly}}+  - 這也一樣是項目表,不過前面會加上編號 
 +    - 第二項 
 +      - 只要在 ''​-''​ 或 ''​*''​ 前面多加空白,就會內縮爲更深(細微)的層次了。 
 +        - 第三項
  
-{{wiki:​dokuwiki-128.png?​linkonly}} This is just a link to the image.+  ​空行,則會結束列表,重新起算編號。
  
-==== Fallback Formats ====+<​code>​ 
 +  *這是項目表 
 +    * 然而 
 +      * 也可以用不同層次的項目表來表達 
 +        * 其他
  
-Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility.+  - 這也一樣是項目表,不過前面會加上編號 
 +    - 第二項 
 +      - 只要在 ''​-''​ 或 ''​*''​ 前面多加空白,就會內縮爲更深(細微)的層次了。 
 +        - 第三項
  
-For example consider this embedded mp4 video:+  - 空行,則會結束列表,重新起算編號。 
 +</​code>​
  
-  {{video.mp4|A funny video}}+更詳盡的說明,請看[[doku>​faq:​lists|DokuWiki上的FAQ on list items]]。
  
-When you upload a ''​video.webm''​ and ''​video.ogv''​ next to the referenced ''​video.mp4'',​ DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser. +===== 文本轉換 ​=====
- +
-Additionally DokuWiki supports a "​poster"​ image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a ''​video.jpg''​ file would work. +
- +
-===== Lists ===== +
- +
-Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a ''​*''​ for unordered lists or a ''​-''​ for ordered ones. +
- +
-  * This is a list +
-  * The second item +
-    * You may have different levels +
-  * Another item +
- +
-  - The same list but ordered +
-  - Another item +
-    - Just use indention for deeper levels +
-  - That's it +
- +
-<​code>​ +
-  * This is a list +
-  * The second item +
-    * You may have different levels +
-  * Another item +
- +
-  - The same list but ordered +
-  - Another item +
-    - Just use indention for deeper levels +
-  - That's it +
-</​code>​+
  
-Also take a look at the [[doku>​faq:​lists|FAQ on list items]].+DokuWiki可以將預定義的字符或者字符串轉換成圖片、其他文本或HTML。
  
-===== Text Conversions =====+文本到圖片的轉換,主要用作表情符號。文本到HTML的轉換,多用於顯示符號替換,但也可以配置爲使用其他HTML。
  
-DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML.+==== 文本到圖片的轉換 ====
  
-The text to image conversion is mainly done for smileys. ​And the text to HTML conversion is used for typography replacements,​ but can be configured to use other HTML as well.+DokuWiki支援一些[[doku>​zh-tw:​Smileys|表情符號]]。表情符號圖片,都收錄於smiley目錄內。您可透過conf目錄下的smileys.conf檔案,來做更多的設定。
  
-==== Text to Image Conversions ====+Dokuwiki已內建了一些表情符號,例如輸入「%%^_^%%」,就會顯示出大家很熟悉的笑臉:^_^。以下是目前DokuWiki其他內建的表情符號列表:
  
-DokuWiki converts commonly used [[wp>​emoticon]]s to their graphical equivalents. Those [[doku>​Smileys]] and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki:+^原始寫法^輸出效果^ 
 +|%%8-)%%|8-)| 
 +|%%8-O%%|8-O| 
 +|%%:-(%%|:-(| 
 +|%%:​-)%%|:​-)| 
 +|%%=)%%|=)| 
 +|%%:​-/​%%|:​-/​| 
 +|%%:​-\%%|:​-\| 
 +|%%:​-?​%%|:​-?​| 
 +|%%:​-D%%|:​-D| 
 +|%%:​-P%%|:​-P| 
 +|%%:​-O%%|:​-O| 
 +|%%:​-X%%|:​-X| 
 +|%%:​-|%%|:​-|| 
 +|%%;​-)%%|;​-)| 
 +|%%:?:​%%|:?:​| 
 +|%%:​!:​%%|:​!:​| 
 +|%%LOL%%|LOL| 
 +|%%FIXME%%|FIXME| 
 +|%%DELETEME%%|DELETEME|
  
-  * 8-) %%  8-)  %% +==== 文本到顯示符號的轉換 ====
-  * 8-O %%  8-O  %% +
-  * :-( %%  :-(  %% +
-  * :-) %%  :-)  %% +
-  * =)  %%  ​=)   %% +
-  * :-/ %%  :-/  %% +
-  * :-\ %%  :-\  %% +
-  * :-? %%  :-?  %% +
-  * :-D %%  :-D  %% +
-  * :-P %%  :-P  %% +
-  * :-O %%  :-O  %% +
-  * :-X %%  :-X  %% +
-  * :-| %%  :-|  %% +
-  * ;-) %%  ;-)  %% +
-  * ^_^ %%  ^_^  %% +
-  * :?: %%  :?:  %% +
-  * :!: %%  :!:  %% +
-  * LOL %%  LOL  %% +
-  * FIXME %%  FIXME %% +
-  * DELETEME %% DELETEME %%+
  
-==== Text to HTML Conversions ====+DokuWiki可將特定字符轉換爲顯示時所用的樣式。以下是部份可識別字符的例子:
  
-Typography: [[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.+^原始寫法^輸出效果^ 
 +|%%->​%%|->​| 
 +|%%<​-%%|<​-| 
 +|%%<​->​%%|<​->​| 
 +|%%=>​%%|=>​| 
 +|%%<​=%%|<​=| 
 +|%%<​=>​%%|<​=>​| 
 +|%%>>​%%|>>​| 
 +|%%<<​%%|<<​| 
 +|%%--%%|--| 
 +|%%---%%|---| 
 +|%%640x480%%|640x480| 
 +|%%(c)%%|(c)| 
 +|%%(tm)%%|(tm)| 
 +|%%(r)%%|(r)|
  
--> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)+DokuWiki也可以自動辨別英文引號的開關。例如這一句:
 "He thought '​It'​s a man's world'​..."​ "He thought '​It'​s a man's world'​..."​
 +它的原始碼就是:
  
-<​code>​ +  ​"He thought '​It'​s a man's world'​..."​
--> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) +
-"He thought '​It'​s a man's world'​..."​ +
-</​code>​+
  
-The same can be done to produce any kind of HTML, it just needs to be added to the [[doku>​entities|pattern file]].+您可以到[[doku>zh-tw:entities|模式文件]]裏添加顯示符號之轉換。
  
-There are three exceptions which do not come from that pattern file: multiplication entity (640x480), '​single'​ and "​double quotes"​. They can be turned off through a [[doku>​config:​typography|config option]].+然而,上述例子中,有三個符號並非來自模式文件。它們是:乘號、英文單引號和英文雙引號。您可到[[doku>​config:​typography|設定選項]]裏關閉之。
  
-===== Quoting ​=====+===== 層次標示 ​=====
  
-Some times you want to mark some text to show it's a reply or comment. You can use the following syntax:+有時候(特別是討論時)您想把某些文字(尤爲各次的回覆)標示作不同的層次,您可以使用下列的語法:
  
-<code+  我想我們應該這麼做 
-I think we should do it+   
 +  ​不,我們不該。 
 +   
 +  >> 嗯,我想我們應該。 
 +   
 +  > 眞的嗎? 
 +   
 +  >> 當然! 
 +   
 +  >>>​ 那就做吧!
  
-> No we shouldn'​t+那麼,DokuWiki便會顯示成:
  
->> Well, I say we should+我想我們應該這麼做
  
-Really?+不,我們不該。
  
->> ​Yes!+>> ​嗯,我想我們應該。
  
->>> Then lets do it! +眞的嗎?
-</​code>​+
  
-I think we should do it+>> 當然!
  
-No we shouldn'​t+>>> 那就做吧!
  
->> Well, I say we should+===== 表格 =====
  
-> Really?+DokuWiki建立表格的方式很簡單:
  
->> Yes!+^ 標題1 ​       ^ 標題2 ​        ^ 標題3 ​       ^ 
 +| (1,1)        | (1,2)         | (1,3)        | 
 +| (2,1)        | 水平合併示範(注意兩條豎線)|| 
 +| (3,1)        | (3,2)         | (3,3)        |
  
->>>​ Then lets do it!+以「%%|%%」開始與結束的是「普通欄位」,而「%%^%%」則是「標題欄位」。
  
-===== Tables =====+  ^ 標題1 ​       ^ 標題2 ​        ^ 標題3 ​       ^ 
 +  | (1,1)        | (1,2)         | (1,3)        | 
 +  | (2,1)        | 水平合併示範(注意兩條豎線)|| 
 +  | (3,1)        | (3,2)         | (3,3)        |
  
-DokuWiki supports a simple syntax to create tables.+要水平合併兩格或多格,只要把後方的設置爲空即可,如上面所示。請確保每行都有相同數量的分隔符。
  
-^ Heading 1      ^ Heading 2       ^ Heading 3          ^ +標題也可用於「垂直欄位」上:
-| Row 1 Col 1    | Row 1 Col 2     | Row 1 Col 3        | +
-| Row 2 Col 1    | some colspan (note the double pipe) || +
-| Row 3 Col 1    | Row 3 Col 2     | Row 3 Col 3        |+
  
-Table rows have to start and end with a ''​|''​ for normal rows or a ''​^''​ for headers.+         標題1 ​         ^ 標題2 ​         ^ 
 +^ 標題3 ​   | (1,2)          | (1,3)          | 
 +^ 標題4 ​   | 這次不再合併了 |                | 
 +^ 標題5 ​   | (2,2)          | (2,3)          |
  
-  ^ Heading 1      ^ Heading 2       ^ Heading ​         ^ +方法就是直接在「標題3、4、5」前面加上「%%^%%」即可。
-  | Row 1 Col 1    | Row 1 Col 2     | Row 1 Col 3        | +
-  | Row 2 Col 1    | some colspan (note the double pipe) || +
-  | Row 3 Col 1    | Row 3 Col 2     | Row 3 Col 3        |+
  
-To connect cells horizontallyjust make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators!+  |          ^ 標題1 ​         ^ 標題2 ​         ^ 
 +  ^ 標題3 ​   | (1,2)          | (1,3)          | 
 +  ^ 標題4 ​   | 這次不再合併了 |                | 
 +  ^ 標題5 ​   | (2,2)          | (2,3)          |
  
-Vertical tableheaders are possible, too.+您也可以垂直合併兩格或多格。只要在下面的格內輸入「%%:::​%%」即可。
  
-|              ​Heading ​           Heading ​         ^ +標題1 ^ 標題            ​標題
-^ Heading ​   Row Col 2          ​Row Col        +|(1,1)| 這次示範垂直合併 ​   ​|(1,3)
-^ Heading 4    ​no colspan this time                    +|(2,1):::                 ​|(2,​3)
-^ Heading 5    ​Row 2 Col 2          ​Row Col        |+|(3,1)| :::                 |(2,3)|
  
-As you can see, it's the cell separator before a cell which decides about the formatting:+除跨行合併語法「%%:::​%%」外,單元格中不能包含其他內容。
  
-  ​|              ​Heading ​           Heading ​         +  ^ 標題1 ^ 標題            ^ 標題3 ​
-  ​^ Heading 3    ​Row Col 2          ​Row Col        +  |(1,1)| 這次示範垂直合併 ​   ​|(1,3)
-  ​^ Heading 4    ​no colspan this time                    +  |(2,1):::                 ​|(2,​3)
-  ​^ Heading 5    ​Row 2 Col 2          ​Row Col        |+  |(3,1)| :::                 |(2,3)|
  
-You can have rowspans (vertically connected cells) by adding ''​%%:::​%%''​ into the cells below the one to which they should connect.+您還可以對齊表格的文字。只要在文本的相反方向添加至少兩個半形空格:如果要靠右對齊,在左邊添加兩個半形空格;反之,則在右邊添加。在兩邊均添加空格,即可以居中對齊。
  
-Heading 1      ^ Heading 2                  ^ Heading 3          ^ + ​對齊了的表格 ​                                    ||| 
-Row 1 Col 1    ​this cell spans vertically ​Row 1 Col 3        ​+         ​靠右對齊 ​ ​居中對齊 ​        靠左對齊 ​         ​
-Row 2 Col 1    ​:::                        ​Row 2 Col 3        ​+靠左對齊 ​         ​         ​靠右對齊 ​ ​居中對齊 ​        
-Row 3 Col 1    ​:::                        ​Row 2 Col 3        ​|+xxxxxxxxxxxx  ​xxxxxxxxxxxx  ​xxxxxxxxxxxx  ​|
  
-Apart from the rowspan syntax those cells should not contain anything else.+下面是源文件中的樣子:
  
-  ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^ +  ^           對齊了的表格 ​                  ^^^ 
-  | Row 1 Col 1    | this cell spans vertically | Row 1 Col 3        | +  |      ​靠右對齊  居中對齊 ​  |靠左對齊 ​     ​
-  | Row 2 Col 1    | :::                        | Row 2 Col 3        | +  |靠左對齊 ​     ​     ​靠右對齊  居中對齊 ​  |
-  | Row 3 Col 1    | :::                        | Row 2 Col 3        | +
- +
-You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text. +
- +
-^           Table with alignment ​          ^^^ +
-|         ​right| ​   center ​   |left          | +
-|left          |         ​right| ​   center ​   | +
-| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | +
- +
-This is how it looks in the source: +
- +
-  ^           Table with alignment ​          ^^^ +
-  |         right   ​center ​   ​|left          ​+
-  |left          ​        right   ​center ​   ​|+
   | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |   | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
  
-Note: Vertical alignment is not supported.+注意:不支援垂直對齊。
  
-===== No Formatting ​=====+===== 無格式化 ​=====
  
-If you need to display text exactly like it is typed (without any formatting),​ enclose the area either with ''​%%<​nowiki>​%%''​ tags or even simpler, with double percent signs ''​<​nowiki>​%%</​nowiki>​''​.+若有一段文字,您不要它作格式化處理,要顯示作原來的樣子,請用「%%<nowiki></​nowiki>​%%」標籤包圍這個區域。您也可以使用兩個百分號「<​nowiki>​%%</​nowiki>​」。
  
-<​nowiki>​ +<​nowiki>​正如本段示範裏,本來包含了網址:http://​www.splitbrain.org,以及**加上格式的文字**,但它沒有給格式化。連表情符號;​-)的轉換,也與//__加上格式的文字__//一樣,全都失效了。<​/nowiki>
-This is some text which contains addresses like this: http://​www.splitbrain.org ​and **formatting**, but nothing is done with it. +
-</nowiki>​ +
-The same is true for %%//__this__ text// with a smiley ;-)%%.+
  
-  <​nowiki>​ +  <​nowiki>​正如本段示範裏,本來包含了網址:http://​www.splitbrain.org, 
-  This is some text which contains addresses like this: http://​www.splitbrain.org ​and **formatting**, but nothing is done with it. +  以及**加上格式的文字**,但它沒有給格式化。 
-  ​</nowiki>​ +  ​連表情符號;​-)的轉換,也與//__加上格式的文字__//一樣,全都失效了。<​/nowiki>
-  The same is true for %%//__this__ text// with a smiley ;-)%%.+
  
-===== 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 ''​%%<​code>​%%''​ or ''​%%<​file>​%%''​.+在文字每一行的前方加上兩個半形空格,可使該段文字以「文字方塊」方式顯示出來。在文字方塊裏,所有文字都會無格式化。您也可以用「%%<code></​code>%%」或「%%<file></​file>%%」這兩個標籤去做到相同效果。
  
-  ​This is text is indented by two spaces.+  ​這是前方加上了兩個半形空格的文字。 
 +  即使有**甚麼格式**標示了,它都不會[[格式化]]。
  
 <​code>​ <​code>​
-This is preformatted code all spaces are preserved: like              <-this+這是沒有格式化的代碼,所有空格都保留下來。就像 ​             <-這樣
 </​code>​ </​code>​
  
 <​file>​ <​file>​
-This is pretty much the same, but you could use it to show that you quoted a file.+這段也非常相似,但 
 +您可以用它來表明 
 +     ​您正在引述(Quote)別人的言論。
 </​file>​ </​file>​
  
-Those blocks were created by this source:+這些區塊由下面的源碼產生出來:
  
-    ​This is text is indented by two spaces.+    ​這是前方加上了兩個半形空格的文字。 
 +    即使有**甚麼格式**標示了,它都不會[[格式化]]。
  
   <​code>​   <​code>​
-  ​This is preformatted code all spaces are preserved: like              <-this+  ​這是沒有格式化的代碼,所有空格都保留下來。就像 ​             <-這樣
   </​code>​   </​code>​
  
   <​file>​   <​file>​
-  ​This is pretty much the same, but you could use it to show that you quoted a file.+  ​這段也非常相似,但 
 +  您可以用它來表明 
 +       ​您正在引述(Quote)別人的言論。
   </​file>​   </​file>​
  
-==== Syntax Highlighting ​====+===== 語法的高亮顯示 =====
  
-[[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://​qbnz.com/​highlighter/​|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax uses the same code and file blocks described in the previous section, but this time the name of the language syntax to be highlighted is included inside the tag, e.g. ''​<nowiki><​code java></​nowiki>''​ or ''<​nowiki><​file java></​nowiki>''​.+DokuWiki可把原始碼語法以高亮模式顯示,使它更易閱讀。它使用GeSHi通用語法高亮器,只要是GeSHi支援的,DokuWiki也支援。用法就類似前例的「%%<​code></code>%%」標籤,不過您要在標籤內指定該原始碼所使用的語言。例如是「%%<code java></​code>%%」或「%%<file java></​file>%%」。示範如下:
  
 <code java> <code java>
-/**+ 
 +/** 
  * The HelloWorldApp class implements an application that  * The HelloWorldApp class implements an application that
  * simply displays "Hello World!"​ to the standard output.  * simply displays "Hello World!"​ to the standard output.
  */  */
 +
 class HelloWorldApp { class HelloWorldApp {
 +
     public static void main(String[] args) {     public static void main(String[] args) {
         System.out.println("​Hello World!"​);​ //Display the string.         System.out.println("​Hello World!"​);​ //Display the string.
行 417: 行 451:
 </​code>​ </​code>​
  
-The following language strings are currently recognized: ​//4cs 6502acme 6502kickass 6502tasm 68000devpac abap actionscript3 ​actionscript ada aimms algol68 apache applescript ​apt_sources arm asm asp asymptote ​autoconf autohotkey autoit avisynth awk bascomavr bash basic4gl ​batch bf biblatex ​bibtex blitzbasic bnf boo caddcl cadlisp ​ceylon ​cfdg cfm chaiscript ​chapel ​cil c_loadrunner ​clojure ​c_mac cmake cobol coffeescript ​cpp cpp-qt ​cpp-winapi ​csharp css cuesheet ​c_winapi dart dcl dcpu16 ​dcs delphi diff div dos dot ecmascript eiffel email epc e erlang euphoria ​ezt f1 falcon fo fortran freebasic ​freeswitch ​fsharp gambas ​gdb genero genie gettext ​glsl gml gnuplot go groovy gwbasic haskell ​haxe hicest hq9plus html html4strict ​html5 icon idl ini inno intercal io ispfpanel ​java5 java javascript ​jcl j jquery ​julia kixtart klonec klonecpp ​kotlin ​latex lb ldif lisp llvm locobasic logtalk lolcode lotusformulas lotusscript lscript lsl2 lua m68k magiksf make mapbasic ​mathematica ​matlab ​mercury metapost ​mirc mk-61 mmix modula2 modula3 mpasm mxml mysql nagios netrexx ​newlisp ​nginx nimrod ​nsis oberon2 objc objeck ocaml-brief ocaml octave ​oobas oorexx oracle11 ​oracle8 oxygene oz parasail parigp ​pascal pcre perl6 perl per pf phix php-brief php pic16 pike pixelbender pli plsql postgresql ​postscript ​povray powerbuilder powershell proftpd progress prolog properties providex purebasic pycon pys60 python ​qbasic qml racket ​rails rbs rebol reg rexx robots rpmspec rsplus ruby rust sas sass scala scheme scilab ​scl sdlbasic smalltalk smarty ​spark sparql ​sql standardml stonescript swift systemverilog ​tclegg ​tcl teraterm ​texgraph ​text thinbasic tsql twig typoscript unicon ​upc urbi uscript vala vbnet vb vbscript vedit verilog vhdl vim visualfoxpro visualprolog whitespace ​whois winbatch xbasic xml xojo xorg_conf xpp yaml z80 zxbasic//+目前支援的語言有: ​//4cs6502acme6502kickass6502tasm68000devpacabapactionscript-french, actionscript,​ actionscript3, ​adaalgol68apacheapplescriptasmaspautoconfautohotkeyautoitavisynthawkbascomavrbashbasic4glbfbibtexblitzbasicbnfboo, c, c_loadrunner,​ c_mac, ​caddclcadlispcfdgcfmchaiscriptcilclojurecmakecobolcoffeescriptcppcpp-qtcsharpcsscuesheet, d, dcsdelphidiffdivdosdot, e, epc, ecmascripteiffelemailerlangeuphoriaf1falconfofortranfreebasicfsharpgambasgenerogenie, gdb, glslgmlgnuplotgogroovy, gettext, ​gwbasichaskellhicesthq9plushtmlhtml5iconidliniinnointercalio, j, java5javajavascriptjquerykixtartklonecklonecpplatexlblispllvmlocobasiclogtalklolcodelotusformulaslotusscriptlscriptlsl2luam68kmagiksfmakemapbasicmatlabmircmodula2modula3, mmix, mpasmmxmlmysqlnewlispnsisoberon2objcobjeckocaml-briefocamloobasoracle8, oracle11, ​oxygeneozpascalpcreperl, perl6, ​perpfphp-briefphppike, pic16, ​pixelbenderpliplsqlpostgresqlpovraypowerbuilderpowershellproftpdprogressprologpropertiesprovidexpurebasicpyconpythonq, qbasic, ​railsrebolregrobotsrpmspecrsplusrubysasscalaschemescilabsdlbasicsmalltalksmartysqlsystemverilogtclteratermtextthinbasictsqltyposcriptuniconuscriptvalavbnetvbverilogvhdlvimvisualfoxprovisualprologwhitespacewinbatch, whois, ​xbasicxmlxorg_confxppyamlz80zxbasic//
  
-There are additional [[doku>​syntax_highlighting|advanced options]] available for syntax highlighting,​ such as highlighting lines or adding line numbers.+==== 可下載的代碼區塊 ====
  
-==== Downloadable Code Blocks ==== +若您使用上述的「%%<​code>​%%」或「%%<​file>​%%」語法,您或許希望讓瀏覽者直接下載該段代碼。您可以在語言代碼後方指定一個文件名,方便瀏覽者下載:
- +
-When you use the ''​%%<​code>​%%''​ or ''​%%<​file>​%%''​ syntax as above, you might want to make the shown code available for download as well. You can do this by specifying a file name after language code like this:+
  
 <​code>​ <​code>​
行 435: 行 467:
 </​file>​ </​file>​
  
-If you don't want any highlighting but want a downloadable file, specify a dash (''​-''​) as the language code: ''​%%<code - myfile.foo>​%%''​.+若您不想把語法高亮顯示出,但想方便瀏覽者下載,您可以用短折號「-」作語言代碼。例如:「%%<code - myfile.foo>​%%」。
  
 +===== 在內容中嵌入HTML或PHP語法 =====
  
-===== Embedding ​HTML and PHP =====+您可以在文件裏加入「''​%%<​%%html%%>​%%''​」或「''​%%<​%%php%%>​%%''​」標籤,來使用HTMLPHP語法,比如:​
  
-You can embed raw HTML or PHP code into your documents by using the ''​%%<​html>​%%''​ or ''​%%<php>%%''​ tags. (Use uppercase tags if you need to enclose block level elements.+<​html>​ 
- +這是<font color="​red"​ size="​+1"​>用HTML寫的紅色字(size=+1)</​font>​。 
-HTML example:+</​html>​
  
 <​code>​ <​code>​
 <​html>​ <​html>​
-This is some <span style="color:red;font-size:150%;">inline ​HTML</span>+這是<font color="red" ​size="+1">HTML寫的紅色字(size=+1)</font>
 </​html>​ </​html>​
-<​HTML>​ 
-<p style="​border:​2px dashed red;">​And this is some block HTML</​p>​ 
-</​HTML>​ 
 </​code>​ </​code>​
  
-<html+<php
-This is some <span style="​color:red;font-size:​150%;">​inline HTML</​span>​ +echo '由 PHP 所產生的 Logo:'
-</html> +echo '<img src="'​ . $_SERVER['​PHP_SELF'​] . '?= 
-<​HTML>​ +                '​ . php_logo_guid() . '" ​ 
-<p style="border:2px dashed red;">And this is some block HTML</p+       alt="PHP Logo !" />'; 
-</HTML> +</php>
- +
-PHP example:+
  
 <​code>​ <​code>​
 <php> <php>
-echo 'The PHP version: '; +echo '由 PHP 所產生的 Logo:'; 
-echo phpversion();​ +echo '<​img src="'​ . $_SERVER['​PHP_SELF'​] . '?= 
-echo ' (generated inline HTML)';+                ' ​. php_logo_guid() . '"​  
 +       ​alt="​PHP Logo !" />';
 </​php>​ </​php>​
-<PHP> 
-echo '<​table class="​inline"><​tr><​td>​The same, but inside a block level element:</​td>';​ 
-echo '<​td>'​.phpversion().'</​td>';​ 
-echo '</​tr></​table>';​ 
-</​PHP>​ 
 </​code>​ </​code>​
  
-<php> +**請特別注意**:您可以在[[doku>zh-tw:config|設定選項]]中,選擇是否支援HTMLPHP語法。若您的DokuWiki設定爲不開啟這兩項功能,那麼上面的例子就無法正常顯示,只會直接顯示出來原始寫法。您也可選擇只開啟兩項功能之一。開啟了這兩項功能後,可能會爲有心破壞的人提供機會,對您的wiki系統甚至主機造成危險。
-echo 'The PHP version'; +
-echo phpversion();​ +
-echo ' (inline ​HTML)'; +
-</​php>​ +
-<PHP+
-echo '<​table class="​inline"><​tr><​td>​The same, but inside a block level element:</​td>';​ +
-echo '<​td>'​.phpversion().'</​td>';​ +
-echo '</​tr></​table>';​ +
-</​PHP>​+
  
-**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed.+===== RSS/ATOM Feed聚合 =====
  
-===== RSS/ATOM Feed Aggregation ===== +DokuWiki能從外部XML feed中聚合數據。爲分析這些XML feed,DokuWiki使用了[[http://​simplepie.org/​|SimplePie]]。凡是SimplePie能理解的格式,都可用於DokuWiki中。您可以更改不同的參數,以改變其渲染。參數之間請用空格隔開:
-[[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:+
  
-Parameter ​ ​^ ​Description ​+參數 ​ ​^ ​描述 ​
-| any number | will be used as maximum number items to show, defaults to 8 | +| any number | 最多顯示多少項內容;預設值是8。 
-| reverse ​   | display the last items in the feed first +| reverse ​   | 將最新條目顯示在前面。 ​
-| author ​    ​| ​show item authors names +| author ​    ​| ​顯示條目的作者名字。 ​
-| date       ​| ​show item dates +| date       ​| ​顯示條目數據。 ​
-| description| ​show the item description. If [[doku>​config:​htmlok|HTML]] ​is disabled all tags will be stripped | +| description| ​顯示條目的描述;如果[[doku>​config:​htmlok|HTML]]被禁用,所有標籤將被過濾掉 ​
-| nosort ​    | do not sort the items in the feed +| //n//[dhm] | 刷新周期,其中,d=日數,h=小時數,m=分。例如,12h=12小時。 ​|
-| //n//[dhm] | refresh period, where d=days, h=hours, ​m=minutes. (e.g. 12h = 12 hours). ​|+
  
-The refresh period defaults to hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki:DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered.+預設的刷新周期是4小時。小於10分鐘者亦視爲10分鐘。DokuWiki通常會提供頁面的暫存版,但這做法不適用於包含動態外部內容的頁面。上面的參數則告訴DokuWiki:若對上一次渲染時間已經過了//刷新周期//,就要重新渲染頁面。
  
-By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the ''​reverse''​ parameter, or display the feed as is with ''​nosort''​. +**範例:**
- +
-**Example:**+
  
   {{rss>​http://​slashdot.org/​index.rss 5 author date 1h }}   {{rss>​http://​slashdot.org/​index.rss 5 author date 1h }}
行 510: 行 521:
 {{rss>​http://​slashdot.org/​index.rss 5 author date 1h }} {{rss>​http://​slashdot.org/​index.rss 5 author date 1h }}
  
 +===== 控制巨集 =====
  
-===== Control Macros =====+有些語法會影響DokuWiki對頁面的渲染,而自身不輸出任何內容。可用的控制巨集如下:
  
-Some syntax influences how DokuWiki ​renders a page without creating any output it self. The following control macros are availble:+^ 巨集 ​          ^ 描述| 
 +| %%~~NOTOC~~%% ​  | 如果頁面出現該控制巨集,將不會創建目錄。 | 
 +| %%~~NOCACHE~~%% | DokuWiki預設會緩存所有的輸出。有時您並不希望這樣(例如您使用了上述的%%<​php>​%%語法),便可使用這控制巨集,強制DokuWiki在每次訪問時都重新渲染頁面。 |
  
-^ Macro           ^ Description | +===== 語法附加元件 =====
-| %%~~NOTOC~~%% ​  | If this macro is found on the page, no table of contents will be created | +
-| %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%<​php>​%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call |+
  
-===== Syntax Plugins ===== +運用[[doku>zh-tw:plugins|附加元件]],可以擴充DokuWiki的語法。附加元件的安裝方法,請見其他相應頁面中說明。本wiki系統使用了下列附加元件:
- +
-DokuWiki'​s syntax can be extended by [[doku>​plugins|Plugins]]. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular ​DokuWiki ​installation:​+
  
 ~~INFO:​syntaxplugins~~ ~~INFO:​syntaxplugins~~
- 
wiki/syntax.txt · 上一次變更: 2019/04/13 05:07 由 danny8376